Advertisement
iiMurpyh

First Script

Nov 21st, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. -- By iiMurpyh who even cares lol
  2. local player = game:GetService("Players").LocalPlayer
  3. local plr = player.Character
  4. local mouse = player:GetMouse()
  5.  
  6.  
  7. hand = Instance.new('Tool')
  8. hand.CanBeDropped = False
  9. hand.RequiresHandle = False
  10. hand.Name = "meme"
  11. hand.Parent = player.Backpack
  12.  
  13. local function createExplosion(location,power)
  14. boom = Instance.new('Explosion',workspace)
  15. boom.Position = location
  16. boom.BlastRadius = power
  17. boom.Hit.Connect(onHit)
  18. sfx = Instance.new('Sound', boom)
  19. sfx.SoundId = 'rbxassetid://573314737'
  20. sfx:Play()
  21. end
  22. local function onActivate()
  23. local clickLocation = mouse.Hit
  24. local hpos = clickLocation.p
  25. createExplosion(hpos,5)
  26. boom.Hit:connect(onHit)
  27.  
  28. end
  29. local function onHit(part)
  30. if part.Parent.ClassName == "Model" and part.Parent:FindFirstChildOfClass("Humanoid") then
  31. part:Destroy()
  32. end
  33. end
  34.  
  35. hand.Activated:connect(onActivate)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement