|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 22 Dec 2011 |
| Total Posts: 2347 |
|
| |
|
|
| 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
|
  |
| 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 |
|
|