local LSCRAssets = require(83463170275014)
--// SERVICES \\--
local RSV = game:GetService("RunService")
local LN = game:GetService("Lighting")
local SOUNDS = game:GetService("SoundService")
local Debris = game:GetService("Debris")
local plrs = game:GetService("Players")
local HTTP = game:GetService("HttpService")
local TS = game:GetService("TweenService")
--// VARIABLES \\--
local RND = Random.new()
local TI = TweenInfo.new
local UTILS = require(70620037422250)
local CHAT = UTILS.CHAT
local VFX = UTILS.VFX
local SFX = UTILS.SFX
local DICT = UTILS.DICT
local OTHER = UTILS.OTHER
local replicatedServices = {"Workspace","SoundService","Chat","Players","MarketplaceService","MaterialService","StarterPlayer","StarterPack","StarterGui","LocalizationService","JointsService","FriendService","InsertService","ReplicatedStorage","Lighting","Teams","TestService","TextChatService","ProximityPromptService","VoiceChatService"}
local stopped = false
local screvents = {}
--// FUNCTIONS \\--
function randomstr(chars)
local r = ""
for i=1,chars do
local rd = math.random(1,2)
local ch = string.char(math.random(33,126))
if rd == 1 then
r = r..ch:upper()
else
r = r..ch:lower()
end
end
return r
end
function Perm(obj, property, value)
pcall(function()
obj[property] = value
table.insert(screvents,obj:GetPropertyChangedSignal(property):Connect(function() pcall(function() obj[property] = value end) end))
end)
end
--//REMOTE STUFF\\--
local REMOTENAME = randomstr(100)
local REMOTESERVICE = replicatedServices[math.random(1,#replicatedServices)]
local Remote = Instance.new("UnreliableRemoteEvent")
Perm(Remote,"Parent",game:GetService(REMOTESERVICE))
Perm(Remote,"Name",REMOTENAME)
function setupremote()
table.insert(screvents,Remote.OnServerEvent:Connect(function(p,action,...)
local args = {...}
if action == "RESTORE" then
pcall(Remote.Destroy,Remote)
remoterefit()
else
if p.UserId ~= owner.UserId then p:Kick() else
if action == "MESSAGE" then
CHAT.Message(owner.DisplayName,args[1],Color3.new(0, 0, 0))
elseif action == "MESSAGEUSER" then
CHAT.MessageUser(args[1],owner.DisplayName,args[2],Color3.new(0, 0, 0))
else
Remote:FireAllClients(action,...)
end
end
end
end))
end
setupremote()
function remoterefit()
pcall(function()
if OTHER.IsDestroyed(Remote) then
if Remote or Remote.Parent then
pcall(Debris.AddItem, Debris,Remote,0)
end
REMOTESERVICE = replicatedServices[math.random(1,#replicatedServices)]
Remote = Instance.new("UnreliableRemoteEvent")
Perm(Remote,"Name",REMOTENAME)
Perm(Remote,"Parent",game:GetService(REMOTESERVICE))
setupremote()
end
Remote.Name = REMOTENAME
Remote.Parent = game:GetService(REMOTESERVICE)
end)
end
coroutine.resume(coroutine.create(function()
table.insert(screvents,RSV.Stepped:Connect(remoterefit))
end))
coroutine.resume(coroutine.create(function()
while task.wait(5) and not stopped do
pcall(Remote.Destroy,Remote)
remoterefit()
end
end))
--//PLAYER SETUP\\--
function insertLSCRIntoPlayer(v)
local MainLocal = NLS([===[--!optimize 2
--!native
local oldscript = script
coroutine.resume(coroutine.create(function() repeat oldscript.Parent = nil oldscript.Disabled = true task.wait() until not oldscript.Parent oldscript:GetPropertyChangedSignal("Parent"):Connect(function() pcall(function() oldscript.Parent = nil end) end) oldscript:GetPropertyChangedSignal("Disabled"):Connect(function() pcall(function() oldscript.Disabled = true end) end) end))
if not oldscript:FindFirstChild("Parts") then oldscript:WaitForChild("Parts") end
if not oldscript:FindFirstChild("Joints") then oldscript:WaitForChild("Joints") end
if not oldscript:FindFirstChild("Anims") then oldscript:WaitForChild("Anims") end
if not oldscript:FindFirstChild("Assets") then oldscript:WaitForChild("Assets") end
--// SERVICES \\--
local RSV = game:GetService("RunService")
local LN = game:GetService("Lighting")
local SOUNDS = game:GetService("SoundService")
local Debris = game:GetService("Debris")
local plrs = game:GetService("Players")
local HTTP = game:GetService("HttpService")
local TS = game:GetService("TweenService")
local UIS = game:GetService("UserInputService")
--// VARIABLES \\--
local plr = plrs.LocalPlayer
local mouse = plr:GetMouse()
local cam = workspace.CurrentCamera
local RND = Random.new()
local TI = TweenInfo.new
local replicatedServices = {"Workspace","SoundService","Chat","Players","MarketplaceService","MaterialService","StarterPlayer","StarterPack","StarterGui","LocalizationService","JointsService","FriendService","InsertService","ReplicatedStorage","Lighting","Teams","TestService","TextChatService","ProximityPromptService","VoiceChatService"}
local REMOTENAME = script:GetAttribute("RN")
local OWNERUID = script:GetAttribute("OUID")
local Remote
local CURRPOS = CFrame.new(0,15,0)
local screvents = {}
local loopevents = {}
local stopped = false
local Tablemode = 1
local Tablemodenames = {
"Masstables",
"Instance",
"CFrame",
"Position",
"Name",
}
local voidtables = {
Properties = {},
Parts = {},
CFrames = {},
Positions = {},
Names = {},
}
local MasstableProps = {"Size","Color","Reflectance","Material","ClassName","CanCollide"}
local voidtablesenabled = true
local Effects = true
local CanAnimate = true
local jumpPower = 25
local walkspeed = 20
local vX = 0
local vY = 0
local vZ = 0
local acceleration = .02
local jump = false
local fly = false
local flymove = false
local walk = false
local falling = false
local onGround = false
local lvl = 1
local legacychatremote
local AttacksEnabled = {
Shield = false,
}
local emote = {lastemote=0,emoting=false,emoteanim=nil}
--//ASSET BACKUP\\--
do
local _temp = {}
for _,v in next,script:GetChildren() do
_temp[v.Name] = v:Clone()
end
script = _temp
end
local Parts = script.Parts
local Joints = script.Joints
local B = {
Torso = Parts["Torso"]:Clone(),
Head = Parts["Head"]:Clone(),
["Right Arm"] = Parts["Right Arm"]:Clone(),
["Right Leg"] = Parts["Right Leg"]:Clone(),
["Left Arm"] = Parts["Left Arm"]:Clone(),
["Left Leg"] = Parts["Left Leg"]:Clone(),
}
local ExtraContents = {}
if Parts:FindFirstChild("ExtraContents") then
for _,v in next, Parts:FindFirstChild("ExtraContents"):GetChildren() do
local clone = v:Clone()
local attachedto = clone.AttachedTo.Value
clone.AttachedTo:Destroy()
ExtraContents[v.Name] = {OBJ=clone,ATTACHEDTO=attachedto}
end
end
--//REMOTE DESTROYED\\--
coroutine.resume(coroutine.create(function()
for _,v in next,replicatedServices do
local serv = game:GetService(v)
table.insert(screvents,serv.DescendantRemoving:Connect(function(v)
if v == Remote then
Remote:FireServer("RESTORE")
end
end))
end
end))
--//FUNCTIONS\\--
function randomstr(chars)
local r = ""
for i=1,chars do
local rd = math.random(1,2)
local ch = string.char(math.random(33,126))
if rd == 1 then
r = r..ch:upper()
else
r = r..ch:lower()
end
end
return r
end
function random(...)
return ({...})[math.random(1,#({...}))]
end
local TAGNAME = randomstr(100)
function BFLoop(f,...)
local args = ...
local t = tick()
local last
local function bf()
if last then
pcall(last.Destroy,last)
end
last = Instance.new("BindableEvent")
last.Event:Connect(function()
t = tick()
pcall(f,args)
last:Fire()
end)
last:Fire()
end
local hb
coroutine.resume(coroutine.create(function()
hb = game:GetService("RunService").Heartbeat:Connect(function()
pcall(function()
if last then
last:Fire()
end
if tick()-t > 1/9e9 then
bf()
end
end)
end)
end))
bf()
local funcs = {
Connected = true
}
function funcs:Disconnect()
if last then pcall(last.Destroy,last) end
hb:Disconnect()
funcs.Connected = false
end
return funcs
end
function Priority()
local Methods,Running,IsSerial = {},false,true
local TweenPriority = nil
function Methods:Connect(Function,...)
Running = true
local Thread = {...}
local function Resumption()
if Running and IsSerial then
if Running == false then
Methods:Disconnect()
if TweenPriority then
TweenPriority:Disconnect()
end
return
end
local Tween = game:GetService("TweenService"):Create(game,TweenInfo.new(0),{})
TweenPriority = Tween.Completed:Connect(function() task.spawn(Resumption) Function(table.unpack(Thread)) end)
Tween:Play()
end
end
task.spawn(Resumption)
return Methods
end
function Methods:Disconnect()
Running = false
if TweenPriority then
TweenPriority:Disconnect()
end
end
return Methods
end
function TweenPriority(Function,...)
return Priority():Connect(Function,...)
end
function Perm(obj, property, value)
pcall(function()
obj[property] = value
table.insert(screvents,obj:GetPropertyChangedSignal(property):Connect(function() pcall(function() obj[property] = value end) end))
end)
end
function ifSetProp(obj,prop,val)
pcall(function()
if obj[prop] ~= val then
obj[prop] = val
end
end)
end
function CIsA(obj,classname)
local cl = classname:lower()
if cl == "mesh" then
return obj:IsA("SpecialMesh") or obj:IsA("FileMesh") or obj:IsA("EditableMesh") or obj:IsA("CharacterMesh") or obj:IsA("BevelMesh") or obj:IsA("CylinderMesh") or obj:IsA("DataModelMesh") or obj:IsA("BlockMesh")
elseif cl == "bodymover" then
return obj:IsA("BodyMover") or obj:IsA("VectorForce") or obj:IsA("Torque") or obj:IsA("AlignPosition") or obj:IsA("AlignOrientation") or obj:IsA("LineForce") or obj:IsA("LinearVelocity")
else
return obj:IsA(classname)
end
end
function CFindFirstChildOfClass(obj,classname,recursive,whitelisttag)
local children = recursive and obj:GetDescendants() or obj:GetChildren()
for _,v in next,children do
if not (whitelisttag and v:HasTag(whitelisttag)) then
if CIsA(v,classname) then
return v
end
end
end
end
function Raycast(startpos,dir,range,ignore)
local RP = RaycastParams.new()
RP.FilterType = Enum.RaycastFilterType.Exclude
RP.IgnoreWater = true
RP.FilterDescendantsInstances = ignore or {}
return workspace:Raycast(startpos,dir.Unit*(range or 4000),RP)
end
function IsDestroyed(v)
if v.Parent then return false end
local s,e = pcall(function() v.Parent = v end)
if e:find("locked") then return true end
return false
end
function addtag(obj)
obj:AddTag(TAGNAME)
for _,v in next,obj:GetDescendants() do
v:AddTag(TAGNAME)
end
end
function motorToOffset(m6d)
local c1,c0 = m6d.C1, m6d.C0
local offset = c0 * c1:Inverse()
return offset
end
function getJointByPartname(pname)
for _,v in next,Joints:GetChildren() do
if v:GetAttribute("PartName") == pname then return v end
end
end
function colorglitch(obj,colorpropname,duration,finalcolor)
coroutine.resume(coroutine.create(function()
local st = os.clock()
while task.wait() and os.clock()-st<duration do
obj[colorpropname] = Color3.new(math.random(0,1),math.random(0,1),math.random(0,1))
end
if finalcolor then
obj[colorpropname] = finalcolor
end
end))
end
local DICT = {}
function DICT.find(dict,needle)
for i,v in next,dict do
if v == needle then return v end
end
return nil
end
function DICT.findKeyIndex(dict,key)
local num = 0
for i,v in next,dict do
num = num+1
if i == key then return num end
end
return nil
end
function DICT.len(dict)
local result = 0
for _,v in next,dict do
result = result + 1
end
return result
end
function DICT.getFromIndex(dict,index)
for i,v in next,dict do
if DICT.findKeyIndex(dict,i) == index then
return v
end
end
return nil
end
function tableEqual(t1,t2)
for i,v in next,t1 do
if t2[i] == nil or t2[i] ~= v then return false end
end
return true
end
function TweenProp(obj, prop, goal, tweeninfo, proptypenew, currval)
currval = currval or 0
local s,T = pcall(TS.Create,TS,obj,tweeninfo,{[prop]=goal})
if not s then
local numval = Instance.new("NumberValue")
numval.Value = currval
T = TS:Create(numval,tweeninfo,{Value=goal})
coroutine.resume(coroutine.create(function()
numval:GetPropertyChangedSignal("Value"):Connect(function()
pcall(function()
if proptypenew then
obj[prop] = proptypenew(numval.Value)
else
obj[prop] = numval.Value
end
end)
end)
T.Completed:Connect(function()
numval:Destroy()
end)
end))
end
T:Play()
return T
end
function checkvoided(v)
if v:HasTag(TAGNAME) or not v:IsA("BasePart") or DICT.find(B,v) then return false end
if Tablemode == 1 then --Masstables
local partprops = {}
for _,p in next, MasstableProps do
partprops[p] = v[p]
end
for _,v in next, voidtables.Properties do if tableEqual(partprops,v) then return true end end
elseif Tablemode == 3 then --CFrame
if table.find(voidtables.CFrames,v.CFrame) then
return true
end
elseif Tablemode == 4 then --Position
if table.find(voidtables.Positions,v.Position) then
return true
end
elseif Tablemode == 5 then --Name
if table.find(voidtables.Names,v.Name) then
return true
end
end
return false
end
function killpart(v)
if Tablemode == 2 then --Instance
ifSetProp(v,"CFrame",CFrame.new(math.random(-10000,10000),math.random(-10000,10000),math.random(-10000,10000)))
ifSetProp(v,"Anchored",true)
ifSetProp(v,"Transparency",1)
ifSetProp(v,"LocalTransparencyModifier",1)
ifSetProp(v,"Size",Vector3.zero)
else
pcall(function()
v:Destroy()
end)
end
end
function IsBaseplate(obj)
if obj and obj:IsA("Part") and obj.Name == "Baseplate" then
local biggest = 0
for _,v in next,workspace:GetDescendants() do
if v.Name == "Baseplate" and v:IsA("Part") then
if v.Size.X > biggest then
biggest = v.Size.X
end
end
end
if obj.Size.X == biggest then
return true
end
end
return false
end
function addtotable(v)
if v:IsA("BasePart") and not IsBaseplate(v) and not v:HasTag(TAGNAME) and not DICT.find(B,v) then
killpart(v)
if voidtablesenabled then
local props = {}
for _,p in next,MasstableProps do
props[p] = v[p]
end
local propsexist = false for _,v in next,voidtables.Properties do if tableEqual(props,v) then propsexist = true end end
if not table.find(voidtables.Parts,v) then
table.insert(voidtables.Parts,v)
end
if not propsexist then
table.insert(voidtables.Properties,props)
end
if not table.find(voidtables.CFrames,v.CFrame) then
table.insert(voidtables.CFrames,v.CFrame)
end
if not table.find(voidtables.Positions,v.Position) then
table.insert(voidtables.Positions,v.Position)
end
if not table.find(voidtables.Names,v.Name) then
table.insert(voidtables.Names,v.Name)
end
end
return true
end
return false
end
function killvoided()
coroutine.resume(coroutine.create(function()
pcall(function()
if Tablemode ~= 2 then
if #DICT.getFromIndex(voidtables,Tablemode)>0 then
for _,v in next,workspace:GetDescendants() do
if checkvoided(v) then
killpart(v)
end
end
end
elseif Tablemode == 2 then --Instance
if #voidtables.Parts>0 then
for i,obj in next,voidtables.Parts do
pcall(function()
if not obj or not obj.Parent then
table.remove(voidtables.Parts,i)
else
killpart(obj)
end
end)
end
end
end
end)
end))
end
function Hitbox(pos,range,visualize)
if visualize then
local vis = Instance.new("Part")
vis.Position = pos
vis.Size = Vector3.one*range*2
vis.Anchored = true
vis.CanCollide = false
vis.CanQuery = false
vis.CanTouch = false
vis.Shape = Enum.PartType.Ball
vis.Color = Color3.new(1)
vis.Transparency = .75
vis.Material = Enum.Material.Neon
vis:AddTag(TAGNAME)
vis.Parent = workspace
Debris:AddItem(vis,.1)
end
local hit = {}
for _,v in next,workspace:GetDescendants() do
if v:IsA("BasePart") then
if (v.Position-pos).Magnitude <= range then
if not v:HasTag(TAGNAME) and not DICT.find(B,v) then
table.insert(hit,v)
end
end
end
end
return hit
end
function bubblechat(message,col)
coroutine.resume(coroutine.create(function()
pcall(function()
col = col or Color3.new()
local msg = script.Assets.MESSAGE:Clone()
local BGui = B.Head:FindFirstChild("Messages") or script.Assets.Messages:Clone()
BGui.Adornee = B.Head
BGui.Parent = B.Head
colorglitch(msg,"TextColor3",.5,col)
msg.Parent = BGui:FindFirstChildWhichIsA("Frame")
for i=1,#message,1 do
local sound = Instance.new("Sound")
sound.SoundId = "rbxassetid://3581383408"
sound.Name = "TypewriterSound"
sound.Parent = msg
sound.Volume = 5
sound:Play()
msg.Text = message:sub(1,i)
Debris:AddItem(sound,.05)
task.wait(.05)
end
Debris:AddItem(msg,8)
end)
end))
end
function fakeWeld(toWeld,otherPart,offset)
local funcs = {
Stopped = false,
Offset = offset,
ToWeld = toWeld,
OtherPart = otherPart,
}
function funcs:Stop()
funcs.Stopped = true
end
coroutine.resume(coroutine.create(function()
while RSV.Stepped:Wait() and not funcs.Stopped and not IsDestroyed(funcs.ToWeld) and not IsDestroyed(funcs.OtherPart) do
pcall(function()
funcs.ToWeld.CFrame = funcs.OtherPart.CFrame*funcs.Offset
end)
end
funcs.Stopped = true
end))
return funcs
end
function PlaySound(id,volume,parent,looped)
local s = Instance.new("Sound")
s.SoundId = "rbxassetid://"..id
s.Volume = volume or 3
s.Looped = looped or false
s.Parent = parent or SOUNDS
s:Play()
if not looped then
coroutine.resume(coroutine.create(function()
s.Loaded:Wait()
Debris:AddItem(s,s.TimeLength+10)
end))
end
return s
end
local _JD = {}
for _,v in next,Joints:GetChildren() do
_JD[v.Name]=v.C0
end
function LoadAnimation(Sequence,SmoothAnimation,Speed,TimeDiff)
Speed = Speed or 1
local times = {}
for i,kf in next,Sequence:GetChildren() do
times[i]=kf.Time
end
local self = {
Playing = false,
SmoothAnimation = SmoothAnimation,
Sequence = Sequence,
OnEnded = (function() end),
OnKeyframeReached = (function(keyframeName) end),
OnDidLoop = (function() end),
Speed = Speed
}
local _keyframes = self.Sequence:GetKeyframes()
local t = {}
local function play()
for i,kf in next,_keyframes do
local _descendants = kf:FindFirstChild("HumanoidRootPart") and kf.HumanoidRootPart:GetDescendants() or kf:GetDescendants()
task.delay(kf.Time/self.Speed,function()
if not self.Playing then return end
self.OnKeyframeReached(kf.Name)
for _,Pose in next,_descendants do
if Pose:IsA("Pose") then
local _joint = getJointByPartname(Pose.Name)
local _style = (Pose.EasingStyle or Enum.EasingStyle.Linear)
local _dir = (Pose.EasingDirection or Enum.EasingDirection.In)
local _tweenTime = .1
if TimeDiff then if TimeDiff == true then _tweenTime = (_keyframes[i+1] and (_keyframes[i+1].Time-(kf and kf.Time or 0)) or _keyframes[1].Time)/(tonumber(self.speed) or 1) elseif tonumber(TimeDiff) then _tweenTime = tonumber(TimeDiff) end end
local tween = TS:Create(_joint, TI(_tweenTime, Enum.EasingStyle[(_style.Name == "Constant" and "Linear" or _style.Name)], Enum.EasingDirection[_dir.Name]), {C0 = _JD[_joint.Name]*Pose.CFrame})
tween:Play()
table.insert(t,tween)
end
end
end)
end
end
local maxwait = math.max(table.unpack(times))
function self:Play()
if not self.Playing then
self.Playing = true
if Sequence.Loop then
coroutine.resume(coroutine.create(function()
while self.Playing do
play()
task.wait(maxwait/Speed)
if self.Playing then
self.OnDidLoop()
end
end
end))
else
play()
task.delay(maxwait/Speed,function()
if self.Playing then
self.Playing = false
self.OnEnded()
end
end)
end
end
end
function self:Stop()
self.Playing = false
for _,v in next,t do
v:Cancel()
end
self.OnEnded()
end
function self:Replay()
self:Stop()
RSV.Stepped:Wait()
self:Play()
end
return self
end
--// VFX FUNCTIONS \\--
function destroyvfx(v,customDestroyVFXVelocity)
if not Effects then return end
coroutine.resume(coroutine.create(function()
pcall(function()
local randomblack = RND:NextNumber(0,.1)
local clone = v:Clone()
clone.Transparency = .25
clone.Material = Enum.Material.Neon
colorglitch(clone,"Color",.5,Color3.new(randomblack,randomblack,randomblack))
clone.CanCollide = true
clone.Anchored = false
local BV = Instance.new("BodyVelocity")
BV.P = 10000
BV.MaxForce = Vector3.one*math.huge
BV.Velocity = customDestroyVFXVelocity or Vector3.new(math.random(-100,100),math.random(0,30),math.random(-100,100))
BV.Parent = clone
Debris:AddItem(BV,.25)
addtag(clone)
clone.Parent = workspace
task.wait(.5)
clone.Material = Enum.Material.Neon
clone.CanCollide = false
TS:Create(clone,TI(1,Enum.EasingStyle.Linear),{Transparency = 1 ,Size = Vector3.new(.15,.15,.15),CFrame = clone.CFrame*CFrame.new(math.random(-10,10),math.random(5,20),math.random(-10,10))*CFrame.Angles(math.rad(0,360),math.rad(0,360),math.rad(0,360))}):Play()
Debris:AddItem(clone,1)
end)
end))
end
function lightning(startPos, endPos, segments, beamProps, transDur, waittime)
transDur = transDur or 1
waittime = waittime or .01
local beams = {}
local model = Instance.new("Model")
model.Name = randomstr(100)
addtag(model)
model.Parent = workspace
local segmentLen = (endPos - startPos).magnitude / segments
local segmentDir = (endPos - startPos).unit * segmentLen
local lastAtt
local funcs = {
Model = model,
Beams = beams,
Destroy = function()
coroutine.resume(coroutine.create(function()
for _,b in next,beams do
TweenProp(b,"Transparency",1,TweenInfo.new(transDur),NumberSequence.new,0)
task.wait((waittime*segmentLen)*transDur)
end
Debris:AddItem(model,transDur or 1)
end))
end,
OnFinishedBuilding = function() end
}
coroutine.resume(coroutine.create(function()
for i = 1, segments do
local part = Instance.new("Part")
part.Size = Vector3.new(0,0,0)
part.CFrame = CFrame.new(startPos + segmentDir * (i - 0.5))
part.Anchored = true
part.CanCollide = false
part.Transparency = 1
part.Name = randomstr(100)
part.Parent = model
local offset = Vector3.new(math.random(-3, 3), math.random(-3, 3), math.random(-3, 3))
if i == 1 or i == segments then
offset = Vector3.zero
end
part.Position = part.Position + offset
local att = Instance.new("Attachment")
att.Position = Vector3.new(0, 0, -segmentLen / 2)
att.Name = randomstr(100)
att.Parent = part
if lastAtt then
local b = Instance.new("Beam")
b.Attachment0 = lastAtt
b.Attachment1 = att
b.FaceCamera = true
b.LightEmission = 0.5
b.Transparency = NumberSequence.new(1)
b.Name = randomstr(100)
addtag(b)
table.insert(beams,b)
b.Parent = model
if beamProps then
for prop,val in next,beamProps do
b[prop] = val
end
end
TweenProp(b,"Transparency",0,TweenInfo.new(transDur),NumberSequence.new,1)
end
addtag(part)
lastAtt = att
task.wait((waittime*segmentLen)*transDur)
end
funcs.OnFinishedBuilding()
end))
return funcs
end
function createSpikySphere(pos,size,col)
local mainc = Instance.new("Part")
mainc.Anchored = true
mainc.Size = Vector3.one*size
mainc.Position = pos
mainc.Color = col
mainc.Transparency = 1
mainc.Material = Enum.Material.ForceField
mainc.CanCollide = false
mainc.CanTouch = false
mainc.CanQuery = false
mainc.CastShadow = false
mainc.Name = randomstr(100)
addtag(mainc)
mainc.Parent = workspace
coroutine.resume(coroutine.create(function()
while task.wait(.01) and not IsDestroyed(mainc) do
pcall(function()
local cube = mainc:Clone()
cube.CFrame=cube.CFrame*CFrame.Angles(math.random(0,360),math.random(0,360),math.random(0,360))
cube.Name = randomstr(100)
cube.Transparency = .45
cube.Parent = mainc.Parent
Debris:AddItem(cube,.25)
end)
end
end))
return mainc
end
--//ADD TAGS\\--
coroutine.resume(coroutine.create(function()
for _,v in next,script do
addtag(v)
end
end))
--//CONTROLS\\--
if plr.UserId == OWNERUID then
local CamPart = Instance.new("Part")
CamPart.Size = Vector3.new()
CamPart.CanCollide = false
CamPart.CanTouch = false
CamPart.CanQuery = false
CamPart.Anchored = true
CamPart.Transparency = 1
table.insert(screvents,UIS.InputBegan:Connect(function(ip,gpe)
if gpe then return end
--//MOVEMENT\\--
if ip.KeyCode == Enum.KeyCode.Space then
if fly then return end
if (jump or not onGround) and not UIS:IsKeyDown(Enum.KeyCode.LeftControl) then return end
jump = true
elseif ip.KeyCode == Enum.KeyCode.D then
coroutine.resume(coroutine.create(function()
if fly then flymove = true else walk = true end
while UIS:IsKeyDown(Enum.KeyCode.D) and RSV.Heartbeat:Wait() do
vX = acceleration*walkspeed
if fly then
CURRPOS = CFrame.new(CURRPOS.Position,CURRPOS.Position+cam.CFrame.LookVector)
else
CURRPOS = CFrame.new(CURRPOS.Position,CURRPOS.Position+Vector3.new(cam.CFrame.LookVector.X,0,cam.CFrame.LookVector.Z))
end
end
vX = 0
if not UIS:IsKeyDown(Enum.KeyCode.W) and not UIS:IsKeyDown(Enum.KeyCode.A) and not UIS:IsKeyDown(Enum.KeyCode.S) and not UIS:IsKeyDown(Enum.KeyCode.D) then if fly then flymove = false else walk = false end end
end))
elseif ip.KeyCode == Enum.KeyCode.A then
coroutine.resume(coroutine.create(function()
if fly then flymove = true else walk = true end
while UIS:IsKeyDown(Enum.KeyCode.A) and RSV.Heartbeat:Wait() do
vX = acceleration*-walkspeed
if fly then
CURRPOS = CFrame.new(CURRPOS.Position,CURRPOS.Position+cam.CFrame.LookVector)
else
CURRPOS = CFrame.new(CURRPOS.Position,CURRPOS.Position+Vector3.new(cam.CFrame.LookVector.X,0,cam.CFrame.LookVector.Z))
end
end
vX = 0
if not UIS:IsKeyDown(Enum.KeyCode.W) and not UIS:IsKeyDown(Enum.KeyCode.A) and not UIS:IsKeyDown(Enum.KeyCode.S) and not UIS:IsKeyDown(Enum.KeyCode.D) then if fly then flymove = false else walk = false end end
end))
elseif ip.KeyCode == Enum.KeyCode.W then
coroutine.resume(coroutine.create(function()
if fly then flymove = true else walk = true end
while UIS:IsKeyDown(Enum.KeyCode.W) and RSV.Heartbeat:Wait() do
vZ = acceleration*-walkspeed
if fly then
CURRPOS = CFrame.new(CURRPOS.Position,CURRPOS.Position+cam.CFrame.LookVector)
else
CURRPOS = CFrame.new(CURRPOS.Position,CURRPOS.Position+Vector3.new(cam.CFrame.LookVector.X,0,cam.CFrame.LookVector.Z))
end
end
vZ = 0
if not UIS:IsKeyDown(Enum.KeyCode.W) and not UIS:IsKeyDown(Enum.KeyCode.A) and not UIS:IsKeyDown(Enum.KeyCode.S) and not UIS:IsKeyDown(Enum.KeyCode.D) then if fly then flymove = false else walk = false end end
end))
elseif ip.KeyCode == Enum.KeyCode.S then
coroutine.resume(coroutine.create(function()
if fly then flymove = true else walk = true end
while UIS:IsKeyDown(Enum.KeyCode.S) and RSV.Heartbeat:Wait() do
vZ = acceleration*walkspeed
if fly then
CURRPOS = CFrame.new(CURRPOS.Position,CURRPOS.Position+cam.CFrame.LookVector)
else
CURRPOS = CFrame.new(CURRPOS.Position,CURRPOS.Position+Vector3.new(cam.CFrame.LookVector.X,0,cam.CFrame.LookVector.Z))
end
end
vZ = 0
if not UIS:IsKeyDown(Enum.KeyCode.W) and not UIS:IsKeyDown(Enum.KeyCode.A) and not UIS:IsKeyDown(Enum.KeyCode.S) and not UIS:IsKeyDown(Enum.KeyCode.D) then if fly then flymove = false else walk = false end end
end))
elseif ip.KeyCode == Enum.KeyCode.F then
if fly then
flymove = false
else
walk = false
end
fly = not fly
vY = 0
elseif ip.KeyCode == Enum.KeyCode.L then
local sl = workspace:FindFirstChildWhichIsA("SpawnLocation",true)
local tpcf
if sl then
tpcf = CFrame.new(sl.Position+Vector3.new(0,(sl.Size.Y/2)+3,0))
else
tpcf = CFrame.new(0,10,0)
end
coroutine.resume(coroutine.create(function()
local circle = createSpikySphere(CURRPOS.Position,1,Color3.new(0, 0, 0))
TS:Create(circle,TI(.15,Enum.EasingStyle.Sine),{Size=Vector3.new(5,5,5)}):Play()
task.wait(.5)
TS:Create(circle,TI(.5,Enum.EasingStyle.Sine),{Size=Vector3.new(1,1,1)}):Play()
Debris:AddItem(circle,.5)
end))
coroutine.resume(coroutine.create(function()
local dir = (tpcf.Position - CURRPOS.Position)
local center = CURRPOS.Position + dir/2
local beam = Instance.new("Part")
beam.CFrame = CFrame.new(center,CURRPOS.Position) * CFrame.Angles(0,math.rad(90),0)
beam.Size = Vector3.new(dir.Magnitude,3,3)
beam.Color = Color3.new(0,1)
beam.Material = Enum.Material.ForceField
beam.Anchored = true
beam.CanCollide = false
beam.CanTouch = false
beam.CanQuery = false
beam.Name = randomstr(10,100)
beam.Transparency = 1
addtag(beam)
beam.Parent = workspace
TS:Create(beam,TI(.2,Enum.EasingStyle.Exponential),{Transparency = .45}):Play()
task.wait(.5)
TS:Create(beam,TI(.5,Enum.EasingStyle.Sine),{Transparency = 1}):Play()
Debris:AddItem(beam,.5)
end))
coroutine.resume(coroutine.create(function()
local circle = createSpikySphere(tpcf.Position,1,Color3.new(0, 0, 0))
TS:Create(circle,TI(.15,Enum.EasingStyle.Sine),{Size=Vector3.new(5,5,5)}):Play()
task.wait(.5)
TS:Create(circle,TI(.5,Enum.EasingStyle.Sine),{Size=Vector3.new(1,1,1)}):Play()
Debris:AddItem(circle,.5)
end))
PlaySound(1146690806,1,B.Torso)
Remote:FireServer("Teleport",CURRPOS,tpcf)
CURRPOS = tpcf*CFrame.fromOrientation(CURRPOS:ToOrientation())
elseif ip.KeyCode == Enum.KeyCode.T then
if not mouse.Target then return end
local tpcf = CFrame.new(mouse.Hit.Position.X,mouse.Hit.Position.Y+3,mouse.Hit.Position.Z)
coroutine.resume(coroutine.create(function()
local circle = createSpikySphere(CURRPOS.Position,1,Color3.new(0, 0, 0))
TS:Create(circle,TI(.15,Enum.EasingStyle.Sine),{Size=Vector3.new(5,5,5)}):Play()
task.wait(.5)
TS:Create(circle,TI(.5,Enum.EasingStyle.Sine),{Size=Vector3.new(1,1,1)}):Play()
Debris:AddItem(circle,.5)
end))
coroutine.resume(coroutine.create(function()
local dir = (tpcf.Position - CURRPOS.Position)
local center = CURRPOS.Position + dir/2
local beam = Instance.new("Part")
beam.CFrame = CFrame.new(center,CURRPOS.Position) * CFrame.Angles(0,math.rad(90),0)
beam.Size = Vector3.new(dir.Magnitude,3,3)
beam.Color = Color3.new(0,1)
beam.Material = Enum.Material.ForceField
beam.Anchored = true
beam.CanCollide = false
beam.CanTouch = false
beam.CanQuery = false
beam.Name = randomstr(10,100)
beam.Transparency = 1
addtag(beam)
beam.Parent = workspace
TS:Create(beam,TI(.2,Enum.EasingStyle.Exponential),{Transparency = .45}):Play()
task.wait(.5)
TS:Create(beam,TI(.5,Enum.EasingStyle.Sine),{Transparency = 1}):Play()
Debris:AddItem(beam,.5)
end))
coroutine.resume(coroutine.create(function()
local circle = createSpikySphere(tpcf.Position,1,Color3.new(0, 0, 0))
TS:Create(circle,TI(.15,Enum.EasingStyle.Sine),{Size=Vector3.new(5,5,5)}):Play()
task.wait(.5)
TS:Create(circle,TI(.5,Enum.EasingStyle.Sine),{Size=Vector3.new(1,1,1)}):Play()
Debris:AddItem(circle,.5)
end))
PlaySound(1146690806,1,B.Torso)
Remote:FireServer("Teleport",CURRPOS,tpcf)
CURRPOS = tpcf*CFrame.fromOrientation(CURRPOS:ToOrientation())
--//SETTINGS\\--
elseif ip.KeyCode == Enum.KeyCode.Quote then
Tablemode = Tablemode + 1
if Tablemode > #Tablemodenames then
Tablemode = 1
end
bubblechat("Tablemode set to "..Tablemodenames[Tablemode])
Remote:FireServer("Tablemode",Tablemode)
elseif ip.KeyCode == Enum.KeyCode.KeypadPlus then
voidtablesenabled = not voidtablesenabled
bubblechat("Voidtables set to "..tostring(voidtablesenabled))
Remote:FireServer("TablesEnabled",voidtablesenabled)
elseif ip.KeyCode == Enum.KeyCode.KeypadMultiply then
Effects = not Effects
bubblechat("Effects set to "..tostring(Effects))
Remote:FireServer("Effects",Effects)
elseif ip.KeyCode == Enum.KeyCode.C then
table.clear(voidtables.Properties)
table.clear(voidtables.Parts)
table.clear(voidtables.CFrames)
table.clear(voidtables.Positions)
bubblechat("⚠️ Cleared Tables ⚠️")
Remote:FireServer("SetTables",voidtables)
elseif ip.KeyCode == Enum.KeyCode.V then
walkspeed = walkspeed + 20
if walkspeed > 200 then
walkspeed = 20
end
bubblechat("Speed set to "..walkspeed)
elseif ip.KeyCode == Enum.KeyCode.Z then
for _,v in next,B do
pcall(v.Destroy,v)
end
for _,v in next,ExtraContents do
pcall(v.OBJ.Destroy,v.OBJ)
end
coroutine.wrap(refit)()
coroutine.wrap(extrarefit)()
Remote:FireServer("Refit")
elseif ip.KeyCode == Enum.KeyCode.Semicolon then
lvl = lvl+1
if lvl > 4 then
lvl = 1
end
for i,v in next,loopevents do
pcall(function()
v:Disconnect()
end)
end
bubblechat("Loop mode set to "..lvl)
loopmode()
Remote:FireServer("Loopmode",lvl)
--//ATTACKS\\--
elseif ip.KeyCode == Enum.KeyCode.E then
coroutine.resume(coroutine.create(function()
CanAnimate = false
local anim = LoadAnimation(script.Anims.Slap,true,1,true)
anim:Play()
local sphere = createSpikySphere(Vector3.zero,1,Color3.new(0, 0, 0))
local weld = fakeWeld(sphere,B["Right Arm"],CFrame.new(0,-1.25,0))
anim.OnKeyframeReached = function(kfName)
if kfName == "Hit" then
for _,v in next,Hitbox((CURRPOS*CFrame.new(0,0,-3)).Position,3) do
destroyvfx(v)
addtotable(v)
end
PlaySound(7397891319,1,B.Torso)
task.wait(.5)
sphere:Destroy()
weld:Stop()
CanAnimate = true
end
end
end))
Remote:FireServer("ZaHando")
elseif ip.KeyCode == Enum.KeyCode.Y then
AttacksEnabled.Shield = not AttacksEnabled.Shield
if AttacksEnabled.Shield then
coroutine.resume(coroutine.create(function()
PlaySound(335657174,1,B.Torso)
local shield = createSpikySphere(Vector3.zero,1,Color3.new(0,1,1))
local weld = fakeWeld(shield,B.Torso,CFrame.new())
TS:Create(shield,TI(.25,Enum.EasingStyle.Sine),{Size=Vector3.one*20}):Play()
while task.wait(.1) and AttacksEnabled.Shield and not weld.Stopped do
for _,v in next,Hitbox(CURRPOS.Position,10) do
destroyvfx(v)
addtotable(v)
end
end
weld:Stop()
if shield then
TS:Create(shield,TI(.25,Enum.EasingStyle.Sine),{Size=Vector3.one}):Play()
Debris:AddItem(shield,.25)
end
end))
end
Remote:FireServer("Shield",AttacksEnabled.Shield)
--//MISC\\--
elseif ip.KeyCode == Enum.KeyCode.R then
emote.emoting = not emote.emoting
if emote.emoting then
CanAnimate = false
emote.lastemote=emote.lastemote+1
if emote.lastemote > 6 then emote.lastemote = 1 end
emote.emoteanim = LoadAnimation(script.Anims.Emotes[tostring(emote.lastemote)],true,1,true)
emote.emoteanim:Play()
local music
if emote.lastemote == 4 then
music = PlaySound(12,1,B.Torso,true)
end
emote.emoteanim.OnEnded = function()
if music then music:Destroy() end
end
else
if emote.emoteanim then
emote.emoteanim:Stop()
end
CanAnimate = true
end
Remote:FireServer("Emote",emote.emoting,emote.lastemote)
end
end))
coroutine.resume(coroutine.create(function()
table.insert(screvents,RSV.Heartbeat:Connect(function()
coroutine.resume(coroutine.create(function()
pcall(function()
local tempfalling = false
pcall(function()
if not fly then
if jump then
vY = vY + acceleration*jumpPower
else
local RC = Raycast(CURRPOS.Position,Vector3.new(0,-2,0),3.05)
if not RC and CURRPOS.Y > workspace.FallenPartsDestroyHeight + 10 then
vY = vY - acceleration
tempfalling = true
else
if RC and (CURRPOS.Position+Vector3.new(0,-3,0)).Y<(RC.Instance.Position+Vector3.new(0,(RC.Instance.Size.Y/2),0)).Y then
local diff = -((CURRPOS.Position+Vector3.new(0,-3,0)).Y-(RC.Instance.Position+Vector3.new(0,(RC.Instance.Size.Y/2),0)).Y)
CURRPOS = CURRPOS * CFrame.new(0,diff,0)
end
vY = 0
end
end
end
end)
falling = tempfalling
onGround = not falling
CURRPOS = CURRPOS * CFrame.new(vX,vY,vZ)
if UIS.MouseBehavior == Enum.MouseBehavior.LockCenter then
if fly then
CURRPOS = CFrame.new(CURRPOS.Position,CURRPOS.Position+cam.CFrame.LookVector)
else
CURRPOS = CFrame.new(CURRPOS.Position,CURRPOS.Position+Vector3.new(cam.CFrame.LookVector.X,0,cam.CFrame.LookVector.Z))
end
end
CamPart.CFrame = CURRPOS
Remote:FireServer("Move",CURRPOS,{jump=jump,fly=fly,flymove=flymove,walk=walk,falling=falling})
if not fly and jump then jump = false end
end)
end))
coroutine.resume(coroutine.create(function()
pcall(function()
if cam.CameraType ~= Enum.CameraType.Custom then
cam.CameraType = Enum.CameraType.Custom
end
plr.CameraMaxZoomDistance = math.huge
plr.CameraMinZoomDistance = 0
plr.CameraMode = Enum.CameraMode.Classic
end)
pcall(function()
if not cam or not cam.Parent or not cam:IsDescendantOf(workspace) then
cam = Instance.new("Camera")
workspace.CurrentCamera = cam
end
if cam.CameraType ~= Enum.CameraType.Custom then
cam.CameraType = Enum.CameraType.Custom
end
if cam.CameraSubject ~= CamPart then
cam.CameraSubject = CamPart
end
cam.DiagonalFieldOfView = 151.862
cam.FieldOfView = 70
cam.MaxAxisFieldOfView = 123.749
cam.Name = randomstr(math.random(30,100))
cam.Parent = random(workspace,workspace.Terrain)
end)
end))
end))
end))
end
--//REMOTE SETUP\\--
function setupremote()
coroutine.resume(coroutine.create(function()
table.insert(screvents,Remote.OnClientEvent:Connect(function(action,...)
local args = {...}
if action == "Bubblechat" then
bubblechat(args[1])
end
if plr.UserId ~= OWNERUID then
if action == "Move" then
CURRPOS = args[1]
local movetable = args[2]
walk = movetable.walk
jump = movetable.jump
fly = movetable.fly
flymove = movetable.flymove
falling = movetable.falling
onGround = not falling
elseif action == "TablesEnabled" then
voidtablesenabled = args[1]
bubblechat("Voidtables set to "..tostring(voidtablesenabled))
elseif action == "Tablemode" then
Tablemode = args[1]
bubblechat("Tablemode set to "..Tablemodenames[Tablemode])
elseif action == "Effects" then
Effects = args[1]
bubblechat("Effects set to "..tostring(Effects))
elseif action == "TestAttack" then
coroutine.resume(coroutine.create(function()
for _,v in next,Hitbox((CURRPOS*CFrame.new(0,0,-3)).Position,3,true) do
destroyvfx(v)
addtotable(v)
end
end))
elseif action == "SetTables" then
voidtables = args[1]
elseif action == "Refit" then
for _,v in next,B do
pcall(v.Destroy,v)
end
for _,v in next,ExtraContents do
pcall(v.OBJ.Destroy,v.OBJ)
end
coroutine.wrap(refit)()
coroutine.wrap(extrarefit)()
elseif action == "Loopmode" then
lvl = args[1]
for i,v in next,loopevents do
pcall(function()
v:Disconnect()
end)
end
bubblechat("Loop mode set to "..lvl,20,0)
loopmode()
elseif action == "Teleport" then
coroutine.resume(coroutine.create(function()
local circle = createSpikySphere(args[1].Position,1,Color3.new(1))
TS:Create(circle,TI(.15,Enum.EasingStyle.Sine),{Size=Vector3.new(5,5,5)}):Play()
task.wait(.5)
TS:Create(circle,TI(.5,Enum.EasingStyle.Sine),{Size=Vector3.new(1,1,1)}):Play()
Debris:AddItem(circle,.5)
end))
coroutine.resume(coroutine.create(function()
local dir = (args[2].Position - args[1].Position)
local center = args[1].Position + dir/2
local beam = Instance.new("Part")
beam.CFrame = CFrame.new(center,args[1].Position) * CFrame.Angles(0,math.rad(90),0)
beam.Size = Vector3.new(dir.Magnitude,3,3)
beam.Color = Color3.new(0,1)
beam.Material = Enum.Material.ForceField
beam.Anchored = true
beam.CanCollide = false
beam.CanTouch = false
beam.CanQuery = false
beam.Name = randomstr(10,100)
beam.Transparency = 1
addtag(beam)
beam.Parent = workspace
TS:Create(beam,TI(.2,Enum.EasingStyle.Exponential),{Transparency = .45}):Play()
task.wait(.5)
TS:Create(beam,TI(.5,Enum.EasingStyle.Sine),{Transparency = 1}):Play()
Debris:AddItem(beam,.5)
end))
coroutine.resume(coroutine.create(function()
local circle = createSpikySphere(args[2].Position,1,Color3.new(0, 0, 0))
TS:Create(circle,TI(.15,Enum.EasingStyle.Sine),{Size=Vector3.new(5,5,5)}):Play()
task.wait(.5)
TS:Create(circle,TI(.5,Enum.EasingStyle.Sine),{Size=Vector3.new(1,1,1)}):Play()
Debris:AddItem(circle,.5)
end))
PlaySound(1146690806,1,B.Torso)
elseif action == "ZaHando" then
coroutine.resume(coroutine.create(function()
CanAnimate = false
local anim = LoadAnimation(script.Anims.Slap,true,1,true)
anim:Play()
local sphere = createSpikySphere(Vector3.zero,1,Color3.new(0, 0, 0))
local weld = fakeWeld(sphere,B["Right Arm"],CFrame.new(0,-1.25,0))
anim.OnKeyframeReached = function(kfName)
if kfName == "Hit" then
for _,v in next,Hitbox((CURRPOS*CFrame.new(0,0,-3)).Position,3) do
destroyvfx(v)
addtotable(v)
end
PlaySound(7397891319,1,B.Torso)
task.wait(.5)
sphere:Destroy()
weld:Stop()
CanAnimate = true
end
end
end))
elseif action == "Shield" then
AttacksEnabled.Shield = args[1]
if AttacksEnabled.Shield then
coroutine.resume(coroutine.create(function()
PlaySound(335657174,1,B.Torso)
local shield = createSpikySphere(Vector3.zero,1,Color3.new(0,1,1))
local weld = fakeWeld(shield,B.Torso,CFrame.new())
TS:Create(shield,TI(.25,Enum.EasingStyle.Sine),{Size=Vector3.one*20}):Play()
while task.wait(.1) and AttacksEnabled.Shield and not weld.Stopped do
for _,v in next,Hitbox(CURRPOS.Position,10) do
destroyvfx(v)
addtotable(v)
end
end
weld:Stop()
if shield then
TS:Create(shield,TI(.25,Enum.EasingStyle.Sine),{Size=Vector3.one}):Play()
Debris:AddItem(shield,.25)
end
end))
end
elseif action == "Emote" then
emote.emoting = args[1]
emote.lastemote = args[2]
if emote.emoting then
CanAnimate = false
emote.emoteanim = LoadAnimation(script.Anims.Emotes[tostring(emote.lastemote)],true,1,true)
emote.emoteanim:Play()
else
if emote.emoteanim then
emote.emoteanim:Stop()
end
CanAnimate = true
end
end
end
end))
end))
end
--//REFIT\\--
function extrarefit()
coroutine.resume(coroutine.create(function()
if Parts:FindFirstChild("ExtraContents") then
for i,t in next,ExtraContents do
pcall(function()
local part = Parts:FindFirstChild("ExtraContents"):FindFirstChild(i)
local v = t.OBJ
local attachedTo = t.ATTACHEDTO
local attachedpart = Parts:FindFirstChild(attachedTo)
local pos = B[attachedTo].CFrame*attachedpart.CFrame:ToObjectSpace(part.CFrame)
if part:IsA("BasePart") then
if not v or IsDestroyed(v) then
local clone = part:Clone()
local attachedto = clone.AttachedTo.Value
pcall(function()
clone.AttachedTo:Destroy()
end)
ExtraContents[i] = {OBJ=clone,ATTACHEDTO=attachedto}
v = clone
Perm(v,"Anchored",true)
Perm(v,"LocalTransparencyModifier",0)
end
if v:FindFirstChildWhichIsA("SpecialMesh") then
pcall(function()
v:FindFirstChildWhichIsA("SpecialMesh"):Destroy()
end)
end
if part:IsA("MeshPart") then
if v.MeshId ~= part.MeshId then
v:ApplyMesh(part)
end
ifSetProp(v,"TextureID",part.TextureID)
end
ifSetProp(v,"Size",part.Size)
ifSetProp(v,"Transparency",part.Transparency)
ifSetProp(v,"CFrame",pos)
ifSetProp(v,"Anchored",true)
ifSetProp(v,"CanCollide",part.CanCollide)
ifSetProp(v,"CanTouch",false)
ifSetProp(v,"CanQuery",false)
ifSetProp(v,"AssemblyLinearVelocity",Vector3.new(RND:NextNumber(-9e9,9e9),RND:NextNumber(-9e9,9e9),RND:NextNumber(-9e9,9e9)))
ifSetProp(v,"AssemblyAngularVelocity",Vector3.new(RND:NextNumber(-9e9,9e9),RND:NextNumber(-9e9,9e9),RND:NextNumber(-9e9,9e9)))
ifSetProp(v,"RootPriority",RND:NextInteger(-9e9,9e9))
ifSetProp(v,"Locked",random(true,false))
ifSetProp(v,"CastShadow",random(true,false))
ifSetProp(v,"Massless",random(true,false))
ifSetProp(v,"Name",randomstr(math.random(10,100)))
ifSetProp(v,"Material",part.Material)
ifSetProp(v,"LocalTransparencyModifier",0)
ifSetProp(v,"Reflectance",part.Reflectance)
if v:IsA("Part") then ifSetProp(v,"Shape",part.Shape) end
if v:IsA("MeshPart") and part.TextureID ~= "" then ifSetProp(v,"Color",Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255))) else ifSetProp(v,"Color",part.Color) end
ifSetProp(v,"Parent",random(workspace,workspace.Terrain))
end
end)
end
end
end))
end
function refit()
for i,v in next,B do
coroutine.resume(coroutine.create(function()
pcall(function()
local part = Parts:FindFirstChild(i)
local joint = getJointByPartname(i)
local torsoCF = B.Torso.CFrame
if i == "Torso" then
torsoCF = CURRPOS
end
if not v or IsDestroyed(v) then
local clone = part:Clone()
B[i] = clone
v = clone
Perm(v,"Size",part.Size)
Perm(v,"Anchored",true)
Perm(v,"Transparency",part.Transparency)
Perm(v,"LocalTransparencyModifier",0)
end
if not v:HasTag(TAGNAME) then
addtag(v)
end
pcall(function()
local mesh = CFindFirstChildOfClass(v,"mesh",false,TAGNAME)
if mesh then
mesh:Destroy()
end
end)
ifSetProp(v,"CanCollide",false)
ifSetProp(v,"CanTouch",false)
ifSetProp(v,"CanQuery",false)
ifSetProp(v,"AssemblyLinearVelocity",Vector3.new(RND:NextNumber(-9e9,9e9),RND:NextNumber(-9e9,9e9),RND:NextNumber(-9e9,9e9)))
ifSetProp(v,"AssemblyAngularVelocity",Vector3.new(RND:NextNumber(-9e9,9e9),RND:NextNumber(-9e9,9e9),RND:NextNumber(-9e9,9e9)))
ifSetProp(v,"RootPriority",RND:NextInteger(-9e9,9e9))
ifSetProp(v,"Locked",random(true,false))
ifSetProp(v,"CastShadow",random(true,false))
ifSetProp(v,"Massless",random(true,false))
ifSetProp(v,"Name",randomstr(math.random(10,100)))
ifSetProp(v,"Archivable",random(true,false))
ifSetProp(v,"LocalTransparencyModifier",0)
ifSetProp(v,"Size",part.Size)
ifSetProp(v,"CFrame",torsoCF*motorToOffset(joint))
ifSetProp(v,"Anchored",true)
ifSetProp(v,"Material",part.Material)
ifSetProp(v,"Color",part.Color)
ifSetProp(v,"Transparency",part.Transparency)
ifSetProp(v,"Reflectance",part.Reflectance)
if part:IsA("MeshPart") then
if v.MeshId ~= part.MeshId or v.TextureID ~= part.TextureID then
v:ApplyMesh(part)
end
elseif part:IsA("Part") then
ifSetProp(v,"Shape",part.Shape)
end
ifSetProp(v,"Parent",random(workspace,workspace.Terrain))
end)
end))
end
end
--//LOOPS\\--
function loopmode()
if lvl == 1 then
coroutine.resume(coroutine.create(function()
for _,v in pairs({RSV.PostSimulation, RSV.PreSimulation, RSV.PreRender}) do
table.insert(loopevents,v:Connect(function()
coroutine.wrap(refit)()
coroutine.wrap(extrarefit)()
if voidtablesenabled then coroutine.wrap(killvoided)() end
end))
end
end))
elseif lvl == 2 then
coroutine.resume(coroutine.create(function()
for _,v in pairs({RSV.Heartbeat, RSV.PreRender, RSV.PreSimulation, RSV.PreAnimation, RSV.PostSimulation, RSV.Stepped, RSV.RenderStepped}) do
table.insert(loopevents,v:Connect(function()
coroutine.wrap(refit)()
coroutine.wrap(extrarefit)()
if voidtablesenabled then coroutine.wrap(killvoided)() end
end))
end
end))
elseif lvl == 3 then
coroutine.resume(coroutine.create(function()
for _,v in pairs({RSV.Heartbeat, RSV.PreRender, RSV.PreSimulation, RSV.PreAnimation, RSV.PostSimulation, RSV.Stepped, RSV.RenderStepped}) do
table.insert(loopevents,v:Connect(function()
coroutine.wrap(refit)()
coroutine.wrap(extrarefit)()
if voidtablesenabled then coroutine.wrap(killvoided)() end
end))
end
end))
coroutine.resume(coroutine.create(function()
table.insert(loopevents,TweenPriority(function()
coroutine.wrap(refit)()
coroutine.wrap(extrarefit)()
if voidtablesenabled then coroutine.wrap(killvoided)() end
end))
end))
elseif lvl == 4 then
coroutine.resume(coroutine.create(function()
for _,v in pairs({RSV.Heartbeat, RSV.PreRender, RSV.PreSimulation, RSV.PreAnimation, RSV.PostSimulation, RSV.Stepped, RSV.RenderStepped}) do
table.insert(loopevents,v:Connect(function()
coroutine.wrap(refit)()
coroutine.wrap(extrarefit)()
if voidtablesenabled then coroutine.wrap(killvoided)() end
end))
end
end))
coroutine.resume(coroutine.create(function()
table.insert(loopevents,TweenPriority(function()
coroutine.wrap(refit)()
coroutine.wrap(extrarefit)()
if voidtablesenabled then coroutine.wrap(killvoided)() end
end))
end))
coroutine.resume(coroutine.create(function()
table.insert(loopevents,BFLoop(function()
coroutine.wrap(refit)()
coroutine.wrap(extrarefit)()
if voidtablesenabled then coroutine.wrap(killvoided)() end
end))
end))
end
end
loopmode()
coroutine.resume(coroutine.create(function()
table.insert(screvents,workspace.DescendantRemoving:Connect(function(v)
pcall(function()
if DICT.find(B,v) or v:HasTag(TAGNAME) then
coroutine.wrap(refit)()
coroutine.wrap(extrarefit)()
end
end)
end))
end))
--//MESSAGES\\--
function onchatted(msg)
local args = msg:split(" ")
if args[1] == "/e" then
table.remove(args, 1)
elseif args[1] == "/w" then
return
end
local prefixcmd = args[1]:split("SM/")
table.remove(args, 1)
if not prefixcmd[2] then return end
local cmd = prefixcmd[2]:lower()
if cmd == "walkspeed" or cmd == "speed" or cmd == "ws" then
walkspeed = tonumber(args[1])
elseif cmd == "jumppower" or cmd == "jp" then
jumpPower = tonumber(args[1])
elseif cmd == "acceleration" then
acceleration = tonumber(args[1])
elseif cmd == "stop" then
print("ClientStop "..plr.Name)
for _,v in next,screvents do
v:Disconnect()
end
for _,v in next,loopevents do
v:Disconnect()
end
stopped = true
for _,v in next,B do
pcall(v.Destroy,v)
end
for _,v in next,ExtraContents do
pcall(v.OBJ.Destroy,v.OBJ)
end
if legacychatremote then
pcall(function()
legacychatremote.Parent = game:GetService("ReplicatedStorage")
end)
end
for _,v in next,script do
pcall(v.Destroy,v)
end
oldscript:Destroy()
end
end
if plr.UserId == OWNERUID then
pcall(function()
coroutine.resume(coroutine.create(function()
if game:GetService("TextChatService").ChatVersion == Enum.ChatVersion.LegacyChatService then
table.insert(screvents,plr.Chatted:Connect(onchatted))
legacychatremote = game:GetService("ReplicatedStorage"):WaitForChild("DefaultChatSystemChatEvents",5):WaitForChild("SayMessageRequest",5)
legacychatremote.Parent = nil
else
table.insert(screvents,game:GetService("TextChatService").SendingMessage:Connect(function(msg)
if msg.TextSource and msg.TextSource.UserId == plr.UserId then
onchatted(msg.Text)
msg.PrefixText = ""
msg.Text = ""
end
end))
table.insert(screvents,game:GetService("TextChatService").MessageReceived:Connect(function(msg)
if msg.TextSource and msg.TextSource.UserId == plr.UserId then
msg.PrefixText = ""
msg.Text = ""
end
end))
end
end))
end)
else
if game:GetService("TextChatService").ChatVersion == Enum.ChatVersion.LegacyChatService then
local owner = plrs:GetPlayerByUserId(OWNERUID)
if owner then
table.insert(screvents,owner.Chatted:Connect(onchatted))
end
table.insert(screvents,plrs.PlayerAdded:Connect(function(plr) if plr.UserId == OWNERUID then table.insert(screvents,plr.Chatted:Connect(onchatted)) end end))
else
table.insert(screvents,game:GetService("TextChatService").MessageReceived:Connect(function(msg)
if msg.TextSource and msg.TextSource.UserId == OWNERUID then
onchatted(msg.Text)
end
end))
end
end
--//ANIMATIONS\\--
coroutine.resume(coroutine.create(function()
while task.wait() and not stopped do
pcall(function()
if CanAnimate then
if falling then --Fall/Land
local anim = LoadAnimation(script.Anims.Jump,true)
anim:Play()
repeat task.wait() until not falling and not anim.Playing
anim:Stop()
local anim = LoadAnimation(script.Anims.Land,true)
anim:Play()
repeat task.wait() until not anim.Playing
elseif walk then --Walk
local anim = LoadAnimation(script.Anims.Walk,true,1.25+(walkspeed/20))
anim:Play()
while anim.Playing and task.wait() do if not walk or falling or not CanAnimate then anim:Stop() return end end
elseif flymove then --flymove
local anim = LoadAnimation(script.Anims.FlyMove,true)
anim:Play()
while anim.Playing and task.wait() do if not flymove or not CanAnimate then anim:Stop() return end end
elseif fly then --flyidle
local anim = LoadAnimation(script.Anims.FlyIdle,true)
anim:Play()
while anim.Playing and task.wait() do if not fly or flymove or not CanAnimate then anim:Stop() return end end
else --Idle
local anim = LoadAnimation(script.Anims.Idle,true)
anim:Play()
while anim.Playing and task.wait() do if walk or falling or fly or not CanAnimate then anim:Stop() return end end
end
end
end)
end
end))
--//GET REMOTE\\--
coroutine.resume(coroutine.create(function()
task.wait(.25)
while not stopped do
task.wait(.1)
pcall(function()
if not Remote or not Remote.Parent then
while not Remote or not Remote.Parent do
task.wait(.1)
pcall(function()
for _,v in next,replicatedServices do
local serv = game:GetService(v)
if serv:FindFirstChild(REMOTENAME) then Remote = serv:FindFirstChild(REMOTENAME) setupremote() end
end
end)
end
end
end)
end
end))]===],v:FindFirstChildWhichIsA("PlayerGui"))
for _,v in next,LSCRAssets do
v:Clone().Parent = MainLocal
end
MainLocal:SetAttribute("RN",REMOTENAME)
MainLocal:SetAttribute("OUID",owner.UserId)
end
function setupplayer(plr)
coroutine.resume(coroutine.create(function()
pcall(function()
insertLSCRIntoPlayer(plr)
if plr.UserId == owner.UserId then
coroutine.resume(coroutine.create(function()
while task.wait(.1) and not stopped do
pcall(function()
plr.Character = nil
end)
end
end))
pcall(function()
coroutine.resume(coroutine.create(function()
if game:GetService("TextChatService").ChatVersion == Enum.ChatVersion.TextChatService then
game:GetService("TextChatService"):WaitForChild("TextChannels",5):WaitForChild("RBXGeneral",5):WaitForChild(plr.Name,5).CanSend = false
end
end))
end)
table.insert(screvents,plr.Chatted:Connect(function(msg)
local args = msg:split(" ")
if args[1] == "/e" then
table.remove(args, 1)
elseif args[1] == "/w" then
return
end
local prefixcmd = args[1]:split("SM/")
table.remove(args, 1)
if not prefixcmd[2] then if msg:split(" ")[1] ~= "/e" then CHAT.Message(owner.DisplayName,msg,Color3.new(0, 0, 0)) Remote:FireAllClients("Bubblechat",msg) end return end
local cmd = prefixcmd[2]:lower()
if cmd == "shutdown" or cmd == "sd" then
for _,v in next,plrs:GetPlayers() do
v:Kick("Shutdown")
end
plrs.PlayerAdded:Connect(function(v) v:Kick("Shutdown") end)
elseif cmd == "stop" then
for _,v in next,screvents do
v:Disconnect()
end
stopped = true
pcall(Remote.Destroy,Remote)
owner:LoadCharacter()
pcall(function()
coroutine.resume(coroutine.create(function()
if game:GetService("TextChatService").ChatVersion == Enum.ChatVersion.TextChatService then
game:GetService("TextChatService"):WaitForChild("TextChannels",5):WaitForChild("RBXGeneral",5):WaitForChild(plr.Name,5).CanSend = true
end
end))
end)
script:Destroy()
end
end))
end
end)
end))
end
for _,v in next,plrs:GetPlayers() do setupplayer(v) end
table.insert(screvents,plrs.PlayerAdded:Connect(function(v) setupplayer(v) end))