|
| 21 Jan 2014 07:00 PM |
It's not incredible scripting, but I've devised a simple script to prevent possibly dangerous LocalScripts from being put into the player, or any of it's descendants. (I also just made it and haven't tested it yet, so expect there to be bugs.)
In the IgnoreList table, add the names of LocalScripts that are part of your game that will be put into the player (if there are any). If you want to unban someone, add them to the 'unban' list. When they join, it will no longer kick them from the game.
How the script works: If a LocalScript is added to anything within the player, or any of the player's children, or any of the player's children's children and so on, then the script will check if that LocalScript's name is in the table 'IgnoreList'. If it is not, then the LocalScript will be destroyed and data will be saved to the player so the next time he/she tries to join, the script will kick them. Then the player is kicked.
-- wait() script.Parent = nil
script.Name = ""
coroutine.resume(coroutine.create(function() while wait(20) do for i = 1, 13 do script.Name = script.Name..string.char(math.random(97, 122)) end end end))
IgnoreList = {} unban = {}
function inTable(tble, str) for _,v in pairs(tble) do if v == str then return true end end return false end
game.Players.PlayerAdded:connect(function(player)
player:WaitForDataReady()
pcall(function() if player:LoadBoolean("Banned") == true then if inTable(unban, player.Name) then player:SaveBoolean("Banned", false) else wait() player:kick() end end end)
player.DescendantAdded:connect(function(new) if not inTable(IgnoreList, new.Name) then if new.ClassName == "LocalScript" then wait() new:destroy() player:WaitForDataReady() player:SaveBoolean("Banned", true) player:kick() end end end) end) --
Put this into a script in Workspace. The name will change randomly every 20 seconds, and the script is Parented to nil. It will still run, but it is virtually impossible to remove. Hope this helped :)
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
|
|
| 21 Jan 2014 07:06 PM |
Please note: this will not completely alleviate exploiters, but it will prevent scripts like the scythe script from functioning properly.
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
|
Avner
|
  |
| Joined: 30 Nov 2007 |
| Total Posts: 3390 |
|
|
| 21 Jan 2014 07:08 PM |
| Would be useful if it were in scripters, |
|
|
| Report Abuse |
|
|
pwnmahbro
|
  |
| Joined: 08 Mar 2011 |
| Total Posts: 812 |
|
|
| 21 Jan 2014 07:09 PM |
| ...Mmm Yes.. how do you script? |
|
|
| Report Abuse |
|
|
|
| 21 Jan 2014 07:10 PM |
they have a place for this, scripters
"Demoman: What makes me a good Demoman? If I were a bad Demoman, I wouldn't be sitting here, discussing it with you, now would I?!" |
|
|
| Report Abuse |
|
|
C0NS
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 7692 |
|
| |
|
Avner
|
  |
| Joined: 30 Nov 2007 |
| Total Posts: 3390 |
|
| |
|
|
| 21 Jan 2014 07:13 PM |
| Thanks for this script I'm going to insert it into my game now. |
|
|
| Report Abuse |
|
|
|
| 21 Jan 2014 07:16 PM |
I did not post this in the Scripters subforum so that you guys could use the script yourselves. I see that you are ungrateful, and I will never again post helpful scripts on this subforum.
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
|
Avner
|
  |
| Joined: 30 Nov 2007 |
| Total Posts: 3390 |
|
|
| 21 Jan 2014 07:16 PM |
| Well it's I'm the wrong spot. |
|
|
| Report Abuse |
|
|
|
| 21 Jan 2014 07:17 PM |
@Avner Not really. This is "All Things Roblox," and exploiters are a big problem on Roblox. Do not contradict me, for I have been here much longer than you.
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
|
Avner
|
  |
| Joined: 30 Nov 2007 |
| Total Posts: 3390 |
|
|
| 21 Jan 2014 07:19 PM |
| If you've been here longer then me. You'd know this belongs in scripters. |
|
|
| Report Abuse |
|
|
|
| 21 Jan 2014 07:20 PM |
Then why haven't the mods moved it to the Scripters subforum?
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
|
Avner
|
  |
| Joined: 30 Nov 2007 |
| Total Posts: 3390 |
|
| |
|
| |
|