Advertisement
zooperstar23

Untitled

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