Advertisement
Jaden11

Admin command

Nov 29th, 2014
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. -[[
  2.  
  3. create ur commands list here! :)
  4.  
  5. example.
  6.  
  7. kill/
  8.  
  9. --]]
  10.  
  11. local msg = Instance.new("Hint")
  12.  
  13. msg.Name = "Message"
  14. msg.Parent = Workspace
  15. msg.Text = "Loading Sn0wCommands Script made by IRONblock1551"
  16. wait(10)
  17. msg:remove()
  18. end
  19.  
  20. function PfP(t)
  21. local Sel = {}
  22. for i, a in pairs(game.Players:GetChildren()) do
  23. if string.lower(string.sub(a.Name,1,string.len(t))) == string.lower(t) then
  24. Sel[#Sel + 1] = a
  25. end
  26. end
  27. return Sel
  28. end
  29.  
  30. player = game.Players["itsJaden2"]
  31.  
  32. function commands(t)
  33. if string.lower(t) == "kill/me" then
  34. game.Workspace[player.Name].Humanoid.Health = 0
  35. elseif string.sub(string.lower(t),1,5) == "kill/" then
  36. for i, a in pairs(PfP(string.sub(string.lower(t),6))) do
  37. a.Character.Humanoid.Health = 0
  38. end
  39. end
  40. end
  41.  
  42. player.Chatted:connect(commands)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement