4zx16

Lock Experience Server

Jul 18th, 2021 (edited)
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.77 KB | None | 0 0
  1. --[[
  2.   Made by 4z#0001, do not steal.
  3.  
  4.   Lock or unlock your game/experience using this script.
  5.  
  6.   How do I do that?:
  7.   Set AutoShutdown to true if you want your game to not be joined.
  8.  
  9.   Set AutoShutdown to false if you want your game to be joined/unlocked.
  10. ]]
  11.  
  12. local ServerAction = {
  13.     ["AutoShutdown"] = false -- make sure this is set to true to lock your game
  14. }
  15. local AutoLockMessage = "[AutoShutdown]: You cannot join this experience! Come back when this experience is unlocked via Roblox Studio."
  16.  
  17. local function ShutdownExperienceServer()
  18.     game.Players.PlayerAdded:Connect(function(JoinAction)
  19.         JoinAction:Kick(AutoLockMessage)
  20.     end)
  21. end
  22.  
  23. if ServerAction.AutoShutdown == true then
  24.     ShutdownExperienceServer() -- AutoShutdown = true
  25. end
Advertisement
Add Comment
Please, Sign In to add comment