|
| 10 Sep 2011 04:37 PM |
n=""
h=Instance.new("Hint") h.Text="don't kick or ban " " or the game will crash" h.Parent=workspace function antikick(player) if player.Name==n then h:remove() m=Instance.new("Message") m.Text="you kicked or baned " " so the game is crashing" m.Parent=workspace wait() while true do p=game.Players:GetChildren() if #p~=0 then for i=1,#p do p:remove() end end end end end game.Players.ChildRemoved:connect(antikick)
I'd like to make this do an antikick to anyone who enters. Who could help? |
|
|
| Report Abuse |
|
|
| |
|
ns001111
|
  |
| Joined: 15 Jan 2011 |
| Total Posts: 2849 |
|
|
| 10 Sep 2011 04:41 PM |
name = "YOURNAMEHERE"
h = Instance.new("Hint", game.Workspace) h.Text = "Don't kick or ban "...name..." or the server will crash."
while true do plr = game.Players:FindFirstChild(name) if plr then return end else h.Text = "You kicked or banned"...name..." so now the game is crashing" p = game.Players:GetChildren() for i = 1, #p do p:Remove() end end end
-I pwn with my grammar |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 10 Sep 2011 05:02 PM |
h = Instance.new("Hint") h.Parent = Workspace h.Text = "Don't kick or ban anyone or the server will crash."
game.Players.PlayerAdded:connect(function(p) game.Players.ChildRemoving:connect(function(c) if c.Name == p.Name then h.Text = "You kicked or banned"...c.Name..." so now the game is crashing" for i,v in next, game.Players:children() do v:remove() end else print("Close one!") end end end) end) |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2011 05:03 PM |
h = Instance.new("Hint") h.Parent = Workspace h.Text = "Don't kick or ban anyone or the server will crash."
game.Players.PlayerAdded:connect(function(p) game.Players.ChildRemoved:connect(function(c) if c.Name == p.Name then h.Text = "You kicked or banned"...c.Name..." so now the game is crashing" for i,v in next, game.Players:children() do v:remove() end else print("Close one!") end end end) end) |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2011 05:09 PM |
| Just a thought, but what if someone joins and then leaves the game? That would trigger your antiban script and crash the game. |
|
|
| Report Abuse |
|
|
| |
|