Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --| |--
- --| |--
- --| Welcome to using iSpringfield's Commands! |--
- --| |--
- --| |--
- --| This script is created |--
- --| by a group of mastered |--
- --| game designers. This script |--
- --| is fairly simple, as long |--
- --| as you read the "README" |--
- --| at line 51. It's basically |--
- --| all you need to know about |--
- --| this script! Enjoy! |--
- --| |--
- --| ~Game Maker Studios |--
- -- \\ // --
- -- {{CONFIGURATION}} --
- -- // \\ --
- -- ADMINS
- local owners = {"iSpringfield","kingblood1945","Redetzky","08C"} -- people who have most permissions, but CANNOT be unadmined.
- local admins = {"jnickib","ikiled"}
- local Everybody_Has_Admin = false -- true if you want EVERYBODY (no spasific names, just everyone) to have admin.
- -- BANNED
- local banned = {"nubcaik","person you hate","noob"}
- -- ECT.
- local Anti_Lag_Mode = false -- 'true' if you want the script to run in anti-lag mode.
- local Bet = ";" -- the thing that goes between the "kill;noob". Can only be 1 diget.
- local Auto_Updating = false -- recommended true, but sometimes people don't want the updated version.
- local Super_Safe_Chatter_Supported = false -- true if you're a safechatter (don't have a chat bar)
- local Can_Use_Cmdbar = true -- true if you want the admins/owners to be able to say "cmdbar;"
- local oldAnimationOnEnter = true -- true if you DON'T want the old character animation.
- -- \\ // --
- -- {{README}} --
- -- // \\ --
- readMeFile = [==[
- Thanks for using our script. This script was created by 3 great people:
- -08C, coded the script
- -Redetzky, command/interface ideas, advertising, images, and testing
- -iSpringfield, vehicles, command/interface ideas, and testing
- This script ALSO supports safe-chatters. Due to it's ability
- to have a command bar - it can be used by any ROBLOX users.
- The `Bet` is meant to only be 1 diget. If it's more than 1 diget,
- the script will not reconize the command, and you won't be able to use the
- commands.
- Say "cmds;" to view the list of all commands, hover your mouse over a command
- of your interest to view an example of the command, with a short definition
- of what the command does.
- Please note that this script is NOT meant for use at ANY Script Builder. It requirs all
- it's internal components that are stored in this script - do not delete any stored objects inside of this script.
- This script is NOT leaked, nor gives it's creators unfair access. We are a honest group.
- This script is very unique, due to it's abilities and effects. Hope you enjoy.
- ]==];
- -- \\ // --
- -- {{UPDATE HISTORY}} --
- -- // \\ --
- updateHistory = [==[
- -- Update V4 --
- >fixed crashing when a player sits on a hover vehicle and then a player cleans server
- >removed "move" command due to errors
- >new auto-updating
- >new commands
- >fixed onEnter functions (ban, banlist, private server, ect.) which were apparently removed by Roblox...? anyways...
- >added "admins" command
- ]==];
- -- \\ // --
- -- {{DO NOT EDIT}} --
- -- // \\ --
- if not script:FindFirstChild("Script") and not script:FindFirstChild("Local") and not script:FindFirstChild("version") then
- script.Disabled = true
- end
- local services = {
- ["Players"] = game:GetService('Players') ;
- ["Workspace"] = game:GetService('Workspace') ;
- ["Lighting"] = game:GetService('Lighting') ;
- ["Debris"] = game:GetService('Debris') ;
- ["InsertService"] = game:GetService('InsertService') ;
- }
- local clean = {}
- _G.GameMakerStudios_cmds = {}
- local yes,Yes,YES,no,No,NO = true,true,true,false,false,false
- local serverLock = false
- local props = script:FindFirstChild("props") or services["Lighting"]:FindFirstChild("props")
- local soloGame = game:FindFirstChild("NetworkClient") == nil
- local chats = {}
- local adminConfig,AdminsConfig,OwnersConfig
- --
- if soloGame then Super_Safe_Chatter_Supported = true end
- if Super_Safe_Chatter_Supported then Can_Use_Cmdbar = true end
- function fixadmins()
- local c = services["Lighting"]:FindFirstChild("GameMakerStudios_Admins")
- if c then
- admins = {}
- owners = {}
- for _,a in pairs(c.Admins:GetChildren()) do
- if a:IsA("StringValue") then
- table.insert(admins,a.Value)
- end
- end
- for _,o in pairs(c.Owners:GetChildren()) do
- if o:IsA("StringValue") then
- table.insert(admins,o.Value)
- end
- end
- else
- adminConfig = Instance.new("Configuration",services["Lighting"])
- adminConfig.Name = "GameMakerStudios_Admins"
- AdminsConfig = Instance.new("Configuration",adminConfig)
- AdminsConfig.Name = "Admins"
- OwnersConfig = Instance.new("Configuration",adminConfig)
- OwnersConfig.Name = "Owners"
- for _,v in pairs(admins) do
- local new = Instance.new("StringValue",AdminsConfig)
- new.Name = "UNACCESSABLE"
- new.Value = v
- local t = Instance.new("StringValue",new)
- t.Value = "Admin"
- t.Name = "RANK"
- end
- for _,v in pairs(owners) do
- local new = Instance.new("StringValue",OwnersConfig)
- new.Name = "UNACCESSABLE"
- new.Value = v
- local t = Instance.new("StringValue",new)
- t.Value = "Owner"
- t.Name = "RANK"
- end
- end
- end
- fixadmins()
- function isAdmin(player)
- if Everybody_Has_Admin then return true; end
- if isOwner(player) then return true end
- for _,ee in pairs(AdminsConfig:GetChildren()) do
- if ee.Value:lower() == player.Name:lower() then
- return true
- end
- end
- return false
- end
- function isOwner(player)
- if player.userId == game.CreatorId then return true; end
- for _,ee in pairs(OwnersConfig:GetChildren()) do
- if ee.Value:lower() == player.Name:lower() then
- return true
- end
- end
- return false
- end
- function addChat(text)
- table.insert(chats,{text,tick()})
- end
- function addAdmin(player)
- if isAdmin(player) then return end
- local new = Instance.new("StringValue",AdminsConfig)
- new.Value = player.Name
- new.Name = "UNACCESSABLE"
- local t = Instance.new("StringValue",new)
- t.Name = "RANK"
- t.Value = "Admin"
- end
- function unAdmin(player)
- print("loading unadmin " .. player.Name)
- for _,v in pairs(AdminsConfig:GetChildren()) do
- if v.Value:lower() == player.Name:lower() then v:Destroy() end
- end
- end
- function Animate(player)
- coroutine.resume(coroutine.create(function()
- while not player and not player.Parent and not player.Character do wait() end
- wait()
- if player.Character then
- for _,v in pairs(player.Character:GetChildren()) do if v.Name == "Animate" then v:Destroy() end end
- localscript([[
- script.Name = "Animate"
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- -- ANIMATION
- -- declarations
- local Figure = script.Parent
- local Torso = waitForChild(Figure, "Torso")
- local RightShoulder = waitForChild(Torso, "Right Shoulder")
- local LeftShoulder = waitForChild(Torso, "Left Shoulder")
- local RightHip = waitForChild(Torso, "Right Hip")
- local LeftHip = waitForChild(Torso, "Left Hip")
- local Neck = waitForChild(Torso, "Neck")
- local Humanoid = waitForChild(Figure, "Humanoid")
- local pose = "Standing"
- local toolAnim = "None"
- local toolAnimTime = 0
- local jumpMaxLimbVelocity = 0.75
- -- functions
- function onRunning(speed)
- if speed>0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- pose = "Jumping"
- end
- function onClimbing()
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- pose = "FreeFall"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- pose = "PlatformStanding"
- end
- function onSwimming(speed)
- if speed>0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function moveJump()
- RightShoulder.MaxVelocity = jumpMaxLimbVelocity
- LeftShoulder.MaxVelocity = jumpMaxLimbVelocity
- RightShoulder:SetDesiredAngle(3.14)
- LeftShoulder:SetDesiredAngle(-3.14)
- RightHip:SetDesiredAngle(0)
- LeftHip:SetDesiredAngle(0)
- end
- -- same as jump for now
- function moveFreeFall()
- RightShoulder.MaxVelocity = jumpMaxLimbVelocity
- LeftShoulder.MaxVelocity = jumpMaxLimbVelocity
- RightShoulder:SetDesiredAngle(3.14)
- LeftShoulder:SetDesiredAngle(-3.14)
- RightHip:SetDesiredAngle(0)
- LeftHip:SetDesiredAngle(0)
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder:SetDesiredAngle(3.14 /2)
- LeftShoulder:SetDesiredAngle(-3.14 /2)
- RightHip:SetDesiredAngle(3.14 /2)
- LeftHip:SetDesiredAngle(-3.14 /2)
- end
- function getTool()
- for _, kid in ipairs(Figure:GetChildren()) do
- if kid.className == "Tool" then return kid end
- end
- return nil
- end
- function getToolAnim(tool)
- for _, c in ipairs(tool:GetChildren()) do
- if c.Name == "toolanim" and c.className == "StringValue" then
- return c
- end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- RightShoulder:SetDesiredAngle(1.57)
- return
- end
- if (toolAnim == "Slash") then
- RightShoulder.MaxVelocity = 0.5
- RightShoulder:SetDesiredAngle(0)
- return
- end
- if (toolAnim == "Lunge") then
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightHip.MaxVelocity = 0.5
- LeftHip.MaxVelocity = 0.5
- RightShoulder:SetDesiredAngle(1.57)
- LeftShoulder:SetDesiredAngle(1.0)
- RightHip:SetDesiredAngle(1.57)
- LeftHip:SetDesiredAngle(1.0)
- return
- end
- end
- function move(time)
- local amplitude
- local frequency
- if (pose == "Jumping") then
- moveJump()
- return
- end
- if (pose == "FreeFall") then
- moveFreeFall()
- return
- end
- if (pose == "Seated") then
- moveSit()
- return
- end
- local climbFudge = 0
- if (pose == "Running") then
- if (RightShoulder.CurrentAngle > 1.5 or RightShoulder.CurrentAngle < -1.5) then
- RightShoulder.MaxVelocity = jumpMaxLimbVelocity
- else
- RightShoulder.MaxVelocity = 0.15
- end
- if (LeftShoulder.CurrentAngle > 1.5 or LeftShoulder.CurrentAngle < -1.5) then
- LeftShoulder.MaxVelocity = jumpMaxLimbVelocity
- else
- LeftShoulder.MaxVelocity = 0.15
- end
- amplitude = 1
- frequency = 9
- elseif (pose == "Climbing") then
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- amplitude = 1
- frequency = 9
- climbFudge = 3.14
- else
- amplitude = 0.1
- frequency = 1
- end
- desiredAngle = amplitude * math.sin(time*frequency)
- RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
- LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
- RightHip:SetDesiredAngle(-desiredAngle)
- LeftHip:SetDesiredAngle(-desiredAngle)
- local tool = getTool()
- if tool then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- toolAnim = "None"
- toolAnimTime = 0
- end
- end
- -- connect events
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(onJumping)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.GettingUp:connect(onGettingUp)
- Humanoid.FreeFalling:connect(onFreeFall)
- Humanoid.FallingDown:connect(onFallingDown)
- Humanoid.Seated:connect(onSeated)
- Humanoid.PlatformStanding:connect(onPlatformStanding)
- Humanoid.Swimming:connect(onSwimming)
- -- main program
- local runService = game:service("RunService");
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- ]],player.Character)
- end
- end))
- end
- function Script(source,parent)
- coroutine.resume(coroutine.create(function()
- local new = script:FindFirstChild("Script")
- if new then
- local clone = new:Clone()
- clone.code.Value = source
- clone.Parent = parent
- clone.Disabled = false
- end
- end))
- end
- function localscript(source,parent)
- coroutine.resume(coroutine.create(function()
- local new = script:FindFirstChild("Local")
- if new then
- local clone = new:Clone()
- clone.code.Value = source
- clone.Parent = parent
- clone.Disabled = false
- end
- end))
- end
- function waitForProperty(parent,name,waittime)
- local starttime=tick()
- while parent[name]==nil and (not waittime or tick()<starttime+waittime) do
- wait()
- end
- return parent[name]
- end
- function waitForChild(parent,name,waittime)
- local starttime=tick()
- while parent:FindFirstChild(name)==nil and (not waittime or tick()<starttime+waittime) do
- wait()
- end
- return parent:FindFirstChild(name)
- end
- function addCmd(keyword,desc,func)
- table.insert(_G.GameMakerStudios_cmds,{keyword,desc,func})
- end
- function BannedAction(player)
- coroutine.resume(coroutine.create(function()
- for _,name in pairs(banned) do
- if name:lower() == player.Name:lower() then
- localscript("local player = game:GetService('Players').LocalPlayer\
- player.Parent = nil\
- wait()\
- player.Parent = game:GetService('Players')",waitForChild(player,"Backpack",10000))
- Announce("SYSTEM",(player.Name .. " has been removed due to banishment."))
- end
- end
- player:WaitForDataReady();wait()
- if player:LoadBoolean("gameMakerStudios_BANNED") then
- localscript("local player = game:GetService('Players').LocalPlayer\
- player.Parent = nil\
- wait()\
- player.Parent = game:GetService('Players')",waitForChild(player,"Backpack",10000))
- Announce("SYSTEM",(player.Name .. " has been removed due to banishment."))
- end
- end))
- end
- function Announce(head,msg)
- for _,player in pairs(services["Players"]:GetPlayers()) do
- coroutine.resume(coroutine.create(function()
- Message(player,head,msg,"C O N F I R M")
- end))
- end
- end
- function Message(player,heading,message,buttonText)
- coroutine.resume(coroutine.create(function()
- localscript([[
- for _,v in pairs(script.Parent:GetChildren()) do
- if v.Name == "gameMakerStudios_MSG" then
- coroutine.resume(coroutine.create(function()
- if v:IsA("ScreenGui") then
- v.msg:TweenSizeAndPosition(UDim2.new(0,2,0,2),UDim2.new(0.5,0,0.5,0))
- wait(1)
- v:Destroy()
- end
- if v:IsA("LocalScript") or v:IsA("Script") then v:Destroy() end
- end))
- end
- end
- script.Name = "gameMakerStudios_MSG"
- local gui = Instance.new("ScreenGui",script.Parent) gui.Name = "gameMakerStudios_MSG"
- local frame = Instance.new("Frame",gui) frame.Name = "msg"
- local tb = Instance.new("TextButton",frame) tb.Name = "Button"
- local tl = Instance.new("TextLabel",frame) tl.Name = "Label"
- local hdr = Instance.new("TextLabel",frame)
- local decoration = Instance.new("Frame",tb)
- frame.Style = "RobloxRound"
- frame.Position = UDim2.new(0.5,0,0.5,0)
- frame.ClipsDescendants = true
- tb.Position = UDim2.new(0.25,0,0.9)
- tb.Size = UDim2.new(0.5,0,0.1,0)
- tb.ZIndex = 2
- tb.BackgroundColor3 = Color3.new(0,0,0)
- tb.BorderSizePixel = 0
- tb.Text = "]] .. buttonText .. [["
- tb.Font = "Legacy"
- tb.TextColor3 = Color3.new(1,1,1)
- tb.TextScaled = true
- tb.TextWrapped = true
- tl.BackgroundTransparency = 1
- tl.BorderSizePixel = 0
- tl.Position = UDim2.new(0,0,0,0)
- tl.Size = UDim2.new(1,0,0.8,0)
- tl.ZIndex = 2
- tl.Font = "ArialBold"
- tl.FontSize = "Size18"
- tl.TextColor3 = Color3.new(1,1,1)
- tl.Text = "]] .. message .. [["
- tl.TextWrapped = true
- hdr.Position = UDim2.new(0.5,0,0,0)
- hdr.BorderSizePixel = 0
- hdr.ZIndex = 2
- hdr.Font = "SourceSansBold"
- hdr.FontSize = "Size18"
- hdr.Text = "]] .. heading .. [["
- hdr.TextColor3 = Color3.new(1,1,1)
- hdr.TextWrapped = true
- decoration.BackgroundTransparency = .7
- decoration.Size = UDim2.new(1,0,0.5,0)
- decoration.BorderSizePixel = 0
- decoration.ZIndex = 3
- tb.MouseButton1Click:connect(function()
- frame:TweenSizeAndPosition(UDim2.new(0,2,0,2),UDim2.new(0.5,0,0.5,0))
- wait(1)
- gui:Destroy()
- script:Destroy()
- end)
- frame:TweenSizeAndPosition(UDim2.new(0.6,0,0.6),UDim2.new(0.2,0,0.2,0))
- ]],waitForChild(player,"PlayerGui",5))
- end))
- end
- -- auto-updating
- if Auto_Updating then
- print("Game Maker Studios_Updating - Updating.")
- local id = 129547286
- local update = services["InsertService"]:LoadAsset(id)
- print("Game Maker Studios_Updating - loaded updated version.")
- if #update:GetChildren() <= 0 then update:Destroy() print("Game Maker Studios_Updating - Error while updating.") end
- local new = update:FindFirstChild("admin")
- if new then
- print("Game Maker Studios_Updating - Got new source.")
- local newV = new:FindFirstChild("version")
- if newV then
- print("Game Maker Studios_Updating - Got version.")
- if script:FindFirstChild("version") then
- print(type(newV.Value),type(script:FindFirstChild("version").Value))
- if newV.Value > script:FindFirstChild("version").Value then
- print("Game Maker Studios - An update has been found! Updating in progress...")
- new.Parent = services["Workspace"]
- new.Disabled = false
- print("Game Maker Studios - Update successful!")
- update:Destroy()
- script:Destroy()
- else
- print("Game Maker Studios_Updating - Update not required.")
- end
- end
- end
- end
- end
- -- tweening
- function TransformModel(objects, center, new, recurse)
- for _,object in pairs(objects) do
- if object:IsA("BasePart") then
- object.CFrame = new:toWorldSpace(center:toObjectSpace(object.CFrame))
- end
- if recurse then
- TransformModel(object:GetChildren(), center, new, true)
- end
- end
- end
- function move(obj,cframe)
- if obj:IsA("BasePart") then
- obj.CFrame = cframe
- end
- if obj:IsA("Model") or obj:IsA("Configuration") then
- TransformModel(obj:GetChildren(),obj:GetModelCFrame(),cframe,true)
- end
- if obj:IsA("Weld") then
- obj.C1 = cframe
- end
- end
- function QuaternionFromCFrame(cf)
- local mx, my, mz,
- m00, m01, m02,
- m10, m11, m12,
- m20, m21, m22 = cf:components()
- local trace = m00 + m11 + m22
- if trace > 0 then
- local s = math.sqrt(1 + trace)
- local recip = 0.5/s
- return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
- else
- local i = 0
- if m11 > m00 then i = 1 end
- if m22 > (i == 0 and m00 or m11) then i = 2 end
- if i == 0 then
- local s = math.sqrt(m00-m11-m22+1)
- local recip = 0.5/s
- return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
- elseif i == 1 then
- local s = math.sqrt(m11-m22-m00+1)
- local recip = 0.5/s
- return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
- elseif i == 2 then
- local s = math.sqrt(m22-m00-m11+1)
- local recip = 0.5/s
- return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
- end
- end
- end
- function QuaternionToCFrame(px, py, pz, x, y, z, w)
- local xs, ys, zs = x + x, y + y, z + z
- local wx, wy, wz = w*xs, w*ys, w*zs
- --
- local xx = x*xs
- local xy = x*ys
- local xz = x*zs
- local yy = y*ys
- local yz = y*zs
- local zz = z*zs
- --
- return CFrame.new(px, py, pz,
- 1-(yy+zz), xy - wz, xz + wy,
- xy + wz, 1-(xx+zz), yz - wx,
- xz - wy, yz + wx, 1-(xx+yy))
- end
- function QuaternionSlerp(a, b, t)
- local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
- local startInterp, finishInterp;
- if cosTheta >= 0.0001 then
- if (1 - cosTheta) > 0.0001 then
- local theta = math.acos(cosTheta)
- local invSinTheta = 1/math.sin(theta)
- startInterp = math.sin((1-t)*theta)*invSinTheta
- finishInterp = math.sin(t*theta)*invSinTheta
- else
- startInterp = 1-t
- finishInterp = t
- end
- else
- if (1+cosTheta) > 0.0001 then
- local theta = math.acos(-cosTheta)
- local invSinTheta = 1/math.sin(theta)
- startInterp = math.sin((t-1)*theta)*invSinTheta
- finishInterp = math.sin(t*theta)*invSinTheta
- else
- startInterp = t-1
- finishInterp = t
- end
- end
- return a[1]*startInterp + b[1]*finishInterp,
- a[2]*startInterp + b[2]*finishInterp,
- a[3]*startInterp + b[3]*finishInterp,
- a[4]*startInterp + b[4]*finishInterp
- end
- function _G:TweenObject(object, a, b, length,C1OrC0IfWeld)
- if object:IsA("Weld") or object:IsA("Manualweld") or object:IsA("Motor6D") then
- type_ = "weld"
- elseif object:IsA("BasePart") then
- type_ = "part"
- else
- type_ = "model"
- end
- local qa = {QuaternionFromCFrame(a)}
- local qb = {QuaternionFromCFrame(b)}
- local ax, ay, az = a.x, a.y, a.z
- local bx, by, bz = b.x, b.y, b.z
- --
- local c = 0
- local tot = 0
- --
- local startTime = tick()
- while true do
- wait()
- local t = (tick()-startTime)/length
- local _t = 1-t
- if t > 1 then break end
- local startT = tick()
- local cf = QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,
- QuaternionSlerp(qa, qb, t))
- tot = tot+(tick()-startT)
- c = c + 1
- if type_ == "weld" then
- object[C1OrC0IfWeld] = cf
- end
- if type_ == "model" then
- TransformModel(object:GetChildren(),object:GetModelCFrame(),cf,true)
- end
- if type_ == "part" then
- object.CFrame = cf
- end
- end
- if type_ == "weld" then
- object[C1OrC0IfWeld] = b
- end
- if type_ == "model" then
- TransformModel(object:GetChildren(),object:GetModelCFrame(),b,true)
- end
- if type_ == "part" then
- object.CFrame = b
- end
- end
- -- end of tweening
- local floor = math.floor
- local ceil = math.ceil
- local round = function(number)if floor(number) == number then return number end;if ceil(number) == number then return number end;local s = tostring(number);local decimal;local base;for i=1,#s do if s:sub(i,i) == "." then base = tonumber(s:sub(1,i-1));decimal = tonumber(s:sub(i));break;end;end;if decimal > .5 then return math.ceil(number) end;if decimal < .5 then return math.floor(number) end;if decimal == .5 then return math.floor(number) end;end
- function PlrIsAmin(player)
- coroutine.resume(coroutine.create(function()
- player:WaitForDataReady()
- if isAdmin(player) then
- while not player:FindFirstChild("PlayerGui") do wait() end
- Message(player,"Game Maker Studios","You're an admin, congrats!","C O N F I R M")
- end
- end))
- end
- function gp(speaker,text)
- local plr = speaker
- local str = text
- if str == "" then return {}; end
- local plrz = {} str = str:lower()
- if str == "all" then plrz = game.Players:children()
- elseif str == "others" then for i, v in pairs(game.Players:children()) do if v ~= plr then table.insert(plrz, v) end end
- else
- local sn = {1} local en = {}
- for i = 1, #str do if str:sub(i,i) == "," then table.insert(sn, i+1) table.insert(en,i-1) end end
- for x = 1, #sn do
- if (sn[x] and en[x] and str:sub(sn[x],en[x]) == "me") or (sn[x] and str:sub(sn[x]) == "me") then table.insert(plrz, plr)
- elseif (sn[x] and en[x] and str:sub(sn[x],en[x]) == "random") or (sn[x] and str:sub(sn[x]) == "random") then table.insert(plrz, game.Players:GetPlayers()[math.random(#game.Players:GetPlayers())])
- elseif (sn[x] and en[x] and str:sub(sn[x],en[x]) == "admins") or (sn[x] and str:sub(sn[x]) == "admins") then if isAdmin(plr) then for i, v in pairs(game.Players:GetPlayers()) do if isAdmin(v) then table.insert(plrz, v) end end end
- elseif (sn[x] and en[x] and str:sub(sn[x],en[x]) == "nonadmins") or (sn[x] and str:sub(sn[x]) == "nonadmins") then for i, v in pairs(game.Players:GetPlayers()) do if not isAdmin(v) then table.insert(plrz, v) end end
- elseif (sn[x] and en[x] and str:sub(sn[x],en[x]):sub(1,4) == "team") then
- if game:findFirstChild("Teams") then for a, v in pairs(game:GetService('Teams'):GetChildren()) do if v:IsA("Team") and str:sub(sn[x],en[x]):sub(6) ~= "" and v.Name:lower():find(str:sub(sn[x],en[x]):sub(6)) == 1 then
- for q, p in pairs(game.Players:GetPlayers()) do if p.TeamColor == v.TeamColor then table.insert(plrz, p) end end break
- end end end
- elseif (sn[x] and str:sub(sn[x]):sub(1,4):lower() == "team") then
- if game:findFirstChild("Teams") then for a, v in pairs(game.Teams:children()) do if v:IsA("Team") and str:sub(sn[x],en[x]):sub(6) ~= "" and v.Name:lower():find(str:sub(sn[x]):sub(6)) == 1 then
- for q, p in pairs(game.Players:GetPlayers()) do if p.TeamColor == v.TeamColor then table.insert(plrz, p) end end break
- end end end
- else
- for a, plyr in pairs(game.Players:GetPlayers()) do
- if (sn[x] and en[x] and str:sub(sn[x],en[x]) ~= "" and plyr.Name:lower():find(str:sub(sn[x],en[x])) == 1) or (sn[x] and str:sub(sn[x]) ~= "" and plyr.Name:lower():find(str:sub(sn[x])) == 1) or (str ~= "" and plyr.Name:lower():find(str) == 1) then
- table.insert(plrz, plyr) break
- end
- end
- end
- end
- end
- return plrz
- end
- function CmdBar(player)
- coroutine.resume(coroutine.create(function()
- Script([[
- for _,v in pairs(script.Parent:GetChildren()) do if v.Name == "CMDBAR" then v:Destroy() end end
- local player = script.Parent.Parent
- script.Name = "CMDBAR"
- local gui = Instance.new("ScreenGui",script.Parent)
- gui.Name = "CMDBAR"
- local tb = Instance.new("TextBox",gui)
- local f = Instance.new("Frame",tb)
- tb.Size = UDim2.new(0,220,0,30)
- tb.Position = UDim2.new(0,60,1,-30)
- tb.ZIndex = 2
- tb.Visible = true
- tb.BackgroundTransparency = 1
- tb.BorderSizePixel = 0
- tb.Text = "Type your command here."
- tb.Font = "ArialBold"
- tb.TextColor3 = Color3.new(1,1,1)
- tb.FontSize = "Size18"
- f.Style = "RobloxRound"
- f.ZIndex = 1
- f.Size = UDim2.new(1,4,1,4)
- f.Position = UDim2.new(0,-2,0,-2)
- f.BackgroundTransparency = 1
- f.BorderSizePixel = 0
- tb.Changed:connect(
- function()
- if tb.Text == "Type your command here." then return end
- _G:onChatted(player,tb.Text)
- tb.Text = "Type your command here."
- end
- )]],waitForChild(player,"PlayerGui",5))
- end))
- end
- addCmd("clone","clone" .. Bet .. "player | Clones the wanted player, moving the clone to their position.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player.Character then
- player.Character.Archivable = true
- local clone = player.Character:Clone()
- player.Character.Archivable = false
- clone.Parent = services["Workspace"]
- table.insert(clean,clone)
- clone:MakeJoints()
- clone:MoveTo(player.Character:GetModelCFrame().p)
- end
- end))
- end
- end)
- addCmd("cmdbar","cmdbar" .. Bet .. " | Gives the main command-bar.",function(msg,speaker)
- if not Can_Use_Cmdbar then return end
- if Can_Use_Cmdbar then
- CmdBar(speaker)
- end
- end)
- addCmd("getout","getout" .. Bet .. "player | Shoots the player threw a door, then kills them.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player.Character and player.Character:FindFirstChild("Torso") then
- local new = props:FindFirstChild("door")
- if new then
- local clone = new:Clone()
- clone.Parent = services["Workspace"]
- table.insert(clean,clone)
- move(clone, CFrame.new(player.Character.Torso.Position) * CFrame.new(20,0,0))
- local bv = Instance.new("BodyPosition")
- bv.maxForce = Vector3.new(1/0,1/0,1/0)
- bv.position = (clone:GetModelCFrame() * CFrame.new(60,0,0)).p
- bv.Parent = player.Character.Torso
- wait(.4)
- player.Character:breakJoints()
- if bv and bv.Parent then
- bv:Destroy()
- end
- wait(1)
- for i=0,1,.1 do
- coroutine.resume(coroutine.create(function()
- for _,v in pairs(clone:GetChildren()) do
- if v:IsA("BasePart") then
- v.Transparency = i
- end
- end
- end))
- wait()
- end
- clone:Destroy()
- end
- end
- end))
- end
- end)
- addCmd("ground","ground" .. Bet .. "player | Shoots the player far into the ground.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player.Character and player.Character:FindFirstChild("Head") and player.Character:FindFirstChild("Torso") then
- Instance.new("BoolValue",player.Character.Head).Name = "GameMakerStudios_GROUND"
- for _,v in pairs(player.Character:GetChildren()) do if v:IsA("BasePart") then v.Anchored = true end end
- _G:TweenObject(player.Character,player.Character:GetModelCFrame(),CFrame.new(player.Character:GetModelCFrame().x,-10,player.Character:GetModelCFrame().z),4)
- wait()
- if player.Character then
- player.Character:breakJoints()
- end
- end
- end))
- end
- end)
- addCmd("s","s" .. Bet .. "source | Runs a non-local script in Workspace",function(msg,speaker)
- Script(msg,services["Workspace"])
- end)
- addCmd("ls","ls" .. Bet .. "local-source | Runs a local script in the player's character",function(msg,speaker)
- coroutine.resume(coroutine.create(function()
- Script(msg,waitForProperty(speaker,"Character",4))
- end))
- end)
- addCmd("btools","btools" .. Bet .. "player | Sends a set of building tools to the wanted player.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character then
- local function give(id)
- local new = services["InsertService"]:LoadAsset(id)
- if #new:GetChildren() <= 0 then new:Destroy()
- else
- for _,v in pairs(new:GetChildren()) do
- coroutine.resume(coroutine.create(function()
- if v:IsA("Tool") or v:IsA("HopperBin") then
- v.Parent = waitForChild(player,"Backpack",2)
- end
- end))
- end
- end
- end
- give(36738142) -- resize
- give(73089190) -- delete
- give(58921588) -- classic
- give(55028088) -- stamper
- give(18474459) -- paint
- give(73089239) -- config
- give(73089259) -- wiring
- end
- end))
- end
- end)
- addCmd("sit","sit" .. Bet .. "player | Sits the wanted player.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character then
- player.Character.Humanoid.Sit = true
- end
- end))
- end
- end)
- addCmd("stand","stand" .. Bet .. "player | Stands the wanted player.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character then
- player.Character.Humanoid.PlatformStand = false
- player.Character.Humanoid.Sit = false
- end
- end))
- end
- end)
- addCmd("jump","jump" .. Bet .. "player | Jumps the wanted player. Also reverses nojump.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character then
- for _,v in pairs(player.Character:GetChildren()) do if v.Name == "GameMakerStudios_NOJUMP" then v:Destroy() end end
- player.Character.Humanoid.PlatformStand = false
- player.Character.Humanoid.Sit = false
- player.Character.Humanoid.Jump = true
- end
- end))
- end
- end)
- addCmd("nojump","nojump" .. Bet .. "player | Makes the wanted player unable to jump.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character then
- localscript([[
- script.Name = "GameMakerStudios_NOJUMP"
- script.Parent.Humanoid.Changed:connect(function(change)
- if change == "Jump" then
- script.Parent.Humanoid.Jump = false
- end
- end)]],player.Character)
- end
- end))
- end
- end)
- addCmd("invisible","invisible" .. Bet .. "player | Makes the wanted player invisible.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character then
- local function trans(obj)
- for _,v in pairs(obj:GetChildren()) do
- if v:IsA("BasePart") then v.Transparency = 1 end
- trans(v)
- end
- end
- trans(player.Character)
- if player.Character.Head:FindFirstChild("face") then
- player.Character.Head.face.Transparency = 1
- end
- end
- end))
- end
- end)
- addCmd("visible","visible" .. Bet .. "player | Makes the wanted player visible.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character then
- local function trans(obj)
- for _,v in pairs(obj:GetChildren()) do
- if v:IsA("BasePart") then v.Transparency = 0 end
- trans(v)
- end
- end
- trans(player.Character)
- if player.Character.Head:FindFirstChild("face") then
- player.Character.Head.face.Transparency = 0
- end
- end
- end))
- end
- end)
- addCmd("launch","launch" .. Bet .. "player | Launchs the wanted player into outter space on a stylish rocket.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- local new = props:FindFirstChild("rocket")
- if new then
- local clone = new:Clone()
- clone.Parent = services["Workspace"]
- clone:MakeJoints()
- table.insert(clean,clone)
- local base = clone:FindFirstChild("base")
- if base then
- local bg = Instance.new("BodyGyro")
- bg.maxTorque = Vector3.new(1/0,0,1/0)
- bg.cframe = bg.cframe
- local bv = Instance.new("BodyVelocity")
- bv.maxForce = Vector3.new(1/0,1/0,1/0)
- bv.velocity = Vector3.new(0,50,0)
- bv.P = 2e3 -- 2k
- bg.Parent,bv.Parent = base,base
- local weld = Instance.new("Weld",base)
- weld.Part1 = base
- weld.Part0 = player.Character.Torso
- weld.C0 = CFrame.new(0,0,-4)
- end
- end
- end))
- end
- end)
- addCmd("explode","explode" .. Bet .. "player | Explodes the wanted player.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player.Character and player.Character:FindFirstChild("Torso") then
- if Anti_Lag_Mode then
- local explosion = Instance.new("Explosion",services["Workspace"])
- explosion.BlastPressure = 0
- explosion.BlastRadius = 10
- wait()
- player.Character:breakJoints()
- else
- local new = Instance.new("Part")
- new.Size = Vector3.new(3,3,3)
- new.Anchored = true
- new.CanCollide = false
- new.TopSurface = "Smooth"
- new.BottomSurface = "Smooth"
- new.Transparency = .6
- table.insert(clean,new)
- new.BrickColor = BrickColor.new("Br. yellowish orange") -- very long name for a color...
- local mesh = Instance.new("SpecialMesh",new)
- mesh.MeshType = "Sphere"
- new.Parent = services["Workspace"]
- for i=20,0,-.5 do
- new.CFrame = player.Character.Torso.CFrame
- mesh.Scale = Vector3.new(i,i,i)
- wait()
- end
- local explosion = Instance.new("Explosion",services["Workspace"])
- explosion.BlastPressure = 0
- explosion.BlastRadius = 10
- explosion.Position = player.Character.Torso.Position
- wait()
- player.Character:breakJoints()
- new:Destroy()
- end
- end
- end))
- end
- end)
- addCmd("cycle","cycle" .. Bet .. "player | Gives the wanted player a motorcycle.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character then
- local cycle = props:FindFirstChild("motorcycle")
- if cycle then
- local clone = cycle:Clone()
- clone.Handle.Anchored = false
- clone.Parent = player.Character
- end
- end
- end))
- end
- end)
- addCmd("wheeler","wheeler" .. Bet .. "player | Gives the wanted player a 4-wheeler.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character then
- local cycle = props:FindFirstChild("fourWheeler")
- if cycle then
- local clone = cycle:Clone()
- localscript([[
- local cf = CFrame.new(]] .. unpack(player.Character:GetModelCFrame()) .. [[
- for i=1,10 do
- script.Parent.Handle.CFrame = cf
- wait()
- end
- script:Destroy()
- ]],clone)
- clone.Handle.Anchored = false
- clone.Parent = player.Character
- end
- end
- end))
- end
- end)
- addCmd("car","car" .. Bet .. "player | Gives the wanted player a car.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character and player.Character:FindFirstChild("Torso") then
- local car = props:FindFirstChild("car")
- if car then
- local clone = car:Clone()
- if clone then
- clone.Parent = services["Workspace"]
- clone:MakeJoints()
- clone:MoveTo(player.Character.Torso.Position + Vector3.new(0,0,10))
- table.insert(clean,clone)
- for _,v in pairs(clone:GetChildren()) do
- if v.Anchored then
- v.Anchored = false
- end
- end
- end
- end
- end
- end))
- end
- end)
- addCmd("admins","Shows the list of all avalable admins.",function(msg,speaker)
- coroutine.resume(coroutine.create(function()
- Script([[
- for _,v in pairs(script.Parent:GetChildren()) do if v.Name == "GameMakerStudios_ADMINS" then v:Destroy() end end
- local me = script.Parent.Parent
- local owners = game:GetService('Lighting'):FindFirstChild("GameMakerStudios_Admins"):FindFirstChild("Owners"):GetChildren()
- local admins = game:GetService('Lighting'):FindFirstChild("GameMakerStudios_Admins"):FindFirstChild("Admins"):GetChildren()
- local all = {}
- for _,v in pairs(owners) do table.insert(all,v) end
- for _,v in pairs(admins) do table.insert(all,v) end
- script.Name = "GameMakerStudios_CMDGUI"
- local cmdGui = Instance.new("ScreenGui") cmdGui.Name = "GameMakerStudios_ADMINS"
- local frame = Instance.new("Frame",cmdGui)
- frame.Style = "Custom"
- frame.Size = UDim2.new(0,400,0,200)
- frame.BackgroundTransparency = 1
- frame.Position = UDim2.new(.5,-100,.5,-100)
- frame.ZIndex = 1
- frame.ClipsDescendants = true -- uh uh
- local de = Instance.new("Frame",frame) de.Style = "RobloxRound" de.Size = UDim2.new(0,200,1,0)
- local cf = Instance.new("Frame",frame)
- local b1 = Instance.new("ImageButton",frame)
- local b2 = Instance.new("ImageButton",frame)
- b1.Size,b2.Size = UDim2.new(0,20,0,20),UDim2.new(0,20,0,20)
- b1.Position,b2.Position = UDim2.new(0, 180,0,0),UDim2.new(0, 180,0,30)
- b1.Image,b2.Image = "http://www.roblox.com/asset/?id=35927648","http://www.roblox.com/asset/?id=35927632"
- b1.ZIndex,b2.ZIndex = 4,4
- b1.BackgroundTransparency,b2.BackgroundTransparency = 1,1
- local mode = "none"
- b1.MouseButton1Down:connect(function()
- coroutine.resume(coroutine.create(function()
- mode = "up"
- while mode == "up" do
- cf:TweenPosition(cf.Position + UDim2.new(0,0,0,18),"Out","Linear",.1,true)
- wait(.1)
- end
- end))
- end)
- b2.MouseButton1Down:connect(function()
- coroutine.resume(coroutine.create(function()
- mode = "down"
- while mode == "down" do
- cf:TweenPosition(cf.Position + UDim2.new(0,0,0,-18),"Out","Linear",.1,true)
- wait(.1)
- end
- end))
- end)
- b1.MouseButton1Up:connect(function() mode = "none" end)
- b2.MouseButton1Up:connect(function() mode = "none" end)
- local X = Instance.new("ImageButton",frame)
- X.Position = UDim2.new(0,0,1,-20)
- X.Size = UDim2.new(0,20,0,20)
- X.BackgroundTransparency = 1
- X.ZIndex = 4
- X.Image = "http://www.roblox.com/asset/?id=35636386"
- X.MouseButton1Down:connect(function()
- coroutine.resume(coroutine.create(function()
- frame:TweenSizeAndPosition(UDim2.new(0,1,0,1),UDim2.new(.5,0,.5,0))
- wait(1)
- cmdGui:Destroy()
- script:Destroy()
- end))
- end)
- cf.BackgroundTransparency = 1
- cf.BorderSizePixel = 0
- cf.Size = UDim2.new(1,0,0,(#admins)*18)
- cf.ZIndex = 2
- cf.Draggable = true
- cf.DragBegin:connect(function(UDim2)
- coroutine.resume(coroutine.create(function()
- cf.Position = UDim2.new(0,0,0,UDim2.Y.Offset)
- end))
- end)
- for i=1,#all do
- delay(0, function ()
- local new = Instance.new("TextLabel",cf)
- new.ZIndex = 3
- new.BackgroundTransparency = 1
- new.FontSize = "Size18"
- new.Font = "ArialBold"
- new.BorderSizePixel = 0
- new.TextColor3 = Color3.new(1,1,1)
- new.Size = UDim2.new(0,185,0,18)
- new.Position = UDim2.new(0,0,0,(i*18)-18)
- new.Name = all[i].Value
- new.Text = all[i].Value
- new.MouseEnter:connect(function()
- coroutine.resume(coroutine.create(function()
- for _,v in pairs(cf:GetChildren()) do v:ClearAllChildren() end
- local inf = Instance.new("TextLabel",new)
- inf.Size = UDim2.new(0,200,0,54)
- inf.Position = UDim2.new(0,195,0,0)
- inf.TextScaled = true
- inf.TextColor3 = Color3.new(1,1,1)
- inf.BackgroundTransparency = .7
- inf.BackgroundColor3 = Color3.new(0,0,0)
- inf.TextXAlignment = "Left"
- inf.TextYAlignment = "Top"
- inf.Font = "ArialBold"
- inf.FontSize = "Size18"
- inf.ZIndex = 4
- inf.Name = "GameMakerStudios_ADMINS"
- local player = game:GetService('Players'):FindFirstChild(all[i].Value)
- if player then
- local bc = ""
- if player.MembershipType == Enum.MembershipType.None then bc = "NBC" end
- if player.MembershipType == Enum.MembershipType.BuildersClub then bc = "BC" end
- if player.MembershipType == Enum.MembershipType.TurboBuildersClub then bc = "TBC" end
- if player.MembershipType == Enum.MembershipType.OutrageousBuildersClub then bc = "OBC" end
- inf.Text = "AccountAge: " .. player.AccountAge .. "\
- " .. "BC: " .. bc .. "\
- " .. "Rank: " .. all[i]:FindFirstChild("RANK").Value
- else
- inf.Text = "[ Player not in Server ]"
- end
- end))
- end)
- new.MouseLeave:connect(function()
- coroutine.resume(coroutine.create(function()
- new:ClearAllChildren()
- end))
- end)
- end)
- end
- frame.Size = UDim2.new(0,1,0,1)
- frame.Position = UDim2.new(.5,0,.5,0)
- cmdGui.Parent = script.Parent
- frame:TweenSizeAndPosition(UDim2.new(0,400,0,200),UDim2.new(.5,-100,.5,-100))
- ]],waitForChild(speaker,"PlayerGui",2))
- end))
- end)
- --[[addCmd("part","part" .. Bet .. "player" .. "sizeX" .. Bet .. "sizeY" .. Bet .. "sizeX | Makes a part on the player.",function(msg,speaker)
- local obj = {} -- this'll take a while...
- local broken = 0
- local st = msg:gsub(Bet,":")
- for i=1,#st do
- if i == ":" then
- obj["plr"] = (st:sub(1,i-1))
- broken = i+1
- print(broken)
- break
- end
- end
- for i=broken,#st do
- if st:sub(i,i) == ":" then
- obj["sizeX"] = (st:sub(broken,i))
- broken = i+1
- print(broken)
- end
- end
- for i=broken,#st do
- if st:sub(i,i) == ":" then
- obj["sizeY"] = (st:sub(broken,i))
- broken = i+1
- print(broken)
- end
- end
- for i=broken,#st do
- if st:sub(i,i) == ":" then
- obj["sizeZ"] = (st:sub(broken,i))
- broken = i+1
- print(broken)
- end
- end
- print(obj["plr"],obj["sizeX"],obj["sizeY"],obj["sizeZ"])
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if obj["plr"] and obj["sizeX"] and obj["sizeY"] and obj["sizeZ"] then
- if player and player.Character then
- local part = Instance.new("Part")
- part.FormFactor = "Custom"
- part.Size = Vector3.new(obj["sizeX"],obj["sizeY"],obj["sizeZ"])
- part.Parent = services["Workspace"]
- table.insert(clean,part)
- part.Position = player.Character:GetModelCFrame().p
- end
- end
- end))
- end
- end)
- ]]
- addCmd("disablecmd","disablecmd" .. Bet .. "cmd | Disables the wanted command. Command cannot be re-enabled after that.",function(msg,speaker)
- for _,cmd in pairs(_G.GameMakerStudios_cmds) do
- if cmd[1]:lower() == msg:lower() then
- table.remove(_G.GameMakerStudios_cmds,_)
- Announce("SYSTEM","Successfully removed the '" .. msg .. "' command!")
- end
- end
- end)
- addCmd("vehicle","vehicle" .. Bet .. "vehicle" .. Bet .. "player | Gives the wanted vehicle to the wanted player.",function(msg,speaker)
- local ids = {
- ["bus"] = 59524699;
- ["car"] = 59524676;
- ["police"] = 59524656;
- ["truck"] = 59524606;
- ["jeep"] = 59524622;
- ["ufo"] = 59524729;
- }
- local vehicles = {}
- local st = msg:gsub(Bet,":")
- for i=1,#st do
- if st:sub(i,i) == ":" then
- vehicles["vehicle"] = st:sub(i+1)
- vehicles["player"] = st:sub(1,i-1)
- break
- end
- end
- local lol = ids[vehicles["vehicle"]]
- local players = gp(speaker,vehicles["player"])
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player.Character then
- local new = services["InsertService"]:LoadAsset(lol)
- while not new and not #new:GetChildren() <= 0 do wait() end
- wait()
- local ve = new:GetChildren()[1]
- while not ve and not ve.Parent and not #ve:GetChildren() <= 0 do wait() end
- wait()
- ve.Parent = services["Workspace"]
- table.insert(clean,ve)
- ve:MakeJoints()
- ve:MoveTo(player.Character:GetModelCFrame().p + Vector3.new(0,2,10))
- end
- end))
- end
- end)
- addCmd("flood","flood" .. Bet .. " | Sends a flood to the game that slowly floods everything.",function(msg,speaker)
- coroutine.resume(coroutine.create(function()
- if speaker and speaker.Character and speaker.Character:FindFirstChild("Torso") then
- local new = Instance.new("Part")
- new.BrickColor = "Bright bluish green"
- new.Material = "Ice"
- new.Transparency = .7
- new.Anchored = true
- new.CanCollide = false
- new.Size = Vector3.new(2000,40,2000)
- new.CFrame = CFrame.new(speaker.Character.Torso.Position) * CFrame.new(0,-50,0)
- new.Parent = services["Workspace"]
- table.insert(clean,new)
- new:breakJoints()
- local function onTouched(hit)
- if hit.Parent then if services["Players"]:GetPlayerFromCharacter(hit.Parent) then hit:breakJoints() end end
- end
- local connection = new.Touched:connect(onTouched)
- _G:TweenObject(new,new.CFrame,new.CFrame * CFrame.new(0,50),20)
- new:breakJoints()
- end
- end))
- end)
- addCmd("serverlock","serverlock" .. Bet .. "on/off | Turns serverlock on or off.",function(msg,speaker)
- if msg:lower() == "true" or msg:lower() == "on" or msg:lower() == "active" then
- serverLock = true
- Message(speaker,"SYSTEM","Serverlock is now active.","C O N F I R M")
- end
- if msg:lower() == "false" or msg:lower() == "off" or msg:lower() == "inactive" then
- serverLock = false
- Message(speaker,"SYSTEM","Serverlock is now inactive.","C O N F I R M")
- end
- end)
- addCmd("time","time" .. Bet .. "number | Sets the time to what ever. From 1 to 24 (in hours)",function(msg,speaker)
- services["Lighting"].TimeOfDay = tostring(msg)
- end)
- addCmd("kill","kill" .. Bet .. "player | Kills the wanted player.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if Anti_Lag_Mode then
- if player.Character then
- if player.Character:IsA("Model") then
- player.Character:breakJoints()
- end
- end
- end
- if not Anti_Lag_Mode then
- local fist = Instance.new("Part")
- fist.FormFactor = "Custom"
- fist.Size = Vector3.new(18,24,15)
- fist.Anchored = true
- fist.CanCollide = false
- fist.Locked = true
- fist.Transparency = 1
- table.insert(clean,fist)
- local mesh = Instance.new("SpecialMesh",fist)
- mesh.MeshType = "FileMesh"
- mesh.Scale = Vector3.new(60,60,60)
- mesh.MeshId = "http://www.roblox.com/asset/?id=90718752"
- mesh.TextureId = "http://www.roblox.com/asset/?id=90718949"
- fist.CFrame = CFrame.new(player.Character.Head.Position) * CFrame.new(0,40,0)
- fist.Parent = services["Workspace"]
- for i=1,0,-.1 do
- fist.Transparency = i
- wait()
- end
- _G:TweenObject(fist,fist.CFrame,CFrame.new(player.Character.Head.Position),.6)
- local curc = fist.CFrame
- player.Character:breakJoints()
- for i=1,10 do
- fist.CFrame = curc * CFrame.new(math.random(1,5),math.random(1,5),math.random(1,5))
- wait(.1)
- end
- wait(1)
- for i=0,1,.1 do
- fist.Transparency = i
- wait()
- end
- fist:Destroy()
- end
- end))
- end
- end)
- addCmd("ff","ff" .. Bet .. "player | Puts a forcefield and sets the player's health to infinity.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player.Character then
- local charSize = player.Character:GetModelSize()
- local effect = Instance.new("Part")
- effect.BrickColor = BrickColor.new("Really blue")
- effect.Anchored = true
- effect.CanCollide = false
- effect.FormFactor = "Custom"
- effect.TopSurface = "Smooth"
- effect.BottomSurface = "Smooth"
- effect.Size = Vector3.new(1,1,1)
- effect.Transparency = .6
- local mesh = Instance.new("SpecialMesh",effect)
- mesh.MeshType = "Sphere"
- effect.Parent = player.Character
- mesh.Scale = Vector3.new(1,1,1)
- for i=1,25 do
- effect.CFrame = player.Character:GetModelCFrame()
- mesh.Scale = Vector3.new(i/5,i/5,i/5)
- wait()
- end
- effect:Destroy()
- local ff = Instance.new("ForceField",player.Character)
- player.Character.Humanoid.MaxHealth,player.Character.Humanoid.MaxHealth = 1/0,1/0
- end
- end));end
- end)
- addCmd("unff","unff" .. Bet .. "player | Removes the forcefield and sets the player's health to 100(normal).",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player.Character then
- if player.Character:FindFirstChild("ForceField") then
- local charSize = player.Character:GetModelSize()
- local effect = Instance.new("Part")
- effect.BrickColor = BrickColor.new("Really blue")
- effect.Anchored = true
- effect.CanCollide = false
- effect.FormFactor = "Custom"
- effect.Size = Vector3.new(1,1,1)
- effect.Transparency = .6
- local mesh = Instance.new("SpecialMesh",effect)
- mesh.MeshType = "Sphere"
- effect.Parent = player.Character
- mesh.Scale = Vector3.new(5,5,5)
- player.Character.ForceField:Destroy()
- for i=25,1,-1 do
- effect.CFrame = player.Character:GetModelCFrame()
- mesh.Scale = Vector3.new(i/4,i/4,i/4)
- wait()
- end
- effect:Destroy()
- player.Character.Humanoid.MaxHealth,player.Character.Humanoid.MaxHealth = 100,100
- end
- end
- end));end
- end)
- addCmd("cmds","cmds" .. Bet .. " | Shows the list of all commands.",function(msg,speaker)
- coroutine.resume(coroutine.create(function()
- if speaker:FindFirstChild("PlayerGui") then
- Script([[
- for _,v in pairs(script.Parent:GetChildren()) do if v.Name == "GameMakerStudios_CMDGUI" then v:Destroy() end end
- local cmds = _G.GameMakerStudios_cmds
- script.Name = "GameMakerStudios_CMDGUI"
- local cmdGui = Instance.new("ScreenGui") cmdGui.Name = "GameMakerStudios_CMDGUI"
- local frame = Instance.new("Frame",cmdGui)
- frame.Style = "Custom"
- frame.Size = UDim2.new(0,400,0,200)
- frame.BackgroundTransparency = 1
- frame.Position = UDim2.new(.5,-100,.5,-100)
- frame.ZIndex = 1
- frame.ClipsDescendants = true -- uh uh
- local de = Instance.new("Frame",frame) de.Style = "RobloxRound" de.Size = UDim2.new(0,200,1,0)
- local cf = Instance.new("Frame",frame)
- local b1 = Instance.new("ImageButton",frame)
- local b2 = Instance.new("ImageButton",frame)
- b1.Size,b2.Size = UDim2.new(0,20,0,20),UDim2.new(0,20,0,20)
- b1.Position,b2.Position = UDim2.new(0, 180,0,0),UDim2.new(0, 180,0,30)
- b1.Image,b2.Image = "http://www.roblox.com/asset/?id=35927648","http://www.roblox.com/asset/?id=35927632"
- b1.ZIndex,b2.ZIndex = 4,4
- b1.BackgroundTransparency,b2.BackgroundTransparency = 1,1
- local mode = "none"
- b1.MouseButton1Down:connect(function()
- coroutine.resume(coroutine.create(function()
- mode = "up"
- while mode == "up" do
- cf:TweenPosition(cf.Position + UDim2.new(0,0,0,18),"Out","Linear",.1,true)
- wait(.1)
- end
- end))
- end)
- b2.MouseButton1Down:connect(function()
- coroutine.resume(coroutine.create(function()
- mode = "down"
- while mode == "down" do
- cf:TweenPosition(cf.Position + UDim2.new(0,0,0,-18),"Out","Linear",.1,true)
- wait(.1)
- end
- end))
- end)
- b1.MouseButton1Up:connect(function() mode = "none" end)
- b2.MouseButton1Up:connect(function() mode = "none" end)
- local X = Instance.new("ImageButton",frame)
- X.Position = UDim2.new(0,0,1,-20)
- X.Size = UDim2.new(0,20,0,20)
- X.BackgroundTransparency = 1
- X.ZIndex = 4
- X.Image = "http://www.roblox.com/asset/?id=35636386"
- X.MouseButton1Down:connect(function()
- coroutine.resume(coroutine.create(function()
- frame:TweenSizeAndPosition(UDim2.new(0,1,0,1),UDim2.new(.5,0,.5,0))
- wait(1)
- cmdGui:Destroy()
- script:Destroy()
- end))
- end)
- cf.BackgroundTransparency = 1
- cf.BorderSizePixel = 0
- cf.Size = UDim2.new(1,0,0,(#cmds)*18)
- cf.ZIndex = 2
- cf.Draggable = true
- cf.DragBegin:connect(function(UDim2)
- coroutine.resume(coroutine.create(function()
- cf.Position = UDim2.new(0,0,0,UDim2.Y.Offset)
- end))
- end)
- for i=1,#cmds do
- delay(0, function ()
- local new = Instance.new("TextLabel",cf)
- new.ZIndex = 3
- new.BackgroundTransparency = 1
- new.FontSize = "Size18"
- new.Font = "ArialBold"
- new.BorderSizePixel = 0
- new.TextColor3 = Color3.new(1,1,1)
- new.Size = UDim2.new(0,185,0,18)
- new.Position = UDim2.new(0,0,0,(i*18)-18)
- new.Name = cmds[i][1]
- new.Text = cmds[i][1]:sub(1,1):upper() .. cmds[i][1]:sub(2):lower()
- new.MouseEnter:connect(function()
- coroutine.resume(coroutine.create(function()
- for _,v in pairs(cf:GetChildren()) do v:ClearAllChildren() end
- local inf = Instance.new("TextLabel",new)
- inf.Size = UDim2.new(0,200,0,54)
- inf.Position = UDim2.new(0,195,0,0)
- inf.TextScaled = true
- inf.TextColor3 = Color3.new(1,1,1)
- inf.BackgroundTransparency = .7
- inf.BackgroundColor3 = Color3.new(0,0,0)
- inf.TextXAlignment = "Left"
- inf.TextYAlignment = "Top"
- inf.Font = "ArialBold"
- inf.FontSize = "Size18"
- inf.ZIndex = 4
- inf.Name = "GameMakerStudios_CMDINFO"
- inf.Text = cmds[i][2]
- end))
- end)
- new.MouseLeave:connect(function()
- coroutine.resume(coroutine.create(function()
- new:ClearAllChildren()
- end))
- end)
- end)
- end
- frame.Size = UDim2.new(0,1,0,1)
- frame.Position = UDim2.new(.5,0,.5,0)
- cmdGui.Parent = script.Parent
- frame:TweenSizeAndPosition(UDim2.new(0,400,0,200),UDim2.new(.5,-100,.5,-100))
- ]],speaker.PlayerGui)
- end
- end))
- end)
- addCmd("info","info" .. Bet .. "player" .. Bet .. "itemID | Shows all the information about the given asset ID (place or catalog object)",function(msg,speaker)
- local info = {}
- local st = msg:gsub(Bet,":")
- for i=1,#st do
- if st:sub(i,i) == ":" then
- info["player"] = st:sub(1,i-1)
- info["id"] = st:sub(i+1)
- end
- end
- local players = gp(speaker,info["player"])
- local id = info["id"]
- if not tonumber(id) then return end
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player:FindFirstChild("PlayerGui") then
- Script([[
- y,n = coroutine.resume(coroutine.create(function()
- for _,v in pairs(script.Parent:GetChildren()) do if v.Name == "GameMakerStudios_INFO" then
- if v:IsA("ScreenGui") then
- coroutine.resume(coroutine.create(function()
- v.Frame:TweenSizeAndPosition(UDim2.new(0,0,0,0),UDim2.new(.5,0,.5,0))
- wait(1)
- v:Destroy()
- end))
- end
- if v:IsA("Script") then v:Destroy() end
- end
- end
- local assetID = ]] .. id .. [[
- function getInfo(wanted)
- Lib = LoadLibrary("RbxUtility")
- Info = game:GetService("MarketplaceService"):GetProductInfo(assetID)
- if Info[wanted] then
- return Info[wanted]
- end
- for i,v in pairs(Lib.DecodeJSON(Info)) do
- if i == wanted then
- return v
- end
- end
- end
- gui = Instance.new("ScreenGui")
- local frame = Instance.new("Frame",gui)
- gui.Name = "GameMakerStudios_INFO"
- script.Name = "GameMakerStudios_INFO"
- frame.ClipsDescendants = true
- local spare = Instance.new("TextLabel")
- spare.BackgroundTransparency = 1
- spare.BorderSizePixel = 0
- spare.ZIndex = 2
- spare.Font = "Legacy"
- spare.FontSize = "Size12"
- spare.Text = "[ Content Deleted ]"
- spare.TextColor3 = Color3.new(1,1,1)
- spare.Size = UDim2.new(1,0,.05,0)
- spare.TextWrapped = true
- spare.TextXAlignment = "Left"
- local name = spare:Clone()
- name.Parent = frame
- name.Size = UDim2.new(1,0,.05,0)
- name.Position = UDim2.new(0,0,0,0)
- name.Text = "Name: " .. getInfo("Name")
- local desc = spare:Clone()
- desc.Parent = frame
- desc.FontSize = "Size10"
- desc.Text = "Desc: " .. getInfo("Description")
- desc.Position = UDim2.new(0,0,.1,0)
- desc.Size = UDim2.new(.4,0,0.9,0)
- desc.TextYAlignment = "Top"
- local created = spare:Clone()
- created.Parent = frame
- created.Text = "Created: " .. tostring(getInfo("Created")):sub(1,10)
- created.Size = UDim2.new(.4,0,.1,0)
- created.Position = UDim2.new(.42,0,0.1,0)
- created.FontSize = "Size10"
- local updated = spare:Clone()
- updated.Parent = frame
- updated.Text = "Updated: " .. tostring(getInfo("Updated")):sub(1,10)
- updated.Size = UDim2.new(.4,0,.1,0)
- updated.Position = UDim2.new(.42,0,0.2,0)
- updated.FontSize = "Size10"
- coroutine.resume(coroutine.create(function()
- if getInfo("IsForSale") then
- local sales = spare:Clone()
- sales.Parent = frame
- sales.Size = UDim2.new(.4,0,.1,0)
- sales.Position = UDim2.new(.42,0,.3,0)
- sales.Text = "Sales: " .. tostring(getInfo("Sales"))
- sales.FontSize = "Size10"
- local robux = spare:Clone()
- robux.Parent = frame
- robux.Size = UDim2.new(.4,0,.1,0)
- robux.Position = UDim2.new(.42,0,.4,0)
- robux.Text = (getInfo("PriceInRobux")~="null" and "Robux: " .. tostring(getInfo("PriceInRobux")) or "[ Price not in ROBUX ]")
- robux.FontSize = "Size10"
- local tix = spare:Clone()
- tix.Parent = frame
- tix.Size = UDim2.new(.4,0,.1,0)
- tix.Position = UDim2.new(.42,0,.5,0)
- tix.Text = (getInfo("PriceInTickets")~="null" and "Tix: " .. tostring(getInfo("PriceInTickets")) or "[ Price not in TIX ]")
- tix.FontSize = "Size10"
- local buy = Instance.new("TextButton",frame)
- buy.Size = UDim2.new(.4,0,.1,0)
- buy.BorderSizePixel = 0
- buy.BackgroundColor3 = Color3.new(0,0,0)
- buy.TextColor3 = Color3.new(1,1,1)
- buy.TextScaled = true
- buy.TextWrapped = true
- buy.Position = UDim2.new(.42,0,.8,0)
- buy.Text = "B U Y"
- buy.ZIndex = 2
- local de = Instance.new("Frame",buy)
- de.BackgroundTransparency = .6
- de.BorderSizePixel = 0
- de.Size = UDim2.new(1,0,.5,0)
- de.ZIndex = 3
- buy.MouseButton1Click:connect(
- function()
- game:GetService('MarketplaceService') :PromptPurchase(script.Parent.Parent,assetID)
- end
- )
- end
- end))
- local creator = spare:Clone()
- creator.Parent = frame
- creator.Size = UDim2.new(.4,0,.1,0)
- creator.Position = UDim2.new(.42,0,.6,0)
- for i,v in pairs(getInfo("Creator")) do
- if i == "Name" then
- creator.Text = "Creator: " .. v
- end
- end
- creator.FontSize = "Size10"
- frame.Size = UDim2.new(0,0,0,0)
- frame.Position = UDim2.new(.5,0,.5,0)
- frame.Style = "RobloxRound"
- local image = Instance.new("ImageLabel",frame)
- image.Size = UDim2.new(.17,0,.2,0)
- image.Position = UDim2.new(.84,0,.8,0)
- image.BackgroundTransparency = .8
- image.ZIndex = 3
- image.BorderSizePixel = 0
- image.Image = "http://www.roblox.com/Thumbs/Asset.ashx?format=png&width=420&height=230&assetId=" .. assetID
- local button = Instance.new("TextButton",frame)
- button.Size = UDim2.new(.4,0,.1,0)
- button.BorderSizePixel = 0
- button.BackgroundColor3 = Color3.new(0,0,0)
- button.TextColor3 = Color3.new(1,1,1)
- button.TextScaled = true
- button.TextWrapped = true
- button.Position = UDim2.new(.42,0,.9,0)
- button.Text = "C O N F I R M"
- button.ZIndex = 2
- local d = Instance.new("Frame",button)
- d.BackgroundTransparency = .6
- d.BorderSizePixel = 0
- d.Size = UDim2.new(1,0,.5,0)
- d.ZIndex = 3
- button.MouseButton1Click:connect(
- function()
- frame:TweenSizeAndPosition(UDim2.new(0,0,0,0),UDim2.new(.5,0,.5,0))
- wait(1)
- gui:Destroy()
- script:Destroy()
- end
- )
- gui.Parent = script.Parent
- frame:TweenSizeAndPosition(UDim2.new(.5,0,.5,0),UDim2.new(.25,0,.25,0))
- end))
- if n then if gui and gui.Parent then gui:Destroy() end script:Destroy() end
- ]],waitForChild(player,"PlayerGui",2))
- end
- end))
- end
- end)
- addCmd("clean","clean" .. Bet .. " | Cleans all hats/tools/script-generated-objects.",function(msg,speaker)
- for _,obj in pairs(clean) do
- coroutine.resume(coroutine.create(function()
- if obj.Name ~= "hover vehicle" then
- obj:Destroy()
- else
- for _,v in pairs(services["Players"]:GetPlayers()) do
- local playergui = v:FindFirstChild("PlayerGui")
- if playergui then
- local c = playergui:FindFirstChild("controlls2")
- if c then
- local val = c:FindFirstChild("obj")
- if val then
- if val.Value == obj then
- c:Destroy()
- end
- end
- end
- end
- end
- end
- end))
- end
- end)
- addCmd("m","m" .. Bet .. "text | Sends an in-game message to all the players.",function(msg,speaker)
- for _,player in pairs(services["Players"]:GetPlayers()) do
- coroutine.resume(coroutine.create(function()
- Message(player,"MESSAGE FROM: " .. speaker.Name,msg,"C O N F I R M")
- end));end
- end)
- addCmd("sm","sm" .. Bet .. "text | Sends an in-game system message to all the players.",function(msg,speaker)
- for _,player in pairs(services["Players"]:GetPlayers()) do
- coroutine.resume(coroutine.create(function()
- Message(player,"SYSTEM",msg,"C O N F I R M")
- end));end
- end)
- addCmd("shutdown","shutdown" .. Bet .. " | Shuts down the server.",function(msg,speaker)
- for _,player in pairs(services["Players"]:GetPlayers()) do
- coroutine.resume(coroutine.create(function()
- Message(player,"SYSTEM","SHUTTING DOWN...","C O N F I R M")
- wait(2)
- localscript([[
- local p = game:GetService('Players').LocalPlayer
- p.Parent = nil
- wait()
- p.Parent = game:GetService('Players')
- ]],player.Backpack or player.PlayerGui or player.Character or nil)
- end));end
- wait(2)
- coroutine.resume(coroutine.create(function()
- Instance.new("ManualJointSurfaceInstance")
- end))
- end)
- addCmd("ban","ban" .. Bet .. "player | Banishs the wanted player - please note that all bans are PERMINENT. Use kick if you don't want to save the bans.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if not isOwner(player) then
- if player.DataReady then player:SaveBoolean("gameMakerStudios_BANNED",true) end
- services["Debris"]:AddItem(player,1)
- localscript("local player = game:GetService('Players').LocalPlayer\
- player.Parent = nil\
- wait()\
- player.Parent = game:GetService('Players')",waitForChild(player,"Backpack",10))
- while player.Parent do wait() end
- Message(speaker,"SYSTEM","User: " .. player.Name .. " has been perminentally banned. Bans cannot be un-done.","C O N F I R M")
- end
- end))
- end
- end)
- addCmd("fixplr","fixplr" .. Bet .. "player | Fixes the wanted player.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player:FindFirstChild("PlayerGui") then
- localscript([[
- plr = game:GetService('Players').LocalPlayer
- if plr.Character and plr.Character:FindFirstChild("Humanoid") then
- for _,v in pairs(plr.Character:GetChildren()) do coroutine.resume(coroutine.create(function()
- if v:IsA("Script") or v:IsA("LocalScript") then
- v.Disabled = true
- wait()
- v.Disabled = false
- end
- end))
- end
- Workspace.CurrentCamera.CameraSubject = plr.Character.Humanoid
- Workspace.CurrentCamera.CoordinateFrame = plr.Character.Head.CFrame * CFrame.new(0,0,0)
- end
- Workspace.CurrentCamera.CameraType = "Custom"
- ]],player.PlayerGui)
- end
- end))
- end
- end)
- addCmd("untroll","untroll" .. Bet .. "player | Fixes the troll command's effects.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player:FindFirstChild("PlayerGui") then
- localscript([[
- local camera = game:GetService('Workspace').CurrentCamera
- local player = game:GetService('Players').LocalPlayer
- local playergui = player.PlayerGui
- while not player.Character do wait() end
- local char = player.Character
- while not char:FindFirstChild("Head") do wait() end
- local head = char.Head
- camera.CameraType = "Custom"
- camera.CameraSubject = char.Humanoid
- for _,v in pairs(playergui:GetChildren()) do
- if v.Name==("GameMakerStudios_TROLL") then
- if v:IsA("Script") then
- v:Destroy()
- end
- if v:IsA("ScreenGui") then
- for _,e in pairs(v.Frame:GetChildren()) do
- if e.BackgroundTransparency == 1 then e:Destroy() else
- coroutine.resume(coroutine.create(function()
- for i=e.BackgroundTransparency,1,.1 do
- e.BackgroundTransparency = i
- wait()
- end
- end))
- end
- end
- end
- v:Destroy()
- end
- end
- ]],waitForChild(player,"PlayerGui",2))
- end
- end))
- end
- end)
- addCmd("troll","troll" .. Bet .. "player | Trolls the wanted player.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player:FindFirstChild("PlayerGui") then
- localscript([[
- script.Name = "GameMakerStudios_TROLL"
- local camera = game:GetService('Workspace').CurrentCamera
- local player = game:GetService('Players').LocalPlayer
- while not player.Character do wait() end
- local char = player.Character
- while not char:FindFirstChild("Head") do wait() end
- local head = char.Head
- local playergui = player:FindFirstChild("PlayerGui")
- local gui = Instance.new("ScreenGui") gui.Name = "GameMakerStudios_TROLL"
- local frame = Instance.new("Frame",gui)
- frame.Size = UDim2.new(1,0,1,0)
- frame.BackgroundTransparency = 1
- for x=1,10 do
- for y=1,10 do
- local new = Instance.new("Frame",frame)
- new.BackgroundColor3 = BrickColor.random().Color
- new.BorderSizePixel = 0
- new.BackgroundTransparency = .6
- new.Size = UDim2.new(.1,0,.1,0)
- new.Position = UDim2.new((x/10)-.1,0,(y/10)-.1,0)
- coroutine.resume(coroutine.create(function()
- while wait() do
- new.BackgroundColor3 =BrickColor.random().Color
- new.BackgroundTransparency = tonumber('0.' .. math.random(1,9))
- end
- end))
- end
- end
- gui.Parent = playergui
- while wait() do
- camera.CameraType = "Scriptable"
- camera.CoordinateFrame = head.CFrame * CFrame.new(0,3,-2)
- camera:SetRoll(camera:GetRoll()+.05)
- end
- ]],waitForChild(player,"PlayerGui",2))
- end
- end))
- end
- end)
- addCmd("unantideath","unantideath" .. Bet .. "player | Reverses the effects of antideath.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- for _,v in pairs(services["Workspace"]:GetChildren()) do
- if v.Name == player.Name .. "_AntiDeath" then
- v:Destroy()
- end
- end
- end))
- end
- end)
- addCmd("antideath","antideath" .. Bet .. "player | Makes the player seem to almost be unable to die.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- Script([[
- script.Name = "]] .. player.Name .. [[_AntiDeath"
- local player = game:GetService('Players'):FindFirstChild("]] .. player.Name .. [[")
- while not player.Character do wait() end
- local tools = {}
- local cf = player.Character.Torso.CFrame
- function onSpawn()
- while not player.Character and not player.Character:FindFirstChild("Torso") do wait() end
- wait()
- player.Character.Torso.CFrame = cf
- for _,tool in pairs(tools) do tool.Parent = player.Backpack end tools = {}
- end
- function onDeath()
- local ray = Ray.new(
- player.Character.Torso.Position,
- Vector3.new(0, -100, 0)
- )
- local part, endPoint = game:GetService('Workspace'):FindPartOnRay(ray, player.Character)
- if not part then return end -- ok, new feature, if nothing is under the player, then DO NOT put them back there...
- if player:FindFirstChild("Backpack") then
- if player.Character and player.Character:FindFirstChild("Head") then
- if player.Character.Head:FindFirstChild("GameMakerStudios_GROUND") then return
- end
- end
- for _,tool in pairs(player.Backpack:GetChildren()) do
- if tool.Name ~= "GameMakerStudios_NOCLIP" then
- if tool.Name ~= "" then
- table.insert(tools,tool:Clone())
- end
- end
- end
- end
- if player.Character then
- if player.Character:FindFirstChild("Torso") then
- cf = player.Character.Torso.CFrame
- player:LoadCharacter()
- end
- end
- end
- player.Character.Humanoid.Died:connect(function() onDeath() end)
- player.CharacterAdded:connect(
- function(character)
- onSpawn()
- coroutine.resume(coroutine.create(function()
- while not character:FindFirstChild("Humanoid") do wait() end
- character.Humanoid.Died:connect(function() onDeath() end)
- end))
- end
- )
- ]],services["Workspace"])
- end))
- end
- end)
- addCmd("hat","hat" .. Bet .. "player" .. Bet .. "hatID | Gives the wanted player a hat.",function(msg,speaker)
- local hatStuff = {}
- local st = msg:gsub(Bet,":")
- for i=1,#st do
- if st:sub(i,i) == ":" then
- hatStuff["id"] = st:sub(i+1)
- hatStuff["player"] = st:sub(1,i-1)
- end
- end
- print(hatStuff["player"],hatStuff["id"])
- if not hatStuff["player"] then return end
- if not hatStuff["id"] then return end
- local players = gp(speaker,hatStuff["player"])
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player.Character then
- local hat = services["InsertService"]:LoadAsset(hatStuff["id"])
- local stuff = hat:GetChildren()
- if #stuff <= 0 then hat:Destroy() return end
- for _,v in pairs(stuff) do
- if v:IsA("Hat") then
- v.Parent = player.Character
- end
- end
- end
- end))
- end
- end)
- addCmd("tp","tp" .. Bet .. "player" .. Bet .. "player | Teleports player1 to player2.",function(msg,speaker)
- local ws = {}
- local st = msg:gsub(Bet,":")
- for i=1,#st do
- if st:sub(i,i) == ":" then
- ws["speed"] = st:sub(i+1)
- ws["player"] = st:sub(1,i-1)
- end
- end
- print(ws["player"],ws["speed"])
- if not ws["player"] then return end
- if not ws["speed"] then return end
- local players1 = gp(speaker,ws["player"])
- local players2 = gp(speaker,ws["speed"])
- for _,player1 in pairs(players1) do
- for _,player2 in pairs(players2) do
- coroutine.resume(coroutine.create(function()
- if player1.Character and player2.Character then
- player1.Character.Torso.CFrame = player2.Character.Torso.CFrame * CFrame.new(0,0,-4)
- end
- end))
- end
- end
- end)
- addCmd("clip","clip" .. Bet .. "player | Disables the wanted player's ability to run in noclip mode.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character and player.Character:FindFirstChild("Torso") then
- for _,v in pairs(player.Character:GetChildren()) do if v.Name == "Animate" or v.Name == "GameMakerStudios_NOCLIP" then v:Destroy() end end
- for _,v in pairs(player.Character.Torso:GetChildren()) do if v:IsA("BodyPosition") or v:IsA("BodyVelocity") then v:Destroy() end end
- for _,v in pairs(waitForChild(player,"PlayerGui",2):GetChildren()) do if v.Name == "GameMakerStudios_NOCLIP" then v:Destroy() end end
- localscript([[
- script.Name = "Animate"
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- -- ANIMATION
- -- declarations
- local Figure = script.Parent
- local Torso = waitForChild(Figure, "Torso")
- local RightShoulder = waitForChild(Torso, "Right Shoulder")
- local LeftShoulder = waitForChild(Torso, "Left Shoulder")
- local RightHip = waitForChild(Torso, "Right Hip")
- local LeftHip = waitForChild(Torso, "Left Hip")
- local Neck = waitForChild(Torso, "Neck")
- local Humanoid = waitForChild(Figure, "Humanoid")
- local pose = "Standing"
- local toolAnim = "None"
- local toolAnimTime = 0
- local jumpMaxLimbVelocity = 0.75
- -- functions
- function onRunning(speed)
- if speed>0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- pose = "Jumping"
- end
- function onClimbing()
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- pose = "FreeFall"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- pose = "PlatformStanding"
- end
- function onSwimming(speed)
- if speed>0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function moveJump()
- RightShoulder.MaxVelocity = jumpMaxLimbVelocity
- LeftShoulder.MaxVelocity = jumpMaxLimbVelocity
- RightShoulder:SetDesiredAngle(3.14)
- LeftShoulder:SetDesiredAngle(-3.14)
- RightHip:SetDesiredAngle(0)
- LeftHip:SetDesiredAngle(0)
- end
- -- same as jump for now
- function moveFreeFall()
- RightShoulder.MaxVelocity = jumpMaxLimbVelocity
- LeftShoulder.MaxVelocity = jumpMaxLimbVelocity
- RightShoulder:SetDesiredAngle(3.14)
- LeftShoulder:SetDesiredAngle(-3.14)
- RightHip:SetDesiredAngle(0)
- LeftHip:SetDesiredAngle(0)
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder:SetDesiredAngle(3.14 /2)
- LeftShoulder:SetDesiredAngle(-3.14 /2)
- RightHip:SetDesiredAngle(3.14 /2)
- LeftHip:SetDesiredAngle(-3.14 /2)
- end
- function getTool()
- for _, kid in ipairs(Figure:GetChildren()) do
- if kid.className == "Tool" then return kid end
- end
- return nil
- end
- function getToolAnim(tool)
- for _, c in ipairs(tool:GetChildren()) do
- if c.Name == "toolanim" and c.className == "StringValue" then
- return c
- end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- RightShoulder:SetDesiredAngle(1.57)
- return
- end
- if (toolAnim == "Slash") then
- RightShoulder.MaxVelocity = 0.5
- RightShoulder:SetDesiredAngle(0)
- return
- end
- if (toolAnim == "Lunge") then
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightHip.MaxVelocity = 0.5
- LeftHip.MaxVelocity = 0.5
- RightShoulder:SetDesiredAngle(1.57)
- LeftShoulder:SetDesiredAngle(1.0)
- RightHip:SetDesiredAngle(1.57)
- LeftHip:SetDesiredAngle(1.0)
- return
- end
- end
- function move(time)
- local amplitude
- local frequency
- if (pose == "Jumping") then
- moveJump()
- return
- end
- if (pose == "FreeFall") then
- moveFreeFall()
- return
- end
- if (pose == "Seated") then
- moveSit()
- return
- end
- local climbFudge = 0
- if (pose == "Running") then
- if (RightShoulder.CurrentAngle > 1.5 or RightShoulder.CurrentAngle < -1.5) then
- RightShoulder.MaxVelocity = jumpMaxLimbVelocity
- else
- RightShoulder.MaxVelocity = 0.15
- end
- if (LeftShoulder.CurrentAngle > 1.5 or LeftShoulder.CurrentAngle < -1.5) then
- LeftShoulder.MaxVelocity = jumpMaxLimbVelocity
- else
- LeftShoulder.MaxVelocity = 0.15
- end
- amplitude = 1
- frequency = 9
- elseif (pose == "Climbing") then
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- amplitude = 1
- frequency = 9
- climbFudge = 3.14
- else
- amplitude = 0.1
- frequency = 1
- end
- desiredAngle = amplitude * math.sin(time*frequency)
- RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
- LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
- RightHip:SetDesiredAngle(-desiredAngle)
- LeftHip:SetDesiredAngle(-desiredAngle)
- local tool = getTool()
- if tool then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- toolAnim = "None"
- toolAnimTime = 0
- end
- end
- -- connect events
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(onJumping)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.GettingUp:connect(onGettingUp)
- Humanoid.FreeFalling:connect(onFreeFall)
- Humanoid.FallingDown:connect(onFallingDown)
- Humanoid.Seated:connect(onSeated)
- Humanoid.PlatformStanding:connect(onPlatformStanding)
- Humanoid.Swimming:connect(onSwimming)
- -- main program
- local runService = game:service("RunService");
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- ]],player.Character)
- end
- end))
- end
- end)
- addCmd("breakjoints","breakjoints" .. Bet .. "player | Everything that player touchs will break joints.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character and player.Character:FindFirstChild("Torso") then
- localscript([[
- script.Name = "GameMakerStudios_BREAKJOINTS"
- function onTouched(hit)
- if hit then
- if not hit:IsDescendantOf(script.Parent) then
- if not game:GetService('Players'):GetPlayerFromCharacter(hit.Parent) then
- if not game:GetService('Players'):GetPlayerFromCharacter(hit.Parent.Parent) then
- hit:breakJoints()
- end
- end
- end
- end
- end
- for _,v in pairs(script.Parent:GetChildren()) do if v:IsA("BasePart") then v.Touched:connect(onTouched) end end
- ]],player.Character)
- end
- end))
- end
- end)
- addCmd("unbreakjoints","breakjoints" .. Bet .. "player | Reverses the effects of breakjoints",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character then
- for _,v in pairs(player.Character:GetChildren()) do
- if v.Name == "GameMakerStudios_BREAKJOINTS" then v:Destroy() end
- end
- end
- end))
- end
- end)
- addCmd("noob","noob" .. Bet .. "player | Noobifies the wanted player.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character then
- local c = player.Character:FindFirstChild("Body Colors") or Instance.new("BodyColors",player.Character)
- c.HeadColor = BrickColor.new("New Yeller")
- c.RightArmColor = BrickColor.new("New Yeller")
- c.LeftArmColor = BrickColor.new("New Yeller")
- c.RightLegColor = BrickColor.new("Br. yellowish green")
- c.LeftLegColor = BrickColor.new("Br. yellowish green")
- c.TorsoColor = BrickColor.new("Bright blue")
- for _,v in pairs(player.Character:GetChildren()) do if v:IsA("Shirt") or v:IsA("Pants") or v:IsA("Hat") then v:Destroy() end end
- end
- end))
- end
- end)
- addCmd("ghost","ghost" .. Bet .. "player | Ghostifies the wanted player.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character then
- local c = player.Character:FindFirstChild("Body Colors") or Instance.new("BodyColors",player.Character)
- c.HeadColor = BrickColor.new("Institutional white")
- c.RightArmColor = BrickColor.new("Institutional white")
- c.LeftArmColor = BrickColor.new("Institutional white")
- c.RightLegColor = BrickColor.new("Institutional white")
- c.LeftLegColor = BrickColor.new("Institutional white")
- c.TorsoColor = BrickColor.new("Institutional white")
- for _,v in pairs(player.Character:GetChildren()) do if v:IsA("Shirt") or v:IsA("Pants") or v:IsA("Hat") then v:Destroy() end if v:IsA("BasePart") then v.Transparency = .3 end if v:IsA("Hat") then
- local handle = v:FindFirstChild("Handle")
- if handle then
- if handle:IsA("BasePart") then handle.Transparency = .7 end end
- end
- end
- end
- end))
- end
- end)
- addCmd("zombie","zombie" .. Bet .. "player | Zombifies the wanted player.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character then
- local c = player.Character:FindFirstChild("Body Colors") or Instance.new("BodyColors",player.Character)
- c.HeadColor = BrickColor.new("Bright green")
- c.RightArmColor = BrickColor.new("Bright green")
- c.LeftArmColor = BrickColor.new("Bright green")
- c.RightLegColor = BrickColor.new("Earth green")
- c.LeftLegColor = BrickColor.new("Earth green")
- c.TorsoColor = BrickColor.new("Brown")
- for _,v in pairs(player.Character:GetChildren()) do if v:IsA("Shirt") or v:IsA("Pants") or v:IsA("Hat") then v:Destroy() end end
- end
- end))
- end
- end)
- addCmd("sword","sword" .. Bet .. "player | Gives the wanted player a sword.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- local new = services["InsertService"]:LoadAsset(124472052)
- local stuff = new:GetChildren()
- if #stuff <= 0 then new:Destroy() return end
- for _,v in pairs(stuff) do v.Parent = player.Backpack end
- end))
- end
- end)
- addCmd("gun","gun" .. Bet .. "player | Gives the wanted player a gun.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- local new = services["InsertService"]:LoadAsset(95354288)
- local stuff = new:GetChildren()
- if #stuff <= 0 then new:Destroy() return end
- for _,v in pairs(stuff) do v.Parent = player.Backpack end
- end))
- end
- end)
- addCmd("respawn","respawn" .. Bet .. "player | Respawns the player.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- player:LoadCharacter()
- end))
- end
- end)
- addCmd("noclip","noclip" .. Bet .. "player | Enables the wanted player to go into noclip mode.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character and player.Character:FindFirstChild("Torso") then
- for _,v in pairs(player.Character.Torso:GetChildren()) do if v:IsA("BodyPosition") then v:Destroy() end end
- for _,v in pairs(waitForChild(player,"PlayerGui",2):GetChildren()) do if v.Name == "GameMakerStudios_NOCLIP" then v:Destroy() end end
- local bp = Instance.new("BodyPosition")
- bp.maxForce = Vector3.new(0,1/0,0)
- bp.Parent = player.Character.Torso
- bp.position = player.Character.Torso.Position
- local bv = Instance.new("BodyVelocity")
- bv.maxForce = Vector3.new(0,1/0,0)
- bv.Parent = player.Character.Torso
- bv.velocity = Vector3.new(0,0,0)
- if player.Character:FindFirstChild("Animate") then
- player.Character.Animate:Destroy()
- end
- localscript([[
- script.Name = "Animate"
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- -- ANIMATION
- -- declarations
- local Figure = script.Parent
- local Torso = waitForChild(Figure, "Torso")
- local RightShoulder = waitForChild(Torso, "Right Shoulder")
- local LeftShoulder = waitForChild(Torso, "Left Shoulder")
- local RightHip = waitForChild(Torso, "Right Hip")
- local LeftHip = waitForChild(Torso, "Left Hip")
- local Neck = waitForChild(Torso, "Neck")
- local Humanoid = waitForChild(Figure, "Humanoid")
- local pose = "Standing"
- local toolAnim = "None"
- local toolAnimTime = 0
- local jumpMaxLimbVelocity = 0.75
- -- functions
- function onRunning(speed)
- if speed>0 then
- pose = "Running"
- else
- --pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- end
- function onClimbing()
- end
- function onGettingUp()
- end
- function onFreeFall()
- end
- function onFallingDown()
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- end
- function onSwimming(speed)
- end
- function moveJump()
- RightShoulder.MaxVelocity = jumpMaxLimbVelocity
- LeftShoulder.MaxVelocity = jumpMaxLimbVelocity
- RightShoulder:SetDesiredAngle(3.14)
- LeftShoulder:SetDesiredAngle(-3.14)
- RightHip:SetDesiredAngle(0)
- LeftHip:SetDesiredAngle(0)
- end
- -- same as jump for now
- function moveFreeFall()
- RightShoulder.MaxVelocity = jumpMaxLimbVelocity
- LeftShoulder.MaxVelocity = jumpMaxLimbVelocity
- RightShoulder:SetDesiredAngle(3.14)
- LeftShoulder:SetDesiredAngle(-3.14)
- RightHip:SetDesiredAngle(0)
- LeftHip:SetDesiredAngle(0)
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder:SetDesiredAngle(3.14 /2)
- LeftShoulder:SetDesiredAngle(-3.14 /2)
- RightHip:SetDesiredAngle(3.14 /2)
- LeftHip:SetDesiredAngle(-3.14 /2)
- end
- function getTool()
- for _, kid in ipairs(Figure:GetChildren()) do
- if kid.className == "Tool" then return kid end
- end
- return nil
- end
- function getToolAnim(tool)
- for _, c in ipairs(tool:GetChildren()) do
- if c.Name == "toolanim" and c.className == "StringValue" then
- return c
- end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- RightShoulder:SetDesiredAngle(1.57)
- return
- end
- if (toolAnim == "Slash") then
- RightShoulder.MaxVelocity = 0.5
- RightShoulder:SetDesiredAngle(0)
- return
- end
- if (toolAnim == "Lunge") then
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightHip.MaxVelocity = 0.5
- LeftHip.MaxVelocity = 0.5
- RightShoulder:SetDesiredAngle(1.57)
- LeftShoulder:SetDesiredAngle(1.0)
- RightHip:SetDesiredAngle(1.57)
- LeftHip:SetDesiredAngle(1.0)
- return
- end
- end
- function move(time)
- local amplitude
- local frequency
- if (pose == "Jumping") then
- moveJump()
- return
- end
- if (pose == "FreeFall") then
- moveFreeFall()
- return
- end
- if (pose == "Seated") then
- moveSit()
- return
- end
- local climbFudge = 0
- if (pose == "Running") then
- if (RightShoulder.CurrentAngle > 1.5 or RightShoulder.CurrentAngle < -1.5) then
- RightShoulder.MaxVelocity = jumpMaxLimbVelocity
- else
- RightShoulder.MaxVelocity = 0.15
- end
- if (LeftShoulder.CurrentAngle > 1.5 or LeftShoulder.CurrentAngle < -1.5) then
- LeftShoulder.MaxVelocity = jumpMaxLimbVelocity
- else
- LeftShoulder.MaxVelocity = 0.15
- end
- amplitude = 1
- frequency = 9
- elseif (pose == "Climbing") then
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- amplitude = 1
- frequency = 9
- climbFudge = 3.14
- else
- amplitude = 0.1
- frequency = 1
- end
- desiredAngle = amplitude * math.sin(time*frequency)
- RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
- LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
- RightHip:SetDesiredAngle(-desiredAngle)
- LeftHip:SetDesiredAngle(-desiredAngle)
- local tool = getTool()
- if tool then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- toolAnim = "None"
- toolAnimTime = 0
- end
- end
- -- connect events
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- --Humanoid.Jumping:connect(onJumping)
- --Humanoid.Climbing:connect(onClimbing)
- --Humanoid.GettingUp:connect(onGettingUp)
- --Humanoid.FreeFalling:connect(onFreeFall)
- --Humanoid.FallingDown:connect(onFallingDown)
- Humanoid.Seated:connect(onSeated)
- Humanoid.PlatformStanding:connect(onPlatformStanding)
- --Humanoid.Swimming:connect(onSwimming)
- -- main program
- local runService = game:service("RunService");
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- ]],player.Character)
- localscript([[
- script.Name = "GameMakerStudios_NOCLIP"
- script.Parent.Humanoid.Changed:connect(function(change)
- if change == "Jump" then
- script.Parent.Humanoid.Jump = false
- end
- end)]],player.Character)
- localscript([[
- script.Name = "GameMakerStudios_NOCLIP"
- local body = {"Head","Torso","Left Leg","Right Leg","Right Arm","Left Arm"}
- while not game:GetService('Players').LocalPlayer.Character do wait() end
- local char = game:GetService('Players').LocalPlayer.Character
- game:GetService("RunService").Stepped:connect(function()
- if char then
- for _,part in pairs(body) do
- char[part].CanCollide = false
- end
- end
- end)
- ]],waitForChild(player,"PlayerGui",5))
- end
- end))
- end
- end)
- addCmd("noname","noname" .. Bet .. "player | Removes the name above the player's head.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character and player.Character:FindFirstChild("Head") then
- local head = player.Character:FindFirstChild("Head")
- local clone = head:Clone()
- clone.Name = "GameMakerStudios_FAKEHEAD"
- clone.Parent = head
- clone.CFrame = head.CFrame
- clone.Transparency = 0
- local weld = Instance.new("Weld",clone)
- weld.Part1 = head
- weld.Part0 = clone
- local face = clone:FindFirstChild("face")
- if face then face:Destroy() end
- local mesh = clone:FindFirstChild("Mesh")
- if mesh and mesh:IsA("SpecialMesh") then mesh.Scale = Vector3.new(mesh.Scale.x*999,mesh.Scale.y*.999,mesh.Scale.z*.999) end
- head.Transparency = 1
- end
- end))
- end
- end)
- addCmd("unnoname","unnoname" .. Bet .. "player | Changes the player name to what it originally was.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character and player.Character:FindFirstChild("Head") then
- for _,v in pairs(player.Character.Head:GetChildren()) do
- if v:IsA("Model") or v.Name == "GameMakerStudios_FAKEHEAD" then v:Destroy() end
- end
- player.Character.Head.Transparency = 0
- end
- end))
- end
- end)
- addCmd("unname","unname" .. Bet .. "player | Changes the player name to what it originally was.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character and player.Character:FindFirstChild("Head") then
- for _,v in pairs(player.Character.Head:GetChildren()) do
- if v:IsA("Model") or v.Name == "GameMakerStudios_FAKEHEAD" then v:Destroy() end
- end
- player.Character.Head.Transparency = 0
- end
- end))
- end
- end)
- addCmd("name","name" .. Bet .. "player" .. Bet .. "text | Sets the name above the player's head to what ever you want.",function(msg,speaker)
- local name = {}
- local st = msg:gsub(Bet,":")
- for i=1,#st do
- if st:sub(i,i) == ":" then
- name["player"] = st:sub(1,i-1)
- name["name"] = st:sub(i+1)
- break
- end
- end
- if name["player"] then
- local players = gp(speaker,name["player"])
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character and player.Character:FindFirstChild("Head") then
- local head = player.Character:FindFirstChild("Head")
- for _,v in pairs(player.Character.Head:GetChildren()) do
- if v:IsA("Model") or v.Name == "GameMakerStudios_FAKEHEAD" then v:Destroy() end
- end
- local model = Instance.new("Model")
- local humanoid = Instance.new("Humanoid",model)
- local fhead = head:Clone() fhead.Name = "GameMakerStudios_FAKEHEAD" fhead.Parent = model
- model.Parent = head
- fhead.CFrame = head.CFrame
- fhead.Name = "Head"
- fhead.Transparency = 0
- local weld = Instance.new("Weld",fhead)
- weld.Part1 = fhead
- weld.Part0 = head
- local face = fhead:FindFirstChild("face")
- if face then face:Destroy() end
- local mesh = fhead:FindFirstChild("Mesh")
- if mesh and mesh:IsA("SpecialMesh") then mesh.Scale = Vector3.new(mesh.Scale.x*999,mesh.Scale.y*.999,mesh.Scale.z*.999) end
- head.Transparency = 1
- model.Name = name["name"]
- while player and player.Character and player.Character:FindFirstChild("Humanoid") do
- local human = player.Character:FindFirstChild("Humanoid")
- if human and human.Parent then
- if humanoid and humanoid.Parent then
- humanoid.MaxHealth = human.MaxHealth
- humanoid.Health = human.Health
- end
- end
- wait()
- end
- end
- end))
- end
- end
- end)
- addCmd("fly","fly" .. Bet .. "player | Gives the wanted player a hover vehicle.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player and player.Character and player.Character:FindFirstChild("Torso") then
- local car = props:FindFirstChild("hover vehicle")
- if car then
- local clone = car:Clone()
- if clone then
- local pos = Instance.new("Vector3Value")
- pos.Parent = clone
- pos.Name = "StelthPos"
- pos.Value = (player.Character.Torso.Position + Vector3.new(0,0,5))
- clone.Parent = services["Workspace"]
- clone:MakeJoints()
- clone:MoveTo(pos.Value)
- --table.insert(clean,clone)
- for _,v in pairs(clone:GetChildren()) do
- if v:IsA("BasePart") then
- if v.Anchored then
- v.Anchored = false
- end
- end
- end
- end
- end
- end
- end))
- end
- end)
- addCmd("gear","gear" .. Bet .. "player" .. Bet .. "gearID | Gives the wanted player a gear.",function(msg,speaker)
- local gearStuff = {}
- local st = msg:gsub(Bet,":")
- for i=1,#st do
- if st:sub(i,i) == ":" then
- gearStuff["id"] = st:sub(i+1)
- gearStuff["player"] = st:sub(1,i-1)
- break
- end
- end
- print(gearStuff["player"],gearStuff["id"])
- if not gearStuff["player"] then return end
- if not gearStuff["id"] then return end
- local players = gp(speaker,gearStuff["player"])
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player.Character then
- local gear = services["InsertService"]:LoadAsset(gearStuff["id"])
- local stuff = gear:GetChildren()
- if #stuff <= 0 then gear:Destroy() return end
- for _,v in pairs(stuff) do
- if v:IsA("Tool") then
- v.Parent = player.Character
- end
- end
- end
- end))
- end
- end)
- addCmd("speed","speed" .. Bet .. "player" .. Bet .. "number | Gives the wanted player the wanted speed.",function(msg,speaker)
- local ws = {}
- local st = msg:gsub(Bet,":")
- for i=1,#st do
- if st:sub(i,i) == ":" then
- ws["speed"] = st:sub(i+1)
- ws["player"] = st:sub(1,i-1)
- break
- end
- end
- print(ws["player"],ws["speed"])
- if not ws["player"] then return end
- if not ws["speed"] then return end
- if not tonumber(ws["speed"]) then return end
- local players = gp(speaker,ws["player"])
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if player.Character then
- player.Character.Humanoid.WalkSpeed = tonumber(ws["speed"])
- end
- end))
- end
- end)
- addCmd("kick","kick" .. Bet .. "player | Kicks (disconnects) the player from the server - though it is not perminent, it can scare people.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if not isOwner(player) then
- services["Debris"]:AddItem(player,1)
- localscript("local player = game:GetService('Players').LocalPlayer\
- player.Parent = nil\
- wait()\
- player.Parent = game:GetService('Players')",waitForChild(player,"Backpack",10))
- end
- end))
- end
- end)
- addCmd("admin","admin" .. Bet .. "player | Gives administrative permissions to the wanted player.",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- addAdmin(player)
- Message(player,"SYSTEM","You have been admined from " .. speaker.Name .. "!","C O N F I R M")
- Message(speaker,"SYSTEM","Successfully gave administrative permissions to " .. player.Name .. ".","C O N F I R M")
- end))
- end
- end)
- addCmd("unadmin","unadmin" .. Bet .. "player | Removes administrative permissions to the wanted player. (Owners cannot be unadmined)",function(msg,speaker)
- local players = gp(speaker,msg)
- for _,player in pairs(players) do
- coroutine.resume(coroutine.create(function()
- unAdmin(player)
- Message(player,"SYSTEM","You have been un-admined from " .. speaker.Name .. "","C O N F I R M")
- Message(speaker,"SYSTEM","Successfully removed administrative permissions from " .. player.Name .. ".","C O N F I R M")
- end))
- end
- end)
- function onWorkspaceChildAdded(child)
- if child:IsA("Hat") or child:IsA("Tool") or child:IsA("Shirt") or child:IsA("Pants")
- or child:IsA("Message") or child:IsA("Hint") then table.insert(clean,child) end
- end
- function _G:onChatted(player,msg)
- if not isAdmin(player) then return end
- --coroutine.resume(coroutine.create(function()
- print("Game Maker Studios - Recieved")
- for _,v in pairs(_G.GameMakerStudios_cmds) do
- local sub = string.sub(msg,1,#v[1])
- if sub == "" or sub == " " then return end
- if v[1]:lower() == sub:lower() then
- if msg:sub(v[1]:len()+Bet:len(),v[1]:len()+Bet:len()) == Bet then
- coroutine.resume(coroutine.create(function()
- local new = msg:sub(v[1]:len()+Bet:len()+1)
- loadstring(v[3](new,player))
- end))
- end
- end
- end
- --end))
- end
- function setUp(player)
- coroutine.resume(coroutine.create(function()
- if serverLock then
- localscript("local player = game:GetService('Players').LocalPlayer\
- player.Parent = nil\
- wait()\
- player.Parent = game:GetService('Players')",waitForChild(player,"Backpack",10000))
- return
- end
- if not isAdmin(player) then return end
- player.CharacterAdded:connect(function(character)
- coroutine.resume(coroutine.create(function()
- if oldAnimationOnEnter then
- Animate(player)
- end
- if Super_Safe_Chatter_Supported then
- CmdBar(player)
- end
- if soloGame then
- CmdBar(player)
- end
- -- onCharacterAdded
- end))
- end)
- BannedAction(player)
- PlrIsAmin(player)
- if soloGame then
- CmdBar(player)
- end
- if Super_Safe_Chatter_Supported then
- CmdBar(player)
- end
- player.Chatted:connect(
- function(msg)
- _G:onChatted(player,msg)
- -- onChatted
- end
- )
- -- onEnter
- end))
- end
- services["Players"].PlayerAdded:connect(
- function(player)
- coroutine.resume(coroutine.create(function()
- setUp(player)
- end))
- end
- )
- for _,player in pairs(services["Players"]:GetPlayers()) do
- coroutine.resume(coroutine.create(function()
- setUp(player)
- end))
- end
- services["Workspace"].ChildAdded:connect(onWorkspaceChildAdded)
- if props then
- props.Parent = services["Lighting"]
- end
- print("Game Maker Studios - LOADED.")
- script.Name = "admin"
- Script("print('Game Maker Studios - LOADED.') script:Destroy()",services["Workspace"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement