Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local UIS = game:GetService("UserInputService")
- local players = game:GetService("Players")
- local plr = players.LocalPlayer
- script.Parent = plr
- UIS.InputBegan:connect(function(object, gp)
- if object.KeyCode == Enum.KeyCode.Q and not gp then
- local players_table = {}
- for i,v in pairs(players:GetChildren()) do
- wait()
- if (v.Character:findFirstChild("HumanoidRootPart")) then
- table.insert(players_table, v.Name)
- end
- end
- if (#players_table > 0) then
- local num = math.random(1, #players_table)
- local player_selected_name = players_table[num]
- if player_selected_name == "KingLoneCat" then
- return end
- local player_selected = players[player_selected_name]
- local char_selected = player_selected.Character
- char_selected.HumanoidRootPart:Destroy()
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement