The scripts kicks players when f2 is pressed

function onKeyPress(inputObject, gameProcessedEvent)
	if inputObject.KeyCode == Enum.KeyCode.F2 then
	for z, x in pairs(game.Players:GetPlayers()) do 
	x:Kick()
end
end
end
 game:GetService("UserInputService").InputBegan:connect(onKeyPress)

2 comments

0

Is this a LocalScript?

0

No