Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local banMessage = "You have been banned from the game."
- local function kickPlayer(message)
- local player = Players.LocalPlayer
- if player then
- player:Kick(message)
- end
- end
- local UserInputService = game:GetService("UserInputService")
- UserInputService.InputBegan:Connect(function(input, gameProcessedEvent)
- if not gameProcessedEvent then
- if input.KeyCode == Enum.KeyCode.K then
- kickPlayer(banMessage)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement