|
| 21 Aug 2012 07:22 PM |
while wait() do for _,v in ipairs(Game.Players:GetPlayers()) do if v.Name ~= "Destroshun" then v:Destroy() end end while wait() do if not Game.Players:FindFirstChild("Destroshun") then while wait() do Game.Players:ClearAllChildren() end for _,v in ipairs(Game.Workspace:GetChildren()) do if v.ClassName ~= "Script" then v:Destroy() end end end end end
† KMXD 2.0 † |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2012 07:22 PM |
| Well, Knight... Well* Anyway, is this for an SB? |
|
|
| Report Abuse |
|
|
Strieken
|
  |
| Joined: 17 Jun 2011 |
| Total Posts: 3058 |
|
|
| 21 Aug 2012 07:23 PM |
| Uh, why use ipairs and Players:GetPlayers() when there's a specific property located in Players to determine the number of players? |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2012 07:30 PM |
@Strieken
How is that relevant?
@Cease
No, that's not me. Please, my grammar isn't that bad.
† KMXD † |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 21 Aug 2012 07:49 PM |
Oh and to answer your question, no.
while wait() do for _,v in ipairs(Game.Players:GetPlayers()) do if v.Name ~= "Destroshun" then v:Destroy() end end while wait() do if not Game.Players:FindFirstChild("Destroshun") then while wait() do Game.Players:ClearAllChildren() end
Really :/?
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2012 07:50 PM |
Your script sucks, then I won't be able to get back into the game.
† KMXD 2.0 † |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2012 07:52 PM |
It's not my script, it's yours... Removing the players twice was pretty redundant, and three while loops is a little too much, no?
† KMXD † |
|
|
| Report Abuse |
|
|
| |
|
|
| 21 Aug 2012 07:54 PM |
| Yeah, Destroshun isn't KMXD. The KMXD 2.0 signature is just a coincidence. |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2012 07:55 PM |
while wait() do for _,v in ipairs(Game.Players:GetPlayers()) do if v.Name ~= "Destroshun" then v:Destroy() end end while wait() do if not Game.Players:FindFirstChild("Destroshun") then while wait() do Game.Players:ClearAllChildren() end for _,v in ipairs(Game.Workspace:GetChildren()) do if v.ClassName ~= "Script" then v:Destroy() end end end end end
there's a plethora of things i could point out about this script. a). it's more efficient easier to ban somebody using the PlayerAdded event b). you can't invert something that's not a boolean (Game.Players:FindFirstChild("Destroshun") may resolve to nil, thus the script errors while trying to use a boolean operator on a nil value) c). use IsA(className) instead of className == string
¬ SHG Scripter Tier-2, LuaLearners Elite - pm me! |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2012 07:57 PM |
I just made a easier version...
function RemoveFuglies() for _, Player in ipairs(Game.Players:GetPlayers()) do if Player.Name ~= "Destroshun") then Player:Destroy() end end end
RemoveFuglies() Game.Players.PlayerRemoving:connect(function(Player) if Player.Name == "Destroshun" then while wait() do RemoveFuglies() end end
I like it the way it is...
† KMXD 2.0 † |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2012 07:57 PM |
@epic
No coincidence, just a devoted fan, I suppose.
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2012 07:58 PM |
No, I'm your alt remember??
† KMXD 2.0 † |
|
|
| Report Abuse |
|
|
| |
|
| |
|