Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- cmdscript.lua + safazi's edit
- written by safazi
- THE OFFICIAL MULTI ADMIN UPDATE:
- ADDCMD NOW TAKES TWO FUNCTION ARGUMENTS:
- ARGS
- and
- SPEAKER
- THE SPEAKER IS THE PLAYER OBJECT THAT SPOKE THE COMMAND
- WE HOPE THIS OPENS UP NEW OPPURTUNITIES FOR YOUR EDITS!
- -safazi
- HOW TO ADD COMMANDS
- Scroll to bottom, add after it says "Add commands here"
- PLEASE KEEP ALIASES LOWERCASE
- example with aliases:
- addcmd('command name','command description',{'alias for command','another alias'},
- function(args,speaker)
- --code here
- end)
- example without aliases:
- addcmd('command name','command description',nil,
- function(args,speaker)
- --code here
- end)
- important things:
- _char(playername) gets a players character from name if they exist
- example:
- local char=_char('TheOfficalNoob4788') --gets my character!
- command functions are passed the table "args", which holds the args after the command
- example:
- ;command arg1 arg2 arg3 arg4
- --]]
- local gPlayers = game:GetService("Players")
- local admin = gPlayers.LocalPlayer.Name
- local bannedplyrs = {}
- local admins = {'TheOfficalNoob4788'} -- names here of people who have access to your commands! (Your name doesn't need to be in here.)
- -- declare services / init stuff --
- local services={}
- local cmds={}
- local std={}
- services.players=gPlayers
- services.lighting=game:GetService('Lighting')
- services.workspace=game:GetService('Workspace')
- services.events = {}
- local user = gPlayers.LocalPlayer
- local cmdprefix=';'
- local scriptprefix='\\'
- local split=" "
- updateevents=function()
- for i,v in pairs(services.events) do services.events:remove(i) v:disconnect() end
- for i,v in pairs(gPlayers:players())do
- local ev = v.Chatted:connect(function(msg) do_exec(msg,v) end)
- services.events[#services.events+1] = ev
- end
- end
- -- safazi's lib --
- std.inTable=function(tbl,val)
- if tbl==nil then return false end
- for _,v in pairs(tbl)do
- if v==val then return true end
- end
- return false
- end
- std.out=function(str)
- print(str)
- end
- std.list=function(tbl) --turns table into list with commas
- local str=''
- for i,v in pairs(tbl)do
- str=str..tostring(v)
- if i~=#tbl then str=str..', ' end
- end
- return str
- end
- std.endat=function(str,val)
- local z=str:find(val)
- if z then
- return str:sub(0,z-string.len(val)),true
- else
- return str,false
- end
- end
- std.first=function(str) return str:sub(1,1) end
- isAdmin=function(name)
- if name==admin then
- return true
- elseif admins[name]==true then
- return true
- end
- return false
- end
- gPlayers.PlayerAdded:connect(function(player)
- for i,v in pairs(bannedplyrs) do
- if player == v then player:Destroy() end
- end
- end)
- local exec=function(str)
- spawn(function()
- local script, loaderr = loadstring(str)
- if not script then
- error(loaderr)
- else
- script()
- end
- end)
- end
- local findCmd=function(cmd_name)
- for i,v in pairs(cmds)do
- if v.NAME:lower()==cmd_name:lower() or std.inTable(v.ALIAS,cmd_name:lower())then
- return v
- end
- end
- end
- local getCmd=function(msg)
- local cmd,hassplit=std.endat(msg:lower(),split)
- if hassplit then
- return {cmd,true}
- else
- return {cmd,false}
- end
- end
- local getprfx=function(strn)
- if strn:sub(1,string.len(cmdprefix))==cmdprefix then return{'cmd',string.len(cmdprefix)+1}
- elseif strn:sub(1,string.len(scriptprefix))==scriptprefix then return{'exec',string.len(scriptprefix)+1}
- end return
- end
- local getArgs=function(str)
- local args={}
- local new_arg=nil
- local hassplit=nil
- local s=str
- repeat
- new_arg,hassplit=std.endat(s:lower(),split)
- if new_arg~='' then
- args[#args+1]=new_arg
- s=s:sub(string.len(new_arg)+string.len(split)+1)
- end
- until hassplit==false
- return args
- end
- local function execCmd(str, plr)
- local s_cmd
- local a
- local cmd
- s_cmd = getCmd(str) --separate command from string using split {command name,arg bool (for arg system)}
- cmd = findCmd(s_cmd[1]) --get command object {NAME,DESC,{ALIASES},function(args)}
- if cmd == nil then return end
- a = str:sub(string.len(s_cmd[1]) + string.len(split) + 1)--start string "a" after command and split
- local args=getArgs(a)--gets us a nice table of arguments
- pcall(function()
- cmd.FUNC(args, plr)
- end)
- end
- function do_exec(str,plr)
- if not isAdmin(plr.Name)then return end
- str=str:gsub('/e ','')--remove "/e " the easy way!
- local t=getprfx(str)
- if t==nil then return end
- str=str:sub(t[2])
- if t[1]=='exec' then
- exec(str)
- elseif t[1]=='cmd' then
- execCmd(str, plr)
- end
- end
- updateevents()
- --game.Players.LocalPlayer.Chatted:connect(doexec)
- local _char=function(plr_name)
- for i,v in pairs(game.Players:GetChildren())do
- if v:IsA'Player'then
- if v.Name==plr_name then return v.Character end
- end
- end
- return
- end
- local _plr=function(plr_name)
- for i,v in pairs(game.Players:GetChildren())do
- if v:IsA'Player'then
- if v.Name==plr_name then return v end
- end
- end
- return
- end
- function addcmd(name,desc,alias,func)
- cmds[#cmds+1]=
- {
- NAME=name;
- DESC=desc;
- ALIAS=alias;
- FUNC=func;
- }
- end
- local function getPlayer(name)
- local nameTable = {}
- name=name:lower()
- if name == "me" then
- return {admin}
- elseif name == "others" then
- for i,v in pairs(gPlayers:GetChildren()) do
- if v:IsA'Player'then
- if v.Name~=admin then
- nameTable[#nameTable+1]=v.Name
- end
- end
- end
- elseif name == "all" then
- for i,v in pairs(gPlayers:GetChildren()) do
- if v:IsA'Player'then
- nameTable[#nameTable+1]=v.Name
- end
- end
- else
- for i,v in pairs(gPlayers:GetChildren()) do
- local lname = v.Name:lower()
- local i,j = lname:find(name)
- if i == 1 then
- return {v.Name}
- end
- end
- end
- return nameTable
- end
- -- commands --
- addcmd('ff',"ff's a player",{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players)do
- local pchar=_char(v)
- Instance.new("ForceField", pchar)
- end
- end)
- addcmd('noff',"unff's a player",{'unff'},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players)do
- local pchar=_char(v)
- for j,v1 in pairs(pchar:GetChildren()) do
- if v1:IsA("ForceField") then
- v1:Destroy()
- end
- end
- end
- end)
- addcmd('smoke','give a player smoke',{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players)do
- local pchar=_char(v)
- Instance.new("Smoke", pchar.Torso)
- end
- end)
- addcmd('nosmoke','remove smoke from a player',{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players)do
- local pchar=_char(v)
- for j,v1 in pairs(pchar.Torso:GetChildren()) do
- if v1:IsA("Smoke") then
- v1:Destroy()
- end
- end
- end
- end)
- addcmd('btools','gives a player btools',{},
- function(args)
- local players=getPlayer(args[1])
- if players ~= nil then
- for i, v in pairs(players) do
- Instance.new("HopperBin", gPlayers[v].Backpack).BinType = 2
- Instance.new("HopperBin", gPlayers[v].Backpack).BinType = 3
- Instance.new("HopperBin", gPlayers[v].Backpack).BinType = 4
- end
- end
- end)
- addcmd('god','gods player',{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players)do
- local pchar=_char(v)
- if pchar then pchar.Humanoid.MaxHealth=math.huge end
- end
- end)
- addcmd('sgod','silently gods player',{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players)do
- local pchar=_char(v)
- spawn(function()
- pchar.Humanoid.MaxHealth = 10000000
- wait()
- pchar.Humanoid.Health = 10000000
- end)
- end
- end)
- addcmd('ungod','removes god from a player',{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players)do
- local pchar=_char(v)
- if pchar then
- pchar.Humanoid.MaxHealth=100
- pchar.Humanoid.Health=100
- end
- end
- end)
- addcmd('heal','resets a players health',{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players)do
- local pchar=_char(v)
- if pchar then pchar.Humanoid.Health=pchar.Humanoid.MaxHealth;end
- end
- end)
- addcmd('frz','freezes a player',{},
- function(args)
- local players = getPlayer(args[1])
- if players ~= nil then
- for i, v in pairs(players) do
- _char(v).Torso.Anchored = true
- end
- end
- end)
- addcmd('thaw','freezes a player',{},
- function(args)
- local players = getPlayer(args[1])
- if players ~= nil then
- for i, v in pairs(players) do
- _char(v).Torso.Anchored = false
- end
- end
- end)
- addcmd('kill','kills a player',{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players)do
- local pchar=_char(v)
- if pchar then pchar.Humanoid.MaxHealth=0;pchar.Humanoid.Health=0;end
- end
- end)
- addcmd('sound','plays a sound',{},
- function(args)
- local function dels(instance)
- for i,v in pairs(instance:GetChildren())do
- if v:IsA'Sound'then v:Destroy()end
- dels(v)
- end
- end
- dels(workspace)
- local c=args[1]or'stop'
- if std.inTable({'stop'},c:lower())then return end
- local s=Instance.new("Sound", workspace)
- s.Looped = true
- s.SoundId = "rbxassetid://"..c
- s.Volume=1
- s:Play()
- end)
- addcmd('explode','explode a player', {},
- function(args)
- local players=getPlayer(args[1])
- for i, v in pairs(players) do
- local char = _char(v)
- if char:FindFirstChild("Torso") then
- Instance.new("Explosion", char).Position = char.Torso.Position
- end
- end
- end)
- addcmd('invis','make a player invisible',{},
- function(args)
- local players=getPlayer(args[1])
- for i, v in pairs(players) do
- for k, v2 in pairs(_char(v):GetChildren()) do
- if v2.className == "Part" then
- if v2.Name ~= "HumanoidRootPart" then v2.Transparency = 1 end
- elseif v2.className == "Hat" then
- if v2:FindFirstChild("Handle") then
- v2.Handle.Transparency = 1
- end
- end
- if v2:FindFirstChild("face") then
- v2.face:Destroy()
- end
- end
- end
- end)
- addcmd('vis','make a player visible',{},
- function(args)
- local players=getPlayer(args[1])
- for i, v in pairs(players) do
- for k, v2 in pairs(_char(v):GetChildren()) do
- if v2.className == "Part" then
- if v2.Name ~= "HumanoidRootPart" then v2.Transparency = 0 end
- elseif v2.className == "Hat" then
- if v2:FindFirstChild("Handle") then v2.Handle.Transparency = 0 end
- end
- if v2:FindFirstChild("face") then
- v2.face:Destroy()
- end
- end
- end
- end)
- addcmd('goto','go to a player',{},
- function(args)
- local players=getPlayer(args[1])
- if players ~= nil and _char(players[1]):FindFirstChild("HumanoidRootPart") then
- _char(admin).HumanoidRootPart.CFrame = _char(players[1]).HumanoidRootPart.CFrame
- end
- end)
- addcmd('bring','bring a player to you',{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players) do
- if _char(v):FindFirstChild("HumanoidRootPart") then
- _char(v).HumanoidRootPart.CFrame = _char(admin).HumanoidRootPart.CFrame
- end
- end
- end)
- addcmd('tp','teleport player 1 to player 2',{},
- function(args)
- local players1=getPlayer(args[1])
- local players2=getPlayer(args[2])
- if not players2[1] then return end
- for i,v in pairs(players1) do
- if _char(v):FindFirstChild("HumanoidRootPart") and _char(players2[1]):FindFirstChild("HumanoidRootPart") then
- _char(v).HumanoidRootPart.CFrame = _char(players2[1]).HumanoidRootPart.CFrame
- end
- end
- end)
- addcmd('charapp','change a players appearance',{},
- function(args)
- local players=getPlayer(args[1])
- if not args[1]or not args[2]then return end
- local id=args[2]
- if players ~= nil then
- for i,v in pairs(players) do
- gPlayers[v].CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId="..id
- if _char(v):FindFirstChild("Head") then
- _char(v).Head:Destroy()
- end
- end
- end
- end)
- addcmd('ws','change a players walkspeed',{},
- function(args)
- local players=getPlayer(args[1])
- if not args[1]or not args[2]then return end
- local num=args[2]
- for i,v in pairs(players) do
- if _char(v):FindFirstChild("Humanoid") then
- _char(v).Humanoid.WalkSpeed=tonumber(num)
- end
- end
- end)
- addcmd('time','change the time of day',{},
- function(args)
- if not args[1]then return end
- local time_=tonumber(args[1])
- game.Lighting:SetMinutesAfterMidnight(time_*60)
- end)
- addcmd('kick','kick a player',{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players) do
- gPlayers[v]:Destroy()
- end
- end)
- addcmd('ban','ban a player',{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players) do
- bannedplyrs[#bannedplyrs+1]=v
- gPlayers[v]:Destroy()
- end
- end)
- addcmd('unlockws','unlock the whole workspace',{},
- function(args)
- local function unlock(instance)
- for i,v in pairs(instance:GetChildren()) do
- if v:IsA("BasePart") then
- v.Locked = false
- end
- unlock(v)
- end
- end
- unlock(workspace)
- end)
- addcmd('unanchorws','unanchor the whole workspace',{},
- function(args)
- local function unanchor(instance)
- for i,v in pairs(instance:GetChildren()) do
- if v:IsA("BasePart") then
- v.Anchored=false
- end
- unanchor(v)
- end
- end
- unanchor(workspace)
- end)
- addcmd('hat','give player a hat ingame',{},
- function(args)
- if not args[1] or not args[2] then return end
- local players=getPlayer(args[1])
- local id=args[2]
- local hat = game:GetObjects("rbxassetid://"..id)[1]
- if hat:IsA("Hat") then
- for i,v in pairs(players) do
- hat:clone().Parent = _char(v)
- end
- end
- hat:Destroy()
- end)
- addcmd('gear','give player a gear ingame',{},
- function(args)
- spawn(function()
- if not args[1] or not args[2] then return end
- local players=getPlayer(args[1])
- local id=args[2]
- local model = game:GetService("InsertService"):LoadAsset(id)
- for i,v in pairs(players) do
- for _,j in pairs(model:GetChildren()) do
- if j:IsA("Tool") then
- j:Clone().Parent = gPlayers[v].Backpack
- end
- end
- end
- model:Destroy()
- end)
- end)
- addcmd('pstools','give player personal server tools',{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players) do
- gPlayers[v].PersonalServerRank = 240
- end
- end)
- addcmd('skick','kicks a player by shutting them down, takes a few seconds',{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players) do
- spawn(function()
- gPlayers[v].PersonalServerRank = 240
- gPlayers[v].Backpack:WaitForChild("ClassicTool")
- gPlayers[v].PersonalServerRank = 0
- end)
- end
- end)
- addcmd('admin','gives a player admin',{},
- function(args)
- if not args[1]then return end
- local players=getPlayer(args[1])
- table.foreach(players,function(k,v)
- admins[v]=true
- end)
- end)
- addcmd('unadmin','removes a players admin',{},
- function(args)
- if not args[1] then return end
- local players=getPlayer(args[1])
- table.foreach(players,function(k,v)
- admins[v]=nil
- end)
- end)
- addcmd('dark','makes the game dark',{'drk'},
- function()
- game.Lighting.TimeOfDay="21:00:00"
- game.Lighting.FogColor=Color3.new(0,0,0)
- game.Lighting.Ambient=Color3.new(0,0,0)
- game.Lighting.ShadowColor=Color3.new(0,0,0)
- game.Lighting.OutdoorAmbient=Color3.new(0,0,0)
- end)
- addcmd('reverse','reverse the players controls',{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players) do
- gPlayers[v].Character.Humanoid.WalkSpeed=tonumber(-16)
- end
- end)
- addcmd('creeper','make the player a creeper',{'crpr'},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players)do
- if gPlayers[v] and gPlayers[v].Character and gPlayers[v].Character:findFirstChild("Torso") then
- if gPlayers[v].Character:findFirstChild("Shirt") then gPlayers[v].Character.Shirt.Parent = gPlayers[v].Character.Torso end
- if gPlayers[v].Character:findFirstChild("Pants") then gPlayers[v].Character.Pants.Parent = gPlayers[v].Character.Torso end
- gPlayers[v].Character.Torso.Transparency = 0
- gPlayers[v].Character.Torso.Neck.C0 = CFrame.new(0,1,0) * CFrame.Angles(math.rad(90),math.rad(180),0)
- gPlayers[v].Character.Torso["Right Shoulder"].C0 = CFrame.new(0,-1.5,-.5) * CFrame.Angles(0,math.rad(90),0)
- gPlayers[v].Character.Torso["Left Shoulder"].C0 = CFrame.new(0,-1.5,-.5) * CFrame.Angles(0,math.rad(-90),0)
- gPlayers[v].Character.Torso["Right Hip"].C0 = CFrame.new(0,-1,.5) * CFrame.Angles(0,math.rad(90),0)
- gPlayers[v].Character.Torso["Left Hip"].C0 = CFrame.new(0,-1,.5) * CFrame.Angles(0,math.rad(-90),0)
- end
- end
- end)
- addcmd('derp','make the player derp',{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players)do
- for _,x in pairs(gPlayers[v].Character.Torso:GetChildren()) do
- if x:IsA("Motor6D") then x.DesiredAngle=6 x.CurrentAngle=04340.000305 x.MaxVelocity=10.100000 end
- end
- end
- end)
- addcmd('noderp','make the player normal',{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players)do
- for _,x in pairs(gPlayers[v].Character.Torso:GetChildren()) do
- if x:IsA("Motor6D") then x.DesiredAngle=0 x.CurrentAngle=0.003809 x.MaxVelocity=0.100000 end
- end
- end
- end)
- addcmd('nuke','nuke a player', {},
- function(args)
- local players=getPlayer(args[1])
- for i, v in pairs(players) do
- local char = _char(v)
- if char:FindFirstChild("Torso") then
- if not args[2] then args[2]=20*4 end
- for i=1,args[2]*4 do
- Instance.new("Explosion", char).Position = char.Torso.Position
- end
- end
- end
- end)
- addcmd('paper','makes the player thin as paper',{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players)do
- for _,x in pairs(gPlayers[v].Character:GetChildren()) do
- if x:IsA("BasePart") then
- t=Instance.new("SpecialMesh",x)
- t.MeshType=6
- t.Scale=Vector3.new(1,1,0.1)
- elseif x:IsA("Hat") then
- t=Instance.new("SpecialMesh",x.Handle)
- t.MeshType=6
- t.Name='secrt'
- t.Scale=Vector3.new(1,1,.005)
- t.MeshId=x.Handle.Mesh.MeshId
- t.TextureId=x.Handle.Mesh.TextureId
- elseif x:IsA("Tool") or x:IsA("HopperBin") then
- t=Instance.new("SpecialMesh",x.Handle)
- t.MeshType=6
- t.Name='secrt'
- t.Scale=Vector3.new(.005,x.Handle.Mesh.Scale.y,x.Handle.Mesh.Scale.z)
- t.MeshId=x.Handle.Mesh.MeshId
- t.TextureId=x.Handle.Mesh.TextureId
- end
- end
- end
- end)
- addcmd('animation','set custom anim',{'anim'},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players)do
- t=args[2]
- if args[2]=="climb" then t="180436334" end
- if args[2]=="sit" then t="178130996" end
- if args[2]=="jump" then t="125750702" end
- if args[2]=="fall" then t="180436148" end
- for _,x in pairs(gPlayers[v].Character.Animate:GetChildren()) do
- if x:IsA("StringValue") then
- for _,c in pairs(x:GetChildren()) do if c:IsA("Animation") then c.AnimationId="rbxassetid://"..t end end
- end
- end
- end
- end)
- addcmd('ghost','makes the player a ghost',{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players)do
- for _,x in pairs(gPlayers[v].Character:GetChildren()) do
- if x:IsA("BasePart") and x.Name=="HumanoidRootPart" then
- x.Transparency=1
- else
- x.Transparency=0.5
- end
- end
- end
- end)
- addcmd('noghost','makes the player a human',{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players)do
- for _,x in pairs(gPlayers[v].Character:GetChildren()) do
- if x:IsA("BasePart") then
- x.Transparency=0
- elseif x:IsA("BasePart") and x.Name=="HumanoidRootPart" then
- x.Transparency=1
- end
- end
- end
- end)
- addcmd('playeresp','takes you right to the players.',{'esp'},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players)do
- for i,v in pairs(game.Workspace:children()) do
- if v:isA("SelectionPartLasso") then
- v:Destroy()
- end
- end
- for i, v in pairs(players) do
- local las = Instance.new("SelectionPartLasso",game.Workspace)
- las.Color = BrickColor.new("1019")
- las.Humanoid = game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
- las.Part = gPlayers[v].Character:findFirstChild("Torso")
- end
- end
- end)
- addcmd('bomb','spawns a bomb(s) above your head',{},
- function(args)
- local players=getPlayer(args[1])
- for i,v in pairs(players) do
- for i=1,args[2] do
- function bomb()
- x=game.Players.LocalPlayer.Character.Head
- local bomb2 = Instance.new("Part",game.Workspace)
- bomb2.Position = gPlayers[v].Character.Head.Position
- bomb2.Size = Vector3.new(2,2,2)
- bomb2.BrickColor = BrickColor.new(21)
- bomb2.Shape = 0
- bomb2.BottomSurface = 0
- bomb2.TopSurface = 0
- bomb2.Reflectance = 1
- bomb2.Locked = true
- wait(3)
- explosion = Instance.new("Explosion")
- explosion.BlastRadius = 12
- explosion.BlastPressure = 1000000 -- these are really wussy units
- explosion.Position = bomb2.Position
- explosion.Parent = game.Workspace
- bomb2:Remove();
- end
- spawn(bomb)
- end
- end
- end)
- addcmd('glow','gives the player a glow',{'glw'},
- function(args)
- local players = getPlayer(args[1])
- if players ~= nil then
- for i, v in pairs(players) do
- local r=args[2]
- local g=args[3]
- local b=args[4]
- if args[2]=="pink" then r="255" g="0" b="255" end
- if args[2]=="blue" then r="0" g="0" b="255" end
- if args[2]=="red" then r="255" g="0" b="0" end
- if args[2]=="white" then r="255" g="255" b="255" end
- if args[2]=="purple" then r="137"/255 g="24"/255 b="236"/255 end
- if args[2]=="green" then r="0" g="255" b="0" end
- if args[2]=="yellow" then r="255" g="255" b="0" end
- if args[2]=="orange" then r="236"/255 g="83"/255 b="22"/255 end
- if not args[5] or args[6] then args[5]=60 args[6]=1000000 end
- local x=Instance.new("PointLight", gPlayers[v].Character.Torso)
- x.Range=args[5]
- x.Color=Color3.new(r,g,b)
- x.Brightness=args[6]
- end
- end
- end)
- addcmd('noglow','removes the players glow',{'nog'},
- function(args)
- local players = getPlayer(args[1])
- if players ~= nil then
- for i, v in pairs(players) do
- for j,v1 in pairs(gPlayers[v].Character.Torso:GetChildren()) do
- if v1:IsA("PointLight") then
- v1:Destroy();
- end
- end
- end
- end
- end)
- addcmd('headlight','gives the player a headlight',{'hl'},
- function(args)
- local players = getPlayer(args[1])
- if players ~= nil then
- for i, v in pairs(players) do
- local r=args[2]
- local g=args[3]
- local b=args[4]
- if args[2]=="pink" then r="255" g="0" b="255" end
- if args[2]=="blue" then r="0" g="0" b="255" end
- if args[2]=="red" then r="255" g="0" b="0" end
- if args[2]=="white" then r="255" g="255" b="255" end
- if args[2]=="purple" then r="137"/255 g="24"/255 b="236"/255 end
- if args[2]=="green" then r="0" g="255" b="0" end
- if args[2]=="yellow" then r="255" g="255" b="0" end
- if args[2]=="orange" then r="236"/255 g="83"/255 b="22"/255 end
- local x=Instance.new("SpotLight", gPlayers[v].Character.Head)
- x.Range=5665656
- x.Angle=50
- x.Color=Color3.new(r,g,b)
- x.Brightness=34242342342
- end
- end
- end)
- addcmd('noheadlight','removes the players headlight',{'nohl'},
- function(args)
- local players = getPlayer(args[1])
- if players ~= nil then
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement