Advertisement
BINO2002

Untitled

Feb 20th, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.66 KB | None | 0 0
  1. me = game.Players.BINO2002
  2.  
  3. if script.Parent.className ~= "HopperBin" then
  4. h = Instance.new("HopperBin")
  5. h.Parent = me.Backpack
  6. h.Name = "lolwut"
  7. script.Parent = h
  8. end
  9.  
  10. sp = script.Parent
  11.  
  12. rightarm = me.Character["Right Arm"]
  13. leftarm = me.Character["Left Arm"]
  14.  
  15. hold = false
  16. using = false
  17. holdkey = false
  18.  
  19. right = Instance.new("Weld")
  20. right.Parent = me.Character.Torso
  21. right.Part0 = nil
  22. right.Part1 = nil
  23. right.C1 = CFrame.fromEulerAnglesXYZ(-1.57,-0.4,0) * CFrame.new(-1,-0.5,0.1)
  24.  
  25. left = Instance.new("Weld")
  26. left.Parent = me.Character.Torso
  27. left.Part0 = nil
  28. left.Part1 = nil
  29. left.C1 = CFrame.fromEulerAnglesXYZ(-1.4,0.5,0) * CFrame.new(0.55,-0.4,1.3)
  30.  
  31. bulletcolors = {"Bright yellow", "Neon orange", "New Yeller"}
  32.  
  33. gun = Instance.new("Model")
  34. gun.Parent = game.Lighting
  35. gun.Name = "Gun"
  36.  
  37. handle = Instance.new("Part")
  38. handle.Parent = gun
  39. handle.formFactor = 0
  40. handle.Size = Vector3.new(1,1,1)
  41. handle.BrickColor = BrickColor.new("Black")
  42. mesh = Instance.new("SpecialMesh")
  43. mesh.Parent = handle
  44. mesh.MeshType = "Brick"
  45. mesh.Scale = Vector3.new(0.5,0.75,1.3)
  46.  
  47. handle2 = Instance.new("Part")
  48. handle2.Parent = gun
  49. handle2.formFactor = 0
  50. handle2.Size = Vector3.new(1,1,1)
  51. handle2.BrickColor = BrickColor.new("Black")
  52. mesh2 = mesh:clone()
  53. mesh2.Parent = handle2
  54. mesh2.Scale = Vector3.new(0.6,3.6,0.75)
  55.  
  56. handle3 = Instance.new("Part")
  57. handle3.Parent = gun
  58. handle3.formFactor = 0
  59. handle3.Size = Vector3.new(1,1,1)
  60. handle3.BrickColor = BrickColor.new("Black")
  61. mesh3 = mesh:clone()
  62. mesh3.Parent = handle3
  63. mesh3.Scale = Vector3.new(0.45,0.8,1.4)
  64.  
  65. handle4 = Instance.new("Part")
  66. handle4.Parent = gun
  67. handle4.formFactor = 0
  68. handle4.Size = Vector3.new(1,1,1)
  69. handle4.BrickColor = BrickColor.new("Really black")
  70. mesh4 = Instance.new("CylinderMesh")
  71. mesh4.Parent = handle4
  72. mesh4.Scale = Vector3.new(0.3,0.1,0.3)
  73. hold = false
  74. function selected(mouse, key)
  75. right.Part0 = right.Parent
  76. right.Part1 = rightarm
  77. left.Part0 = left.Parent
  78. left.Part1 = leftarm
  79. left.C1 = CFrame.fromEulerAnglesXYZ(-1.4,0.5,0) * CFrame.new(0.55,-0.4,1.3)
  80. right.C1 = CFrame.fromEulerAnglesXYZ(-1.57,-0.4,0) * CFrame.new(-1,-0.5,0.1)
  81. left.C0 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  82. right.C0 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  83. gun.Parent = me.Character
  84. gunweld1 = Instance.new("Weld")
  85. gunweld1.Parent = rightarm
  86. gunweld1.Part0 = gunweld1.Parent
  87. gunweld1.Part1 = handle
  88. gunweld1.C1 = CFrame.fromEulerAnglesXYZ(0.4,0,0) * CFrame.new(0,1,0)
  89. gunweld2 = Instance.new("Weld")
  90. gunweld2.Parent = handle
  91. gunweld2.Part0 = gunweld2.Parent
  92. gunweld2.Part1 = handle2
  93. gunweld2.C1 = CFrame.fromEulerAnglesXYZ(-0.4,0,0) * CFrame.new(0,1,1.2)
  94. gunweld3 = Instance.new("Weld")
  95. gunweld3.Parent = handle2
  96. gunweld3.Part0 = gunweld3.Parent
  97. gunweld3.Part1 = handle3
  98. gunweld3.C1 = CFrame.fromEulerAnglesXYZ(-0.3,0,0) * CFrame.new(0,0.3,-0.9)
  99. gunweld4 = Instance.new("Weld")
  100. gunweld4.Parent = handle2
  101. gunweld4.Part0 = gunweld3.Parent
  102. gunweld4.Part1 = handle4
  103. gunweld4.C1 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,1.751,0)
  104. mouse.Button1Down:connect(function()
  105. hold = true
  106. while hold == true do
  107. wait(0.04)
  108. local color = math.random(1, #bulletcolors)
  109. local pos = mouse.Hit.p + Vector3.new(math.random(-2,2),0,math.random(-2,2))
  110. local bullet = Instance.new("Part")
  111. bullet.Parent = workspace
  112. bullet.formFactor = 0
  113. bullet.Size = Vector3.new(1,1,1)
  114. bullet.BrickColor = BrickColor.new(bulletcolors[color])
  115. bullet.CanCollide = false
  116. bullet.Anchored = true
  117. bullet.CFrame = CFrame.new((handle4.Position + pos)/2, pos)
  118. local distance = (handle4.Position - pos).magnitude
  119. local bulletmesh = Instance.new("SpecialMesh")
  120. bulletmesh.Parent = bullet
  121. bulletmesh.MeshType = "Brick"
  122. bulletmesh.Scale = Vector3.new(0.2,0.2,distance)
  123. if mouse.Target ~= nil then
  124. local hu = mouse.Target.Parent:findFirstChild("Humanoid")
  125. if hu ~= nil then
  126. hu.Health = hu.Health - 5
  127. end
  128. end
  129. coroutine.resume(coroutine.create(function()
  130. left.C0 = left.C0 * CFrame.fromEulerAnglesXYZ(0.12,0,0)
  131. right.C0 = right.C0 * CFrame.fromEulerAnglesXYZ(0.12,0,0)
  132. wait()
  133. left.C0 = left.C0 * CFrame.fromEulerAnglesXYZ(-0.12,0,0)
  134. right.C0 = right.C0 * CFrame.fromEulerAnglesXYZ(-0.12,0,0)
  135. wait(0.03)
  136. bullet:remove()
  137. end))
  138. end
  139. end)
  140. mouse.Button1Up:connect(function()
  141. hold = false
  142. end)
  143. end
  144.  
  145. function deselect()
  146. left.C0 = CFrame.new(0,0,0)
  147. right.C0 = CFrame.new(0,0,0)
  148. me.Character:makeJoints()
  149. wait()
  150. right.Part0 = nil
  151. right.Part1 = nil
  152. left.Part0 = nil
  153. left.Part1 = nil
  154. gun.Parent = game.Lighting
  155. me.Character:makeJoints()
  156. end
  157.  
  158. sp.Selected:connect(selected)
  159. sp.Deselected:connect(deselect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement