Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ShutdownHandler (ShutdownButton)
- ShutdownEvent (ShutdownButton)
- script (ShutdownEvent)
- ShutdownHandler:
- function onClick()
- script.Parent.ShutdownEvent:FireServer()
- end
- script.Parent.MouseButton1Click:Connect(onClick)
- script:
- local shutdown = false
- function onShutdown()
- for k, value in next, game.Players:GetPlayers() do
- value:Kick("This server has shutdown due to either hacker or bug in server. Thank you for understanding.")
- end
- shutdown = true
- end
- function onJoin(player)
- if shutdown then
- player:Kick("Sorry but the server shutdown. Try to find a new one! From, TopTheKingDoge72221")
- end
- end
- script.Parent.OnServerEvent:Connect(onShutdown)
- game.Players.PlayerAdded:Connect(onJoin)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement