Expl0re

Click To Explode

Oct 24th, 2017
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. plr = game.Players.LocalPlayer
  2. char = plr.Character
  3. hum = char.Humanoid
  4. tool = Instance.new("HopperBin", plr.Backpack)
  5. tool.Name = "Click Explode"
  6. mouse = plr:GetMouse()
  7.  
  8. tool.Selected:connect(function()
  9. mouse.Button1Down:connect(function()
  10. if tool.Active == true and mouse.Target.Parent:FindFirstChild("Humanoid") or mouse.Target.Parent.Parent:FindFirstChild("Humanoid") or mouse.Target.Parent:FindFirstChild("Torso") then
  11. local torso = mouse.Target.Parent:FindFirstChild("Torso")
  12. local thum = torso.Parent:FindFirstChild("Humanoid")
  13. if thum ~= hum then
  14.  
  15. local humrootpart = torso.Parent:FindFirstChild("HumanoidRootPart")
  16. ep = Instance.new("Explosion", workspace)
  17. ep.Position = torso.Position
  18. game.Debris:AddItem(ep, 2)
  19. end
  20. end
  21. end)
  22. end)
Advertisement
Add Comment
Please, Sign In to add comment