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: Anti-Level hack script not working?

Previous Thread :: Next Thread 
XxKonArtistxX is not online. XxKonArtistxX
Joined: 28 Jun 2012
Total Posts: 74
17 Jul 2012 01:35 PM
Ok so I want this script to work ---
Thi

s is the bit that is not working:
while true do
wait(5)
local players = game.Players:GetPlayers()
for n = 1, #players do
if player.leaderstats.level.Value > 25000 then --if it is more than 25000 then BAN THEM!
ban (players[n])
end
end
return
end
end


This is the rest of the code:












speakers = {"XxKonArtistxX"} -- Those who can say the command
banned = {"Exploiters"} -- Those who are banned

function check(name)
print(name)
if #speakers == 0 then print("No speakers") return false end
for i = 1,#speakers do
if string.upper(name) == string.upper(speakers[i]) then return true end
end
return false
end

function ban(player, source)
if player ~= nil then
if player ~= source then
player:Remove()
table.insert(banned,player.Name)
end
end
end

function unban(player,source)
if player ~= nil then
for i = 1,#banned do
if banned[i]:lower() == player.Name:lower() then
table.remove(banned,i)
end
end
end
end

function onChatted(msg, recipient, speaker)
local norm = msg
local msg = string.lower(msg)

if not check(speaker.Name) then return end

if string.match(msg,"unban") then
local players = game.Players:GetPlayers()
for n = 1, #players do
if string.match(msg,players[n].Name:lower()) then
unban(players[n], speaker)
end
end
return
end

if string.match(msg,"ban") then
local players = game.Players:GetPlayers()
for n = 1, #players do
if string.match(msg,players[n].Name:lower()) then
ban(players[n], speaker)
end
end
return
end
end

function onPlayerEntered(newPlayer)
print("entered")
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
for i=1, #banned do
if banned[i]:lower() == newPlayer.Name:lower() then
newPlayer.Parent = nil
end
end
end

while true do
wait(5)
local players = game.Players:GetPlayers()
for n = 1, #players do
if player.leaderstats.level.Value > 25000 then --if it is more than 25000 then BAN THEM!
ban (players[n])
end
end
return
end
end


game.Players.ChildAdded:connect(onPlayerEntered)
Report Abuse
Techwiz19 is not online. Techwiz19
Joined: 30 Jan 2011
Total Posts: 462
17 Jul 2012 01:48 PM
try

ban(players[n].Name)
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