popster12345

Untitled

Feb 14th, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. --[[
  2. Made by fredyredy.no name needed just run
  3. --[]]
  4.  
  5. local Tool = script.Parent;
  6.  
  7. enabled = true
  8.  
  9. shooting = false
  10. reloadtime = 0
  11.  
  12. local bubble = nil
  13.  
  14. function TakeStick()
  15. Tool.GripForward = Vector3.new(0,-.759,-.651)
  16. Tool.GripPos = Vector3.new(1.25,-.5,.2)
  17. Tool.GripRight = Vector3.new(.971,-.156,.181)
  18. Tool.GripUp = Vector3.new(.239,.632,-.737)
  19. end
  20.  
  21. function RestoreStick()
  22. Tool.GripForward = Vector3.new(-.776,.163,-.609)
  23. Tool.GripPos = Vector3.new(0.05,-.15,.1)
  24. Tool.GripRight = Vector3.new(.614,-.0269,-.789)
  25. Tool.GripUp = Vector3.new(.145,.986,.079)
  26. end
  27.  
  28. function onEquipped()
  29. Tool.Handle.OpenSound:play()
  30. end
  31.  
  32.  
  33. function BlowBubble(head)
  34. if (bubble == nil) then
  35. bubble = Instance.new("Part")
  36. bubble.Shape = 0
  37. bubble.Size = Vector3.new(1,1,1)
  38. bubble.BrickColor = BrickColor.new(1016)
  39. bubble.Transparency = .3
  40. bubble.TopSurface = 0
  41. bubble.BottomSurface = 0
  42. bubble.Position = head.Position + (head.CFrame.lookVector * .5)
  43.  
  44. local mesh = Instance.new("SpecialMesh")
  45. mesh.MeshType = 3
  46. mesh.Parent = bubble
  47. bubble.Parent = game.Workspace
  48.  
  49. local bp = Instance.new("BodyPosition")
  50. bp.maxForce = Vector3.new(1e8,1e8,1e8)
  51. bp.position = bubble.Position
  52. bp.Parent = bubble
  53. end
  54.  
  55. bubble.BodyPosition.position = head.Position + (head.CFrame.lookVector * (.6 + (bubble.Mesh.Scale.x * .5)))
  56. bubble.Mesh.Scale = bubble.Mesh.Scale + Vector3.new(.1,.1,.1)
  57. end
  58.  
  59.  
  60. Tool = script.Parent
  61.  
  62.  
  63. function onActivated(mouse)
  64. if reloadtime > 0 then return end
  65. if shooting == true then return end
  66.  
  67. reloadtime = 1.0
  68. shooting = true
  69.  
  70. local time = 0
  71.  
  72. local character = Tool.Parent;
  73. local humanoid = character.Humanoid
  74. if humanoid == nil then
  75. print("Humanoid not found")
  76. return
  77. end
  78.  
  79. TakeStick()
  80.  
  81. local sound = character.PrimaryPart:findFirstChild("InflateSound")
  82. if sound == nil then
  83. sound = Instance.new("Sound")
  84. sound.Name = "InflateSound"
  85. sound.SoundId = "http://www.roblox.com/asset/?id=11895499"
  86. sound.Parent = character.PrimaryPart
  87. end
  88. wait(.5)
  89. sound:Play()
  90.  
  91.  
  92. RestoreStick()
  93.  
  94. while shooting == true do
  95.  
  96.  
  97.  
  98. BlowBubble(character.Head)
  99. wait(.05)
  100. time = time + .05
  101. if time > 2.0 then shooting = false end
  102. end
  103.  
  104. if (bubble ~= nil) then
  105. bubble:Remove()
  106. bubble = nil
  107. end
  108.  
  109. sound:Stop()
  110.  
  111. local psound = character.PrimaryPart:findFirstChild("PopSound")
  112. if psound == nil then
  113. psound = Instance.new("Sound")
  114. psound.Name = "PopSound"
  115. psound.SoundId = "http://www.roblox.com/asset/?id=11895500"
  116. psound.Parent = character.PrimaryPart
  117. end
  118. psound:Play()
  119.  
  120. wait(reloadtime)
  121. reloadtime = 0
  122.  
  123.  
  124. end
  125.  
  126. function onDeactivated(mouse)
  127. shooting = false
  128. end
  129.  
  130.  
  131. script.Parent.Activated:connect(onActivated)
  132. script.Parent.Deactivated:connect(onDeactivated)
Add Comment
Please, Sign In to add comment