Advertisement
szze

Preventing roblox remote abusing

Dec 30th, 2022
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | Gaming | 0 0
  1. --make sure to add 'players' folder in ServerStorage
  2. --after the certain remote is fired make the boolvalue true, if its already true then kick the player who fired
  3.  
  4. local itemtable = {
  5.     ['StartedGame'] = 'BoolValue',
  6.     ['DataLoaded'] = 'BoolValue'
  7. }
  8.  
  9. game.Players.PlayerAdded:Connect(function(plr)
  10.     local folder = Instance.new('Folder',game.ServerStorage.players)
  11.     folder.Name = plr.Name
  12.     for i,v in next, itemtable do
  13.         local item = Instance.new(v,folder)
  14.         item.Name = i
  15.     end
  16. end)
  17.  
  18. game.Players.PlayerRemoving:Connect(function(plr)
  19.    game.ServerStorage.players:FindFirstChild(plr.Name):Destroy()
  20. end)
Tags: anticheat
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement