Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Thanks for using this script
- --This script is made by Joriangames/Problox Studio Scripts
- --Want to know how to use this? Watch my tutorial: https://youtu.be/8IcNqEHg4b8
- local DSS = game:GetService("DataStoreService")
- local banDS = DSS:GetDataStore("banDS")
- script.Parent.Touched:Connect(function(hit)
- if hit.Parent:FindFirstChild("Humanoid") then
- local char = hit.Parent
- local plr = game.Players:GetPlayerFromCharacter(char)
- local userId = plr.UserId
- local succ, err = pcall(function()
- banDS:SetAsync(userId, true)
- end)
- if succ then
- print("player got banned!")
- end
- plr:Kick("You got banned from the game!")
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment