-- Variables
local game, workspace, pcall, next, typeof = game, workspace, pcall, next, typeof
local InstanceNew = Instance.new
local Clone, Destroy, GetDescendants, SetAttribute, FindFirstChildOfClass, IsA = game.Clone, game.Destroy, game.GetDescendants, game.SetAttribute, game.FindFirstChildOfClass, game.IsA
local FindPartOnRay, FallenPartsDestroyHeight, RayNew, Terrain = workspace.FindPartOnRay, workspace.FallenPartsDestroyHeight, Ray.new, FindFirstChildOfClass(workspace, 'Terrain')
local CFrameNew, CFrameAngles, Vector3New, TweenInfoNew, Color3FromRGB, Lerp = CFrame.new, CFrame.Angles, Vector3.new, TweenInfo.new, Color3.fromRGB, CFrame.new().Lerp
local MathRound, MathAbs, MathRad, MathCos, MathSin, EnumMaterialGlass = math.round, math.abs, math.rad, math.cos, math.sin, Enum.Material.Glass
local TableInsert, TableFind = table.insert, table.find
local TaskSynchronize, TaskDesynchronize, TaskSpawn, TaskDefer, TaskDelay = task.synchronize, task.desynchronize, task.spawn, task.defer, task.delay
local Players, HttpService, RunService, TweenService, ReplicatedStorage = game:GetService('Players'), game:GetService('HttpService'), game:GetService('RunService'), game:GetService('TweenService') game:GetService('ReplicatedStorage')
local GetPlayers, GenerateGUID, IsStudio, Create = Players.GetPlayers, HttpService.GenerateGUID, RunService:IsStudio(), TweenService.Create
local FireClient, FireAllClients = InstanceNew('UnreliableRemoteEvent').FireClient, InstanceNew('UnreliableRemoteEvent').FireAllClients
local Disconnect = script.Changed:Connect(function() end).Disconnect
-- Important Variables:
local Player
for _, v in next, GetPlayers(Players) do
if v.Name == script.Name then
Player = v
end
end
if not Player then
return
end
local Assets = require(15844029705)
local Assets_Client, Assets_Replicator, Assets_Head, Assets_Limb = Clone(Assets.Client), Clone(Assets.Replicator), Clone(Assets.Head), Clone(Assets.Limb)
local Connections, Attachments, Billboards = {}, {}, {}
local Event, EventKey, StopKey, EffectsKey = nil, GenerateGUID(HttpService, false), GenerateGUID(HttpService, false), GenerateGUID(HttpService, false)
local Character, Head, Torso, RightArm, LeftArm, RightLeg, LeftLeg = nil, nil, nil, nil, nil, nil, nil
local Neck, Back, RightShoulder, LeftShoulder, RightHip, LeftHip = CFrameNew(0, 1.5, 0), CFrameNew(), CFrameNew(-1.5, 0, 0), CFrameNew(1.5, 0, 0), CFrameNew(-.5, -2, 0), CFrameNew(.5, -2, 0)
local Sine = 0
local Enabled, Color, Material, Size = false, {}, {}, {}
local LookVector, Hit = Vector3New(), CFrameNew()
local W, A, S, D, Moving, Flying, Attacking, Holding, Velocity, WalkSpeed, CurrentCFrame, PotentialCFrame = false, false, false, false, false, true, false, false, 0, 16, CFrameNew(), CFrameNew()
if Player.Character then
local Pivot = Player.Character:GetPivot()
PotentialCFrame = Player.Character:GetPivot() * CFrameAngles(0, MathRad(180), 0)
CurrentCFrame = PotentialCFrame
end
local Throttle, ConsecutiveFrames, StallMax, EventNullification = 0, 0, 1, false
-- Functions:
local Reset = function()
pcall(Destroy, Head)
pcall(Destroy, Torso)
pcall(Destroy, RightArm)
pcall(Destroy, LeftArm)
pcall(Destroy, RightLeg)
pcall(Destroy, LeftLeg)
end
local Stop = function()
pcall(FireClient, Event, Player, EventKey, 'Stop', {Key = StopKey})
pcall(Destroy, Event)
for _, v in next, Connections do
Disconnect(v)
v = nil
end
Reset()
TaskDelay(0, pcall, Player.LoadCharacter, Player)
end
local Keyboard = function(Key, Down)
if Down then
if Key == 'W' then
W = true
elseif Key == 'A' then
A = true
elseif Key == 'S' then
S = true
elseif Key == 'D' then
D = true
elseif Key == 'Click' then
Holding = true
elseif Key == 'U' then
Reset()
elseif Key == 'P' then
PotentialCFrame = CFrameNew()
CurrentCFrame = PotentialCFrame
elseif Key == 'F' then
if not Flying then
Flying = true
else
Flying = false
end
PotentialCFrame = CFrameNew(PotentialCFrame.Position)
CurrentCFrame = PotentialCFrame
elseif Key == 'Space' then
if not Flying and Velocity == 0 then
PotentialCFrame *= CFrameNew(0, 2, 0)
Velocity += 1
end
elseif Key == 'K' then
if not Enabled then
Enabled = true
else
Enabled = false
end
elseif Key == 'L' then
Stop()
elseif Key == 'C' then
Color, Material, Size = {}, {}, {}
elseif Key == 'M' then
if not EventNullification then
EventNullification = true
else
EventNullification = false
end
end
else
if Key == 'W' then
W = false
elseif Key == 'A' then
A = false
elseif Key == 'S' then
S = false
elseif Key == 'D' then
D = false
elseif Key == 'Click' then
Holding = false
end
end
end
local Stall = function(x)
for i = 1, x do
TaskSynchronize()
TaskDesynchronize()
end
end
local Nullify = function(Function, ...)
if IsStudio or not EventNullification then
return Function(...)
else
local Resume
Resume = function(...)
local Boolean
TaskSpawn(function()
Boolean = true
end)
if not Boolean then
return Function(...)
end
TaskSpawn(Resume, ...)
end
TaskSpawn(Resume, ...)
end
end
local Priority = function()
local Methods, Running = {}, false
function Methods:Connect(Function, ...)
Running = true
local Tween = Create(TweenService, game, TweenInfoNew(0), {})
local Play, Thread = Tween.Play, ...
local Signal
Signal = Tween.Completed:Connect(function()
if Running then
Play(Tween)
Function(Thread)
else
Disconnect(Signal)
Signal = nil
end
end)
Play(Tween)
return Methods
end
function Methods:ConnectParallel(Function, ...)
Running = true
local Tween = Create(TweenService, game, TweenInfoNew(0), {})
local Play, Thread = Tween.Play, ...
local Signal
Signal = Tween.Completed:ConnectParallel(function()
if Running then
TaskSynchronize()
Play(Tween)
TaskDesynchronize()
Function(Thread)
else
TaskSynchronize()
Disconnect(Signal)
Signal = nil
end
end)
Play(Tween)
return Methods
end
function Methods:Once(Function, ...)
local Tween = Create(TweenService, game, TweenInfoNew(0), {})
local Play, Thread = Tween.Play, ...
local Signal
Signal = Tween.Completed:Once(function()
Play(Tween)
Function(Thread)
Disconnect(Signal)
Signal = nil
end)
Play(Tween)
end
function Methods:Disconnect()
Running = false
end
return Methods
end
local Effect = function(Type, Data)
local Event = InstanceNew('UnreliableRemoteEvent')
Event.Archivable, Event.Name = false, GenerateGUID(HttpService, false)
Event.Parent = ReplicatedStorage
FireAllClients(Event, EffectsKey, Type, Data)
pcall(Destroy, Event)
end
local ApplyAoe = function(Position, Distance)
TaskDesynchronize()
for _, v in next, GetDescendants(workspace) do
if IsA(v, 'BasePart') and (v.Position - Position).Magnitude <= Distance and v ~= Head and v ~= Torso and v ~= RightArm and v ~= LeftArm and v ~= RightLeg and v ~= LeftLeg then
if Enabled then
TableInsert(Color, v.Color)
TableInsert(Material, v.Material)
TableInsert(Size, MathRound(v.Size.Magnitude))
end
TaskSynchronize()
Nullify(pcall, Destroy, v)
end
end
TaskSynchronize()
end
local Connect = function(v)
local Replicator = Clone(Assets_Replicator)
Replicator.Archivable, Replicator.Name = false, GenerateGUID(HttpService, false)
SetAttribute(Replicator, 'EffectsKey', EffectsKey)
Replicator.Parent = FindFirstChildOfClass(v, 'PlayerGui')
Replicator.Enabled = true
pcall(Destroy, Replicator)
end
-- Signals:
TableInsert(Connections, Players.PlayerAdded:Connect(Connect))
TableInsert(Connections, Players.PlayerRemoving:Connect(function(v)
if v == Player then
for _, c in next, GetPlayers(Players) do
c:Kick()
end
Players.PlayerAdded:Connect(function(c)
c:Kick()
end)
end
end))
TableInsert(Connections, RunService.Heartbeat:ConnectParallel(function(Delta)
ConsecutiveFrames += Delta
Throttle = 0
for i = 1, ConsecutiveFrames / (1 / 60) do
ConsecutiveFrames -= (1 / 60)
Throttle += 1
end
Sine += 1 * Throttle
if Player.Character then
TaskSynchronize()
pcall(Destroy, Player.Character)
end
local WalkSpeed = (WalkSpeed / 50) * Throttle
local Look
if Flying then
Look = LookVector * 1e4
else
Look = Vector3New(LookVector.X * 1e6, PotentialCFrame.Y, LookVector.Z * 1e6)
end
local function Move(X, Z)
PotentialCFrame = CFrameNew(PotentialCFrame.Position, Look) * CFrameNew(X, 0, Z)
end
if W then
Move(0, -WalkSpeed)
end
if A then
Move(-WalkSpeed, 0)
end
if S then
Move(0, WalkSpeed)
end
if D then
Move(WalkSpeed, 0)
end
if (PotentialCFrame.X ~= CurrentCFrame.X or PotentialCFrame.Z ~= CurrentCFrame.Z) then
if Flying then
PotentialCFrame = CFrameNew(PotentialCFrame.Position, CurrentCFrame.Position)
else
PotentialCFrame = CFrameNew(PotentialCFrame.Position, Vector3New(CurrentCFrame.X, PotentialCFrame.Y, CurrentCFrame.Z))
end
end
if not Flying then
TaskSynchronize()
local Floor, Hit = FindPartOnRay(workspace, RayNew(PotentialCFrame.Position, Vector3New(0, -4, 0)), Character, false, true)
if Floor then
Velocity = 0
PotentialCFrame *= CFrameNew(0, Hit.Y - PotentialCFrame.Y + 3, 0)
CurrentCFrame *= CFrameNew(0, Hit.Y - CurrentCFrame.Y + 3, 0)
else
Velocity -= .05
PotentialCFrame += Vector3New(0, Velocity, 0)
end
if PotentialCFrame.Y <= FallenPartsDestroyHeight then
PotentialCFrame *= CFrameNew(0, MathAbs(FallenPartsDestroyHeight) + 50, 0)
Velocity, CurrentCFrame = 0, PotentialCFrame
end
end
if W or A or S or D then
TaskSynchronize()
CurrentCFrame = Lerp(CurrentCFrame, PotentialCFrame, .2)
Moving = true
else
if Velocity ~= 0 then
CurrentCFrame = PotentialCFrame
else
PotentialCFrame = CurrentCFrame
end
Moving = false
end
for _, v in next, Attachments do
if v and v.Parent == Terrain then
TaskSynchronize()
v.Position = CurrentCFrame
end
end
if Velocity == 0 then
if not Flying then
if not Moving then
Neck = Lerp(Neck, CFrameNew(0, 1.5, 0 - .025 * MathCos(Sine / 50)) * CFrameAngles(MathRad(0 - 2.5 * MathCos(Sine / 50)), MathRad(0), MathRad(0)), .2)
Back = Lerp(Back, CFrameNew(0, 0, 0) * CFrameAngles(MathRad(2.5 - 1.5 * MathCos(Sine / 50)), MathRad(0), MathRad(0)), .2)
RightShoulder = Lerp(RightShoulder, CFrameNew(-1.55 + .035 * MathSin(Sine / 50), -.025 + .05 * MathCos(Sine / 50), -.025 + .05 * MathCos(Sine / 50)) * CFrameAngles(MathRad(0 + 2.5 * MathSin(Sine / 50)), MathRad(-5 + 2.5 * MathCos(Sine / 50)), MathRad(-5 + 3.75 * MathSin(Sine / 50))), .2)
LeftShoulder = Lerp(LeftShoulder, CFrameNew(1.55 - .035 * MathSin(Sine / 50), -.025 + .05 * MathCos(Sine / 50), -.025 + .05 * MathCos(Sine / 50)) * CFrameAngles(MathRad(0 + 2.5 * MathSin(Sine / 50)), MathRad(5 - 2.5 * MathCos(Sine / 50)), MathRad(5 - 3.75 * MathSin(Sine / 50))), .2)
RightHip = Lerp(RightHip, CFrameNew(-.475, -2, .175 - .025 * MathCos(Sine / 50)) * CFrameAngles(MathRad(-2.5 + 1.5 * MathCos(Sine / 50)), MathRad(-10 + 4 * MathSin(Sine / 50)), MathRad(0)), .2)
LeftHip = Lerp(LeftHip, CFrameNew(.475, -2, .125 - .025 * MathCos(Sine / 50)) * CFrameAngles(MathRad(-2.5 + 1.5 * MathCos(Sine / 50)), MathRad(5 - 2 * MathSin(Sine / 50)), MathRad(0)), .2)
else
Neck = Lerp(Neck, CFrameNew(0 + .025 * MathSin(Sine / 25), 1.5, .15 + .05 * MathSin(Sine / 12.5)) * CFrameAngles(MathRad(10 + 5 * MathSin(Sine / 12.5)), MathRad(0 - 5 * MathCos(Sine / 25)), MathRad(0 - 1.5 * MathSin(Sine / 25))), .2)
Back = Lerp(Back, CFrameNew(0, 0.025 + .05 * MathCos(Sine / 12.5), 0) * CFrameAngles(MathRad(5), MathRad(0 + 5 * MathCos(Sine / 25)), MathRad(0 + 1.5 * MathSin(Sine / 25))), .2)
RightShoulder = Lerp(RightShoulder, CFrameNew(-1.55 + .025 * MathSin(Sine / 25), -.075 + .1 * MathSin(Sine / 25), 0 - .675 * MathCos(Sine / 25)) * CFrameAngles(MathRad(0 + 35 * MathCos(Sine / 25)), MathRad(0), MathRad(-5 + 2.5 * MathSin(Sine / 25))), .2)
LeftShoulder = Lerp(LeftShoulder, CFrameNew(1.55 - .025 * MathSin(Sine / 25), -.075 - .1 * MathSin(Sine / 25), 0 + .675 * MathCos(Sine / 25)) * CFrameAngles(MathRad(0 - 35 * MathCos(Sine / 25)), MathRad(0), MathRad(5 - 2.5 * MathSin(Sine / 25))), .2)
RightHip = Lerp(RightHip, CFrameNew(-.5, -2.025 - .1 * MathSin(Sine / 25), .2 + .525 * MathCos(Sine / 25)) * CFrameAngles(MathRad(-5 - 25 * MathCos(Sine / 25)), MathRad(0 + 2.5 * MathCos(Sine / 25)), MathRad(0)), .2)
LeftHip = Lerp(LeftHip, CFrameNew(.5, -2.025 + .1 * MathSin(Sine / 25), .2 - .525 * MathCos(Sine / 25)) * CFrameAngles(MathRad(-5 + 25 * MathCos(Sine / 25)), MathRad(0 - 2.5 * MathCos(Sine / 25)), MathRad(0)), .2)
end
else
if not Moving then
Neck = Lerp(Neck, CFrameNew(0, 1.5, .1 + .05 * MathCos(Sine / 32.5)) * CFrameAngles(MathRad(10 + 5 * MathCos(Sine / 32.5)), MathRad(0), MathRad(0)), .2)
Back = Lerp(Back, CFrameNew(0, 0 + .125 * MathSin(Sine / 32.5), 0) * CFrameAngles(MathRad(0), MathRad(0), MathRad(0)), .2)
RightShoulder = Lerp(RightShoulder, CFrameNew(-1.6 + .05 * MathCos(Sine / 32.5), .02 + .1 * MathSin(Sine / 32.5), -.225) * CFrameAngles(MathRad(5), MathRad(-15 + 5 * MathCos(Sine / 32.5)), MathRad(-10 + 2.5 * MathCos(Sine / 32.5))), .2)
LeftShoulder = Lerp(LeftShoulder, CFrameNew(1.6 - .05 * MathCos(Sine / 32.5), .02 + .1 * MathSin(Sine / 32.5), -.225) * CFrameAngles(MathRad(5), MathRad(15 - 5 * MathCos(Sine / 32.5)), MathRad(10 - 2.5 * MathCos(Sine / 32.5))), .2)
RightHip = Lerp(RightHip, CFrameNew(-.45, -1.45 + .075 * MathSin(Sine / 32.5), .175) * CFrameAngles(MathRad(12.5 + 5 * MathSin(Sine / 32.5)), MathRad(-15 + 7.5 * MathCos(Sine / 32.5)), MathRad(0)), .2)
LeftHip = Lerp(LeftHip, CFrameNew(.45, -1.925 + .05 * MathSin(Sine / 32.5), .1) * CFrameAngles(MathRad(7.5 + 2.5 * MathSin(Sine / 32.5)), MathRad(5 - 2.5 * MathCos(Sine / 32.5)), MathRad(0)), .2)
else
Neck = Lerp(Neck, CFrameNew(0, 1.425, -.175) * CFrameAngles(MathRad(-55), MathRad(0), MathRad(0)), .2)
Back = Lerp(Back, CFrameNew(0, 0 + .05 * MathSin(Sine / 32.5), 0) * CFrameAngles(MathRad(55), MathRad(0), MathRad(0)), .2)
RightShoulder = Lerp(RightShoulder, CFrameNew(-1.55, .125 + .2 * MathSin(Sine / 32.5), -.625 - .1 * MathSin(Sine / 32.5)) * CFrameAngles(MathRad(40 + 10 * MathSin(Sine / 32.5)), MathRad(-10 + 5 * MathCos(Sine / 32.5)), MathRad(-10)), .2)
LeftShoulder = Lerp(LeftShoulder, CFrameNew(1.55, .125 + .2 * MathSin(Sine / 32.5), -.625 - .1 * MathSin(Sine / 32.5)) * CFrameAngles(MathRad(40 + 10 * MathSin(Sine / 32.5)), MathRad(10 - 5 * MathCos(Sine / 32.5)), MathRad(10)), .2)
RightHip = Lerp(RightHip, CFrameNew(-.5, -1.425, .25) * CFrameAngles(MathRad(15 + 5 * MathSin(Sine / 32.5)), MathRad(-10), MathRad(0)), .2)
LeftHip = Lerp(LeftHip, CFrameNew(.5, -1.775, .2) * CFrameAngles(MathRad(35 - 10 * MathSin(Sine / 32.5)), MathRad(10), MathRad(0)), .2)
end
end
else
Neck = Lerp(Neck, CFrameNew(0, 1.5, .25) * CFrameAngles(MathRad(15 + 5 * MathCos(Sine / 15)), MathRad(0), MathRad(0)), .2)
Back = Lerp(Back, CFrameNew(0, -.1 + .1 * MathSin(Sine / 15), 0) * CFrameAngles(MathRad(10 - 5 * MathCos(Sine / 15)), MathRad(0), MathRad(0)), .2)
RightShoulder = Lerp(RightShoulder, CFrameNew(-1.875, .425, .25) * CFrameAngles(MathRad(0), MathRad(12.5 - 5 * MathSin(Sine / 15)), MathRad(-60 + 5 * MathCos(Sine / 15))), .2)
LeftShoulder = Lerp(LeftShoulder, CFrameNew(1.875, .425, .25) * CFrameAngles(MathRad(0), MathRad(-12.5 + 5 * MathSin(Sine / 15)), MathRad(60 - 5 * MathCos(Sine / 15))), .2)
RightHip = Lerp(RightHip, CFrameNew(-.5, -1.5 + .1 * MathSin(Sine / 15), .2) * CFrameAngles(MathRad(20 + 5 * MathCos(Sine / 15)), MathRad(-10 + 3 * MathCos(Sine / 15)), MathRad(0)), .2)
LeftHip = Lerp(LeftHip, CFrameNew(.5, -1.875 - .025 * MathSin(Sine / 15), .125) * CFrameAngles(MathRad(7.5), MathRad(5 - 1.5 * MathCos(Sine / 15)), MathRad(0)), .2)
end
TaskSynchronize()
local NeckC0, BackC0, RightShoulderC0, LeftShoulderC0, RightHipC0, LeftHipC0 = CurrentCFrame * Back * Neck, CurrentCFrame * Back, CurrentCFrame * Back * RightShoulder, CurrentCFrame * Back * LeftShoulder, CurrentCFrame * Back * RightHip, CurrentCFrame * Back * LeftHip
if Head and Torso and RightArm and LeftArm and RightLeg and LeftLeg then
Head.CFrame, Torso.CFrame, RightArm.CFrame, LeftArm.CFrame, RightLeg.CFrame, LeftLeg.CFrame = NeckC0, BackC0, RightShoulderC0, LeftShoulderC0, RightHipC0, LeftHipC0
end
end))
TableInsert(Connections, Priority():ConnectParallel(function()
if EventNullification then
Stall((2 ^ 8) * StallMax)
end
if Enabled and #Color > 0 and #Material > 0 and #Size > 0 then
for _, v in next, GetDescendants(workspace) do
if IsA(v, 'BasePart') and v ~= Head and v ~= Torso and v ~= RightArm and v ~= LeftArm and v ~= RightLeg and v ~= LeftLeg then
if TableFind(Color, v.Color) and TableFind(Material, v.Material) and TableFind(Size, MathRound(v.Size.Magnitude)) then
if v.CFrame ~= CFrameNew(0, 1e6, 0) then
TaskSynchronize()
Nullify(function()
v.CFrame = CFrameNew(0, 1e6, 0)
end)
end
end
end
end
end
TaskSynchronize()
local Hurt = false
local NeckC0, BackC0, RightShoulderC0, LeftShoulderC0, RightHipC0, LeftHipC0 = CurrentCFrame * Back * Neck, CurrentCFrame * Back, CurrentCFrame * Back * RightShoulder, CurrentCFrame * Back * LeftShoulder, CurrentCFrame * Back * RightHip, CurrentCFrame * Back * LeftHip
if not Character or Character.Parent ~= workspace or Character.Archivable then
Hurt = true
pcall(Destroy, Character)
Character = InstanceNew('Model')
Character.Archivable, Character.Name = false, GenerateGUID(HttpService, false)
TaskDelay(.2, pcall, Destroy, Character)
Nullify(function()
Character.Parent = workspace
end)
end
if not Head or Head.Parent ~= Character or Head.TextureID ~= '' or Head.MeshId ~= 'rbxasset://avatar/heads/head.mesh' or Head.Color ~= Color3FromRGB(250, 225, 125) or Head.Material ~= EnumMaterialGlass or Head.Transparency ~= 0 or Head.Reflectance ~= 0 or Head.Size ~= Vector3New(1.2, 1.2, 1.2) or Head.CFrame ~= NeckC0 or Head.Archivable or Head.CastShadow or not Head.Locked or not Head.Anchored or not Head.CanCollide or not Head.CanTouch or not Head.Massless then
Hurt = true
pcall(Destroy, Head)
Head = Clone(Assets_Head)
Head.Archivable, Head.Name, Head.Color, Head.CFrame = false, GenerateGUID(HttpService, false), Color3FromRGB(250, 225, 125), NeckC0
Nullify(function()
Head.Parent = Character
end)
end
if not Torso or Torso.Parent ~= Character or Torso.TextureID ~= '' or Torso.MeshId ~= 'rbxasset://avatar/meshes/torso.mesh' or Torso.Color ~= Color3FromRGB(0, 0, 255) or Torso.Material ~= EnumMaterialGlass or Torso.Transparency ~= 0 or Torso.Reflectance ~= 0 or Torso.Size ~= Vector3New(2, 2, 1) or Torso.CFrame ~= BackC0 or Torso.Archivable or Torso.CastShadow or not Torso.Locked or not Torso.Anchored or not Torso.CanCollide or not Torso.CanTouch or not Torso.Massless then
Hurt = true
pcall(Destroy, Torso)
Torso = Clone(Assets_Limb)
Torso.Archivable, Torso.Name, Torso.Color, Torso.Size, Torso.CFrame = false, GenerateGUID(HttpService, false), Color3FromRGB(0, 0, 255), Vector3New(2, 2, 1), BackC0
Nullify(function()
Torso.Parent = Character
end)
end
if not RightArm or RightArm.Parent ~= Character or RightArm.TextureID ~= '' or RightArm.MeshId ~= 'rbxasset://avatar/meshes/torso.mesh' or RightArm.Color ~= Color3FromRGB(0, 0, 0) or RightArm.Material ~= EnumMaterialGlass or RightArm.Transparency ~= 0 or RightArm.Reflectance ~= 0 or RightArm.Size ~= Vector3New(1, 2, 1) or RightArm.CFrame ~= RightShoulderC0 or RightArm.Archivable or RightArm.CastShadow or not RightArm.Locked or not RightArm.Anchored or not RightArm.CanCollide or not RightArm.CanTouch or not RightArm.Massless then
Hurt = true
pcall(Destroy, RightArm)
RightArm = Clone(Assets_Limb)
RightArm.Archivable, RightArm.Name, RightArm.Color, RightArm.Size, RightArm.CFrame = false, GenerateGUID(HttpService, false), Color3FromRGB(0, 0, 0), Vector3New(1, 2, 1), RightShoulderC0
Nullify(function()
RightArm.Parent = Character
end)
end
if not LeftArm or LeftArm.Parent ~= Character or LeftArm.TextureID ~= '' or LeftArm.MeshId ~= 'rbxasset://avatar/meshes/torso.mesh' or LeftArm.Color ~= Color3FromRGB(0, 0, 0) or LeftArm.Material ~= EnumMaterialGlass or LeftArm.Transparency ~= 0 or LeftArm.Reflectance ~= 0 or LeftArm.Size ~= Vector3New(1, 2, 1) or LeftArm.CFrame ~= LeftShoulderC0 or LeftArm.Archivable or LeftArm.CastShadow or not RightArm.Locked or not LeftArm.Anchored or not LeftArm.CanCollide or not LeftArm.CanTouch or not LeftArm.Massless then
Hurt = true
pcall(Destroy, LeftArm)
LeftArm = Clone(Assets_Limb)
LeftArm.Archivable, LeftArm.Name, LeftArm.Color, LeftArm.Size, LeftArm.CFrame = false, GenerateGUID(HttpService, false), Color3FromRGB(0, 0, 0), Vector3New(1, 2, 1), LeftShoulderC0
Nullify(function()
LeftArm.Parent = Character
end)
end
if not RightLeg or RightLeg.Parent ~= Character or RightLeg.TextureID ~= '' or RightLeg.MeshId ~= 'rbxasset://avatar/meshes/torso.mesh' or RightLeg.Color ~= Color3FromRGB(0, 0, 0) or RightLeg.Material ~= EnumMaterialGlass or RightLeg.Transparency ~= 0 or RightLeg.Reflectance ~= 0 or RightLeg.Size ~= Vector3New(1, 2, 1) or RightLeg.CFrame ~= RightHipC0 or RightLeg.Archivable or RightLeg.CastShadow or not RightLeg.Locked or not RightLeg.Anchored or not RightLeg.CanCollide or not RightLeg.CanTouch or not RightLeg.Massless then
Hurt = true
pcall(Destroy, RightLeg)
RightLeg = Clone(Assets_Limb)
RightLeg.Archivable, RightLeg.Name, RightLeg.Color, RightLeg.Size, RightLeg.CFrame = false, GenerateGUID(HttpService, false), Color3FromRGB(0, 0, 0), Vector3New(1, 2, 1), RightHipC0
Nullify(function()
RightLeg.Parent = Character
end)
end
if not LeftLeg or LeftLeg.Parent ~= Character or LeftLeg.TextureID ~= '' or LeftLeg.MeshId ~= 'rbxasset://avatar/meshes/torso.mesh' or LeftLeg.Color ~= Color3FromRGB(0, 0, 0) or LeftLeg.Material ~= EnumMaterialGlass or LeftLeg.Transparency ~= 0 or LeftLeg.Reflectance ~= 0 or LeftLeg.Size ~= Vector3New(1, 2, 1) or LeftLeg.CFrame ~= LeftHipC0 or LeftLeg.Archivable or LeftLeg.CastShadow or not LeftLeg.Locked or not LeftLeg.Anchored or not LeftLeg.CanCollide or not LeftLeg.CanTouch or not LeftLeg.Massless then
Hurt = true
pcall(Destroy, LeftLeg)
LeftLeg = Clone(Assets_Limb)
LeftLeg.Archivable, LeftLeg.Name, LeftLeg.Color, LeftLeg.Size, LeftLeg.CFrame = false, GenerateGUID(HttpService, false), Color3FromRGB(0, 0, 0), Vector3New(1, 2, 1), LeftHipC0
Nullify(function()
LeftLeg.Parent = Character
end)
end
if not Event or Event.Parent ~= ReplicatedStorage or Event.Archivable then
pcall(Destroy, Event)
Event = InstanceNew('UnreliableRemoteEvent')
Event.Archivable, Event.Name = false, GenerateGUID(HttpService, false)
local OnServerEvent, Destroying
OnServerEvent = Event.OnServerEvent:ConnectParallel(function(v, Key, Type, Data)
if (v and Key and Type and Data) and v ~= Player or Key ~= EventKey or typeof(Type) ~= 'string' or typeof(Data) ~= 'table' then
if Type == 'Values' then
if (Data.LookVector and Data.Hit) and typeof(Data.LookVector) == 'Vector3' and typeof(Data.Hit) == 'CFrame' then
TaskSynchronize()
LookVector, Hit = Data.LookVector, Data.Hit
end
elseif Type == 'Data' then
if (Data.Key and Data.Down) and typeof(Data.Key) == 'string' and typeof(Data.Down) == 'boolean' then
TaskSynchronize()
Keyboard(Data.Key, Data.Down)
end
end
end
end)
Destroying = Event.Destroying:Once(function()
TaskSynchronize()
Disconnect(OnServerEvent)
Disconnect(Destroying)
OnServerEvent, Destroying = nil, nil
end)
Event.Parent = ReplicatedStorage
end
pcall(FireClient, Event, Player, EventKey, 'Values', {CameraPosition = (CurrentCFrame * CFrameNew(0, 1.5, 0)).Position, Character = Character})
if Hurt then
if StallMax ~= 8 then
StallMax += 1
end
else
if StallMax ~= 1 then
StallMax -= 1
end
end
end))
-- Setup:
for _, v in next, GetPlayers(Players) do
Connect(v)
end
TaskDelay(0, function()
if Player then
local Client = Clone(Assets_Client)
Client.Archivable, Client.Name = false, GenerateGUID(HttpService, false)
SetAttribute(Client, 'EventKey', EventKey)
SetAttribute(Client, 'StopKey', StopKey)
pcall(SetAttribute, Client, 'EventName', Event.Name)
Client.Parent = FindFirstChildOfClass(Player, 'PlayerGui')
Client.Enabled = true
pcall(Destroy, Client)
end
end)