Advertisement
Guest User

My1stExploit

a guest
Jun 27th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. Stack Overflow
  2.  
  3. sign up log in
  4.  
  5. By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.
  6.  
  7. Questions
  8.  
  9.  
  10.  
  11. Jobs
  12.  
  13.  
  14.  
  15. Tags
  16.  
  17.  
  18.  
  19. Users
  20.  
  21.  
  22.  
  23. Badges
  24.  
  25.  
  26.  
  27. Ask
  28.  
  29. up vote-1down votefavorite
  30.  
  31. Roblox Admin Command Script
  32.  
  33. lua roblox
  34.  
  35. I'm currently trying to make a new admin command script; all I have so far is the kill command... everything I've tried (so far) works unless I use the ":* me" parameter ("*"being any command and ":" being the recognition character. I don't quite understand why this doesn't work.
  36.  
  37. I've tried a few crazy things to try to make this work, so the code may be butchered from what I had it as originally...
  38.  
  39. admins = {"FakeNameHereSoNoStalkers"} function kill(target) for i=1,#target do game.Players.target[i].Character:BreakJoints() end end function isadmin(source) for i=1,#admins do if admins[i]:lower()==source:lower() then return true end end end function findplayer(msg, source) people = {} c = game.Players:GetChildren() if msg:lower()=="me" then table.insert(people, source) return people elseif msg:lower()=="all" then for i=1,#c do table.insert(people, c[i]) end return people else local length = msg:len() for i=1,#c do if c[i].Name:lower():sub(1, length)==msg:lower() then table.insert(people, c[i]) end end return people end end game.Players.PlayerAdded:connect(function(player) source = player.Name if isadmin(source) == true then player.Chatted:connect(function(msg, player) if msg:lower():sub(1,6)==":kill " then msg = msg:sub(7) target = findplayer(msg, source) kill(target) end end) end end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement