generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Would this work?

Previous Thread :: Next Thread 
Fedorakid is not online. 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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image