Advertisement
Joriangames

BanSystem script

Apr 30th, 2021
484
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. --Thanks for using this script
  2. --This script is made by Joriangames/Problox Studio Scripts
  3. --Want to know how to use this? Watch my tutorial: https://youtu.be/8IcNqEHg4b8
  4. local DSS = game:GetService("DataStoreService")
  5. local banDS = DSS:GetDataStore("banDS")
  6.  
  7. game.Players.PlayerAdded:Connect(function(plr)
  8.    
  9.     local data = banDS:GetAsync(plr.UserId)
  10.     if data == nil then
  11.         data:SetAsync(plr.UserId, false)
  12.         print("player isn't banned")
  13.     else
  14.         if data == true then
  15.             plr:Kick("You are banned!")
  16.             print("player is banned")
  17.         end
  18.     end
  19. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement