0% found this document useful (0 votes)
64 views2 pages

Fixed Actor Script

Uploaded by

poooppp.peeeeee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views2 pages

Fixed Actor Script

Uploaded by

poooppp.peeeeee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

local ActorSystem = {

Connections = {},
KillerIntros = {}
}

local Player = [Link]


local Network = require([Link])
local Actors = require([Link])
local Util = require([Link])
local Sprint = require([Link])

function [Link]()
Network:SetConnection("ActorDestroyed", "REMOTE_EVENT", function(actor)
local current = [Link][actor]
if current then
for _, phase in pairs({"Destroyed", "DestroyedPost"}) do
if [Link] and [Link][phase] then
[Link][phase]([Link], current)
elseif [Link][phase] then
[Link][phase]([Link], current)
end
end
[Link](function()
if [Link]:find("Killer") then
local ChaseThemes =
require([Link])

require([Link])
ChaseThemes:KillerRemoved(current)
end
end)
Actors.__actorDestroyed:Fire(current)
end
[Link][actor] = nil
end)

Network:SetConnection("ActorCreated", "REMOTE_EVENT", function(actorInfo)


local skinData = Actors:ApplySkinDataToActorInfo(actorInfo)
[Link] = skinData and
(skinData:FindFirstChild("Behavior") and require([Link])) or {}
[Link][[Link]] = actorInfo
Util:PreloadAssets([Link])

if [Link] == Player then


ActorSystem:Destroy()

-- animations setup omitted for brevity --

-- Stamina integration
[Link](function()
if [Link] ~= [Link] or not [Link] then
local waited = 0
repeat
waited += [Link]:Wait()
until [Link] == [Link] and [Link]
or waited >= 10
end

[Link] = [Link] or
[Link]
[Link] = [Link] or
[Link]
[Link] = [Link] or
[Link]
[Link] = [Link] or
[Link]
[Link] = [Link] or
[Link]

-- Preserve stamina value instead of resetting it


[Link] = [Link]([Link] or [Link],
[Link], [Link])
Sprint.__staminaChangedEvent:Fire([Link])

-- Proper bounds check


if [Link] < [Link] or [Link] >
[Link] then
Player:Kick("\n\nPranksterComet 000:\nInvalid stamina value")
end

-- Killers always drain stamina unless explicitly disabled


externally
if [Link]:find("Killer") and [Link] and
[Link] then
[Link] =
[Link]:Connect(function()
[Link] = false
end)
end
end)
end

Actors.__actorCreated:Fire(actorInfo)
end)
end

function [Link]()
if [Link] then
[Link]:Destroy()
end
for _, conn in pairs([Link]) do
conn:Disconnect()
end
[Link]([Link])
end

return ActorSystem

You might also like