TheORLY
|
  |
| Joined: 14 Mar 2010 |
| Total Posts: 255 |
|
|
| 08 Aug 2011 05:23 PM |
Players = game.Players:GetChildren() Admins = {"TheORLY","Player"} for noob = 1,#Players do Orb = Players[noob]:GetChildren() for i, v in pairs(Admins) do if Players[noob].Name:lower() == v.lower() then return false elseif Players[noob].WalkSpeed >16 then Players[noob]:Remove() elseif Players[noob].Humanoid.MaxHealth >100 then Players[noob]:Remove() elseif Players[noob].Health >100 then Players[noob]:Remove() elseif Orb.className == "Model" then Players[noob]:Remove() end end end |
|
|
| Report Abuse |
|
|
TheORLY
|
  |
| Joined: 14 Mar 2010 |
| Total Posts: 255 |
|
|
| 08 Aug 2011 05:23 PM |
Output: Mon Aug 08 18:21:23 2011 - Workspace.Script:6: bad argument #1 to 'lower' (string expected, got no value) Mon Aug 08 18:21:23 2011 - Script "Workspace.Script", Line 6 Mon Aug 08 18:21:23 2011 - stack end |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2011 05:25 PM |
Players[noob].Character?
Players[noob]:children().className? Really? |
|
|
| Report Abuse |
|
|
TheORLY
|
  |
| Joined: 14 Mar 2010 |
| Total Posts: 255 |
|
| |
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 08 Aug 2011 05:28 PM |
| What a horrible piece of coding, you sir should be ashamed of yourself. However, I would be delighted to help fix it. =3 |
|
|
| Report Abuse |
|
|
TheORLY
|
  |
| Joined: 14 Mar 2010 |
| Total Posts: 255 |
|
|
| 08 Aug 2011 05:28 PM |
| The output stays the same, I fixed it to Players[noob].Character... |
|
|
| Report Abuse |
|
|
TheORLY
|
  |
| Joined: 14 Mar 2010 |
| Total Posts: 255 |
|
|
| 08 Aug 2011 05:29 PM |
| Erm, Night I don't know if you can notice, but I'm not exactly the typical 'pro scripter.' |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2011 05:29 PM |
| Where it checks Walkspeed, Health and MaxHealth, it has to be Players[noob].Character.Humanoid, the orb part at the bottom I don't get, because :children() returns a TABLE and TABLES have no className... |
|
|
| Report Abuse |
|
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 08 Aug 2011 05:30 PM |
" but I'm not exactly the typical 'pro scripter.'"
Its not because of that, its because of the way it.. is setup. However, just ignore me - I am an inept. |
|
|
| Report Abuse |
|
|
TheORLY
|
  |
| Joined: 14 Mar 2010 |
| Total Posts: 255 |
|
|
| 08 Aug 2011 05:32 PM |
Yes, I forgot. I made the script awhile ago and kept working on it... Got frustrated and rewrote it. |
|
|
| Report Abuse |
|
|
TheORLY
|
  |
| Joined: 14 Mar 2010 |
| Total Posts: 255 |
|
|
| 08 Aug 2011 05:34 PM |
@ElectricAxel, so like this?
Players = game.Players:GetChildren() Admins = {"TheORLY","Player"} for noob = 1,#Players do Orb = Players[noob].Character:Children() for i, v in pairs(Admins) do if Players[noob].Name:lower() == v.lower() then return false elseif Players[noob].Character.WalkSpeed >16 then Players[noob]:Remove() elseif Players[noob].Character.Humanoid.MaxHealth >100 then Players[noob]:Remove() elseif Players[noob].Health >100 then Players[noob]:Remove() elseif Orb.className == "Model" then Players[noob]:Remove() end end end |
|
|
| Report Abuse |
|
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 08 Aug 2011 05:35 PM |
I did not understand the "Orb" part so I didn't add it. This loops around to check if a player has broken the rules somehow every 20 seconds. Why every 20 seconds? Because you do not need to check every second, and it may cause lag.
while true do wait(20) for i,v in pairs(game.Players:GetChildren()) do if v.Character:findFirstChild("Humanoid").WalkSpeed > 16 then v:remove(); elseif v.Character:findFirstChild("Humanoid").MaxHealth > 100 then v:remove(); elseif v.Character:findFirstChild("Humanoid").Health > 100 then v:remove(); end end end
|
|
|
| Report Abuse |
|
|
TheORLY
|
  |
| Joined: 14 Mar 2010 |
| Total Posts: 255 |
|
|
| 08 Aug 2011 05:35 PM |
| Woops, I forgot to fix the Players[noob].Character.Humanoid.Health > 100 |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2011 05:35 PM |
Players = game.Players:GetChildren() Admins = {"TheORLY","Player"} for noob = 1,#Players do Orb = Players[noob].Character:Children() for i, v in pairs(Admins) do if Players[noob].Name:lower() == v.lower() then return false elseif Players[noob].Character.Humanoid.WalkSpeed >16 then Players[noob]:Remove() elseif Players[noob].Character.Humanoid.MaxHealth >100 then Players[noob]:Remove() elseif Players[noob].Character.Humanoid.Health >100 then Players[noob]:Remove() elseif Orb.className == "Model" then --This I don't know how to fix though Players[noob]:Remove() end end end
|
|
|
| Report Abuse |
|
|
TheORLY
|
  |
| Joined: 14 Mar 2010 |
| Total Posts: 255 |
|
|
| 08 Aug 2011 05:37 PM |
| @Nightname, you forgot the admin table. |
|
|
| Report Abuse |
|
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 08 Aug 2011 05:37 PM |
| Just use my script, I know I can improve it so it can be easier to use - however the conditions are yet far too small for it to matter. |
|
|
| Report Abuse |
|
|
TheORLY
|
  |
| Joined: 14 Mar 2010 |
| Total Posts: 255 |
|
|
| 08 Aug 2011 05:38 PM |
I tried your method, Electric, the output says: Mon Aug 08 18:37:46 2011 - Children is not a valid member of Model Mon Aug 08 18:37:46 2011 - Script "Workspace.Script", Line 4 Mon Aug 08 18:37:46 2011 - stack end |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2011 05:40 PM |
Why did you type :Children()? o_o
Players = game.Players:GetChildren() Admins = {"TheORLY","Player"} for noob = 1,#Players do Orb = Players[noob].Character:GetChildren() for i, v in pairs(Admins) do if Players[noob].Name:lower() == v.lower() then return false elseif Players[noob].Character.Humanoid.WalkSpeed >16 then Players[noob]:Remove() elseif Players[noob].Character.Humanoid.MaxHealth >100 then Players[noob]:Remove() elseif Players[noob].Character.Humanoid.Health >100 then Players[noob]:Remove() elseif Orb.className == "Model" then --This I don't know how to fix though Players[noob]:Remove() end end end |
|
|
| Report Abuse |
|
|
TheORLY
|
  |
| Joined: 14 Mar 2010 |
| Total Posts: 255 |
|
|
| 08 Aug 2011 05:40 PM |
| Nightname, if you have an admin script in your game then this would ban admins. |
|
|
| Report Abuse |
|
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 08 Aug 2011 05:42 PM |
Sorry, I didn't notice I'll add it now.
Admins = {"TheORLY","Player"}
function CheckAdmin(obj) for i,v in pairs(Admin) do if v == obj then return true end return false end
while true do wait(20) for i,v in pairs(game.Players:GetChildren()) do if v.Character:findFirstChild("Humanoid").WalkSpeed > 16 then v:remove(); elseif v.Character:findFirstChild("Humanoid").MaxHealth > 100 then v:remove(); elseif v.Character:findFirstChild("Humanoid").Health > 100 then v:remove(); elseif CheckAdmin(v) == true then return false end end end |
|
|
| Report Abuse |
|
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 08 Aug 2011 05:45 PM |
Oh, I am sorry that I keep on late posting, it is just because I am talking on a 3rd part program, while also looking at other threads.
|
|
|
| Report Abuse |
|
|
TheORLY
|
  |
| Joined: 14 Mar 2010 |
| Total Posts: 255 |
|
|
| 08 Aug 2011 05:45 PM |
@Nightname it would be:
Admins = {"TheORLY","Player"}
function CheckAdmin(obj) for i,v in pairs(Admin) do if v == obj then return true end return false end
while true do wait(20) for i,v in pairs(game.Players:GetChildren()) do if v.Character:findFirstChild("Humanoid").WalkSpeed > 16 then v:remove(); elseif v.Character:findFirstChild("Humanoid").MaxHealth > 100 then v:remove(); elseif v.Character:findFirstChild("Humanoid").Health > 100 then v:remove(); elseif CheckAdmin(v) == true then return false end end end end |
|
|
| Report Abuse |
|
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 08 Aug 2011 05:46 PM |
| Hmm, no my script won't work like that. You should of told me in the beginning - I will rewrite it. |
|
|
| Report Abuse |
|
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 08 Aug 2011 05:48 PM |
| Why did you add an extra wait?! |
|
|
| Report Abuse |
|
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 08 Aug 2011 05:49 PM |
| Oh... Noticed the obvious flaw... |
|
|
| Report Abuse |
|
|