Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 13 Feb 2013 12:27 PM |
Its a ban and unban script, if i say for example ban/fed i would be banned or someone else.. and unban/fed to unban those i've banned:
banned = {}
game.Players.Fedorakid.Chatted:connect(function(msg) if msg:lower():sub(1,4) == "ban/" then for _,v in pairs(game.Players:GetPlayers()) do if string.find(v.Name:lower(), msg:sub(4):lower()) then table.insert(banned, v.Name) v:Destroy() end end elseif msg:sub(1,6):lower() == "unban/" then for _,v in pairs(banned) do if v:lower == msg:sub(7):lower() then table.remove(banned, v) end end end end)
|
|
|
| Report Abuse |
|
dmjoe
|
  |
| Joined: 01 May 2009 |
| Total Posts: 2387 |
|
|
| 13 Feb 2013 12:32 PM |
I hate "would this work" threads.
Try it before you post it here. That way, you can see any errors in the output.
Always try to debug the script yourself, if you get stuck, come here. |
|
|
| Report Abuse |
|
GiverLol
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 810 |
|
|
| 13 Feb 2013 12:39 PM |
| It should work, however I think you can't use shorter names? |
|
|
| Report Abuse |
|