Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Press E to explode yourself. (CLIENT SIDED, PEOPLE CAN'T SEE YOU EXPLODE ONLY DIE)
- local Humanoid = script.Parent:FindFirstChild("Humanoid")
- local Torso
- local UserInputService = game:GetService("UserInputService")
- local Key = Enum.KeyCode.E
- local Cooldown = 7
- local CooldownWaited = 0
- function RigTypeCheck()
- if Humanoid.RigType == Enum.HumanoidRigType.R6 then
- Torso = Humanoid.Parent:FindFirstChild("Torso")
- elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then
- Torso = Humanoid.Parent:FindFirstChild("LowerTorso")
- end
- end
- RigTypeCheck()
- UserInputService.InputBegan:Connect(function(Input)
- if Input.KeyCode == Key then
- if CooldownWaited <= 0 then
- local Explosion = Instance.new("Explosion", workspace)
- Explosion.Position = Torso.Position
- wait()
- Torso:Destroy()
- CooldownWaited = Cooldown
- elseif CooldownWaited > 0 then
- repeat
- wait(1)
- CooldownWaited = CooldownWaited - 1
- until CooldownWaited <= 0
- end
- end
- end)
- -- Ubicast
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement