Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- KickHandler (SSS)
- KickScript (KickButton)
- KickPlayer (RS)
- KickHandler:
- game.ReplicatedStorage.KickPlayer.OnServerEvent:Connect(function(player,playerToKick, reason)
- game.Players:FindFirstChild(playerToKick):Kick(reason)
- end)
- KickScript:
- local frame = script.Parent.KickFrame
- local Button = script.Parent.Parent.KickButton
- Button.MouseButton1Click:Connect(function()
- if frame.Visible == true then
- frame.Visible = false
- else
- frame.Visible = true end
- end)
- frame.Cancel.MouseButton1Click:Connect(function()
- frame.Visible = false
- end)
- frame.Kick.MouseButton1Click:Connect(function()
- if game.Players:FindFirstChild(frame.Player.Text) then
- game.ReplicatedStorage.KickPlayer:FireServer(frame.Player.Text,frame.Reason.Text)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement