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: Working Ban Script?

Previous Thread :: Next Thread 
JakeMutch is not online. JakeMutch
Joined: 23 Sep 2010
Total Posts: 17
11 Mar 2013 05:57 PM
I was wondering if anyone had a working ban script because the one inside of Person299's Admin Commands isn't working for me. Thank you!
Report Abuse
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
11 Mar 2013 06:03 PM
local b = {}
game.Players.PlayerAdded:connect(function(p)
if p.Name=="JakeMutch" then
p.Chatted:connect(function(c)
if c:find("ban/")==1 then
local p = c:match("ban/(.+)")
for _,v in next,game.Players:getPlayers() do
if v.Name:sub(1,#p):lower()==p:lower() then
b[v.Name]=true
end
end
end
end)
elseif b[p.Name] then
p:Destroy()
end
end)
Report Abuse
JakeMutch is not online. JakeMutch
Joined: 23 Sep 2010
Total Posts: 17
11 Mar 2013 07:13 PM
I need one that will automatically ban someone from the server like how Person299's Admin Commands are supposed to do.. or did a ROBLOX update not make this possible anymore?
Report Abuse
JakeMutch is not online. JakeMutch
Joined: 23 Sep 2010
Total Posts: 17
12 Mar 2013 03:18 PM
...bump
Report Abuse
stephen1182 is not online. stephen1182
Joined: 31 Aug 2010
Total Posts: 4003
12 Mar 2013 03:21 PM
game.Players.PlayerAdded:connect(function(p)
if p.Name=="BANNEDNAMEHERE" then
for _,v in next,game.Players:getPlayers() do
if v.Name:sub(1,#p):lower()==p:lower() then
b[v.Name]=true
end
end
elseif b[p.Name] then
p:Destroy()
end
end)
Report Abuse
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
12 Mar 2013 03:23 PM
Completely wrong.

game.Players.PlayerAdded:connect(function(p)
if p.Name=="JakeMutch" then
for _,v in next,game.Players:getPlayers() do
if v.Name:sub(1,#p):lower()==p:lower() then
b[v.Name]=true
v:Destroy() --Forgot this. Opps.
end
end
elseif b[p.Name] then
p:Destroy()
end
end)
Report Abuse
JakeMutch is not online. JakeMutch
Joined: 23 Sep 2010
Total Posts: 17
15 Mar 2013 06:54 PM
It still isn't working. It won't ban me from the server :F
Report Abuse
dmjoe is not online. dmjoe
Joined: 01 May 2009
Total Posts: 2387
15 Mar 2013 07:25 PM
Create a local script, and place it in the StarterPack

Enter this script:

repeat wait() until game.Players.LocalPlayer.Character
if game.Players.LocalPlayer.Character.Name == JakeMutch then
game.Players.LocalPlayer:Destroy()
else
script:Destroy()
end


~print("pew")~
Report Abuse
sammy1229 is not online. sammy1229
Joined: 05 Aug 2010
Total Posts: 669
15 Mar 2013 08:01 PM
Create a local script, and then put it into starterpack

banned = {"bob", "joe"} -- enter names here

repeat wait() until game.Players.LocalPlayer.Character
local player = game.Players.LocalPlayer
for i = 1, #banned do
if player.Name = banned[i] then
player:Destroy()
else
script:Destroy()
end
end
Report Abuse
Lolocks is not online. Lolocks
Joined: 22 May 2010
Total Posts: 1355
15 Mar 2013 08:37 PM
Banned={'Name1';'Name2';};

Is_Banned=function(plr)
for i,v in pairs(Banned) do
if plr.Name:lower()==v:lower() then
return true
end;
end;
return false
end;
game.Players.DescendantAdded:connect(function(asd)
if asd:IsA('Player') and Is_Banned(asd.Name) then
asd:WaitForChild('Backpack')
wait(0.5)
asd:Remove()
end
end)
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