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 » Scripters
Home Search
 

Re: Safe Ban Script?

Previous Thread :: Next Thread 
ProtectedMethod is not online. ProtectedMethod
Joined: 01 Apr 2011
Total Posts: 5374
07 Apr 2016 10:59 PM
Do you think this code is good, or are there any edits I should make?

ds.banUser = function(userId, days, reason)
local previous = ds.getBans(userId);
if(not previous) then
previous = {};
end

local banData = {expiration = os.time() + (86400 * days),
reason = reason,
active = true
};

table.insert(previous, banData);

local success;
local message;

repeat success, message = pcall(function()
ds:SetAsync(userId, banData);
end)if(not success) then wait(1) end
until success;
end
Report Abuse
Bloxkes is not online. Bloxkes
Joined: 23 Sep 2015
Total Posts: 477
07 Apr 2016 11:01 PM
i think you should just do this

if this guy is banned then
burn him alive
end
Report Abuse
cgjnm is not online. cgjnm
Joined: 22 Dec 2011
Total Posts: 2347
07 Apr 2016 11:06 PM
local Banned = {'Player';'Player1'}

game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Char)
for i,v in pairs(Banned)do
if v == Player.Name then
local torso = Char:FindFirstChild("Torso")
if torso then
Instance.new("Fire",torso)
torso.Anchored = true
wait(3)
end
Player:Kick("You is banned")
end
end
end)
end)
Report Abuse
cgjnm is not online. cgjnm
Joined: 22 Dec 2011
Total Posts: 2347
07 Apr 2016 11:09 PM
Seems goof to me. You do kick the player if they're banned, correct?
Report Abuse
cgjnm is not online. cgjnm
Joined: 22 Dec 2011
Total Posts: 2347
07 Apr 2016 11:10 PM
good*
Report Abuse
ProtectedMethod is not online. ProtectedMethod
Joined: 01 Apr 2011
Total Posts: 5374
07 Apr 2016 11:11 PM
This is just the data store part of the script, but yes I do kick them if they're banned.
Report Abuse
dave2011 is not online. dave2011
Joined: 02 Oct 2010
Total Posts: 10581
07 Apr 2016 11:12 PM
what im going to do with my game eventually is just send them to a place called banland and make them pay 1k robux to get out or they are permanently stuck there with all the other cheaters lel
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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