Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- local symbol = ":"
- -- can use any non-alphanumerical character as a sperater and the symbol
- plr.Chatted:connect(function(msg)
- local t = {}
- if string.sub(msg,0,1) == symbol then -- if not it will just be nil
- for word in string.gmatch(msg, "%w+") do print(word) table.insert(t,string.lower(word)) end end
- t['cmd'] = t[1] -- i like saying cmd better then 1
- if t['cmd'] == "speed" then
- for __,v in next, returnplayer(t[3]) do
- v.Character.Humanoid.WalkSpeed = t[2]
- end
- end
- if t['cmd'] == 'sword' then
- for __,v in next, returnplayer(t[2]) do
- local a = game:service("InsertService"):LoadAsset(125013769)
- a.Parent = v.Backpack; a.Sword.Parent = v.Backpack; a:remove()
- end
- end
- if t['cmd'] == 'heal' then
- for __,v in next, returnplayer(t[2]) do
- v.Character.Humanoid.Health = 100
- end
- end
- if t['cmd'] == 'health' then
- for __,v in next, returnplayer(t[3]) do
- v.Character.Humanoid.Health = t[2]
- end
- end
- if t['cmd'] == 'kill' then
- for __,v in next, returnplayer(t[2]) do
- v.Character.Humanoid.Health = 0
- end
- end
- if t['cmd'] == 'god' then
- for __,v in next, returnplayer(t[2]) do
- v.Character.Humanoid.MaxHealth = math.huge
- end
- end
- if t['cmd'] == 'ungod' then
- for __,v in next, returnplayer(t[2]) do
- v.Character.Humanoid.MaxHealth = 100
- v.Character.Humanoid.Health = 100
- end
- end
- if t['cmd'] == 'ff' or t['cmd'] == 'forcefield' then
- for __,v in next, returnplayer(t[2]) do
- Instance.new('ForceField',v.Character)
- end
- end
- if t['cmd'] == 'unff' or t['cmd'] == 'unforcefield' then
- for __,v in next, returnplayer(t[2]) do
- for __, x in next, v.Character:GetChildren() do
- if x.ClassName == 'ForceField' then x:remove() end
- end
- end
- end
- end)
- function returnplayer(varr) --could use elseifs, but im to lazy to do dat right naw
- local var = varr
- local plrs = {}
- if var == 'all' then for __,v in next, game.Players:GetChildren() do
- table.insert(plrs,v)
- end end
- if var == 'others' then
- for __,v in next, game.Players:GetChildren() do
- if v ~= plr then
- table.insert(plrs,v)
- end
- end
- end
- if var == 'me' then
- table.insert(plrs,plr)
- end
- return plrs
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement