Advertisement
Davld2

Untitled

May 25th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. local datastoreservice = game:GetService("DataStoreService")
  2. local datastore = datastoreservice:GetOrderedDataStore("PlayerData")
  3. local remote1 = game.ReplicatedStorage.L
  4. local ban = 24
  5. local ban1 = 1440
  6.  
  7. game.Players.PlayerAdded:Connect(function(player)
  8. local Check = datastore:GetAsync(player.UserId)
  9. local userdata = os.time()
  10. if Check then
  11. print("LMAO")
  12. if (os.time()-Check)/3600>=ban then
  13. datastore:RemoveAsync(player.UserId, os.time())
  14. else
  15. local hourspassed = math.ceil((os.time()-Check)/3600)
  16. local banminute = math.ceil((os.time()-Check)/60)
  17. if ban-hourspassed < 1 then
  18. local banminute = math.floor((os.time()-Check)/60 +.5)
  19. player:Kick("You have ".. ban1 - banminute.. " minutes left until you are able to create another application.")
  20. else
  21. player:Kick("You have ".. ban - hourspassed.. " hours remaining until you are able to make another application.")
  22. end
  23. end
  24. end
  25. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement