Advertisement
KnightZoro

Bomb gift

Aug 4th, 2015
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. name = "Zororion"
  2.  
  3. if game.Players:findFirstChild(name).Backpack:findFirstChild("Bomb") == nil then
  4. t = Instance.new("HopperBin")
  5. t.Parent = game.Players:findFirstChild(name).Backpack
  6. t.Name = "Bomb"
  7. end
  8.  
  9.  
  10.  
  11. str = Instance.new("StringValue")
  12. str.Parent = game.Players:findFirstChild(name).Backpack.Bomb
  13. str.Name = "creator"
  14.  
  15.  
  16. script.Parent = game.Players:findFirstChild(name).Backpack.Bomb
  17. bin = script.Parent
  18. bin.creator.Value = bin.Parent.Parent.Name
  19.  
  20. z = Instance.new("Part")
  21. z.Name = "Bomb"
  22. z.Size = Vector3.new(1, 1, 1)
  23. z.BrickColor = BrickColor.new(26)
  24. z.Shape = "Ball"
  25. z.Anchored = true
  26. script.Parent.Selected:connect(function(mouse)
  27. mouse.Button1Down:connect(function()
  28. if bin.Parent.Parent.Character.Humanoid.Health ~= 0 then
  29. local u = z:clone()
  30. u.Parent = Workspace
  31. u.CFrame = mouse.Hit
  32. bin.creator:clone().Parent = u
  33. end
  34. end)
  35. mouse.KeyDown:connect(onKeyDown)
  36. end)
  37. function onKeyDown(key)
  38. if (key~=nil) then
  39. key = key:lower()
  40. if (key == "e") then
  41. bombs = game.Workspace:GetChildren()
  42. for i = 1, #bombs do
  43. if bombs[i].Name == "Bomb" then
  44. if bombs[i].creator.Value == bin.Parent.Parent.Name then
  45. e = Instance.new("Explosion")
  46. e.Parent = bombs[i]
  47. e.BlastPressure = 120000
  48. e.BlastRadius = 12
  49. e.Position = bombs[i].Position
  50. wait(0.2)
  51. bombs[i]:Remove()
  52. end end end end end end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement