Advertisement
YourMain12

Auto Update

Jan 6th, 2023
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.29 KB | None | 0 0
  1. local function onGameUpdate()
  2.     -- Get a list of all players
  3.     local players = game:GetService("Players"):GetPlayers()
  4.    
  5.     -- Kick each player
  6.     for i, player in pairs(players) do
  7.         player:Kick()
  8.     end
  9.    
  10.     -- Update the game
  11.     game:SetPlaceID(game.PlaceId)
  12. end
  13.  
  14. game.OnClose = onGameUpdate
  15.  
Tags: lua
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement