brandonflex123

Untitled

Feb 12th, 2017
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.41 KB | None | 0 0
  1. script.Parent = nil
  2. ply = game.Players.LocalPlayer
  3. char = ply.Character
  4. torso = char.Torso
  5. rs = torso["Right Shoulder"]
  6. rarm = char["Right Arm"]
  7. rw = Instance.new("Weld")
  8. attacking = false
  9.  
  10. function lock(a)
  11. if a == 1 then
  12. rw.Parent = torso
  13. rw.C0,rw.C1 = rs.C0,rs.C1
  14. rw.Part0,rw.Part1 = rs.Part0,rs.Part1
  15. rs.Parent = nil
  16. elseif a == 0 then
  17. rs.Parent = torso
  18. rw.Parent = nil
  19. end
  20. end
  21.  
  22. -----WEAPON START------
  23. m = Instance.new("Model",char)
  24.  
  25. hdl = Instance.new("Part",m)
  26. hdl.TopSurface,hdl.BottomSurface = 0,0
  27. hdl.formFactor = "Custom"
  28. hdl.Size = Vector3.new(0.3,3,0.3)
  29. hdl.CanCollide = false
  30. hdl.Color = Color3.new(0,0.3,0)
  31. Instance.new("CylinderMesh",hdl)
  32.  
  33. p1 = hdl:Clone()
  34. p1.Parent = m
  35. p1.Size = Vector3.new(0.5,0.2,0.5)
  36.  
  37. p2 = hdl:Clone()
  38. p2.Parent = m
  39. p2.Mesh:Remove()
  40. p2.Size = Vector3.new(0.7,0.5,0.7)
  41. p2.Color = Color3.new(1,1,0)
  42. Instance.new("SpecialMesh",p2).MeshType = 3
  43.  
  44. p3 = p1:Clone()
  45. p3.Parent = m
  46. p3.Size = Vector3.new(0.4,0.2,0.4)
  47.  
  48. p4 = p2:Clone()
  49. p4.Parent = m
  50. p4.Size = Vector3.new(0.2,0.2,0.2)
  51.  
  52. p5 = p2:Clone()
  53. p5.Parent = m
  54. p5.Size = Vector3.new(0.4,0.4,0.4)
  55.  
  56. p6 = p4:Clone()
  57. p6.Parent = m
  58. p6.Color = hdl.Color
  59.  
  60. w = Instance.new("Weld",m)
  61. w.Part0,w.Part1 = p1,hdl
  62. w.C1 = CFrame.new(0,hdl.Size.y/2+p1.Size.y/2-0.05,0)
  63.  
  64. w = Instance.new("Weld",m)
  65. w.Part0,w.Part1 = p2,p1
  66. w.C1 = CFrame.new(0,p1.Size.y/2+p2.Size.y/2-0.05,0)
  67.  
  68. w = Instance.new("Weld",m)
  69. w.Part0,w.Part1 = p3,p2
  70. w.C1 = CFrame.new(0,p2.Size.y/2+p3.Size.y/2-0.05,0)
  71.  
  72. w = Instance.new("Weld",m)
  73. w.Part0,w.Part1 = p4,p3
  74. w.C1 = CFrame.new(0,p4.Size.y/2+p3.Size.y/2-0.05,0)
  75.  
  76. w = Instance.new("Weld",m)
  77. w.Part0,w.Part1 = p5,hdl
  78. w.C1 = CFrame.new(0,-hdl.Size.y/2-p5.Size.y/2+0.05,0)
  79.  
  80. w = Instance.new("Weld",m)
  81. w.Part0,w.Part1 = p6,p5
  82. w.C1 = CFrame.new(0,-p5.Size.y/2,0)
  83.  
  84. hw = Instance.new("Weld",m)
  85. hw.Part0,hw.Part1 = hdl,rarm
  86. hw.C1 = CFrame.new(0,-rarm.Size.y/2-0.20,0) * CFrame.Angles(-math.pi/2,0,0)
  87. -----WEAPON END-----
  88.  
  89. down = false
  90. function boom(mouse)
  91. if mouse.Target ~= nil then
  92. c = Instance.new("Part",m)
  93. c.formFactor = "Custom"
  94. c.Size = Vector3.new(0.1,0.1,0.1)
  95. c.Anchored = true
  96. c.CanCollide = false
  97. mesh = Instance.new("SpecialMesh",c)
  98. mesh.MeshType = 3
  99. mesh.Scale = Vector3.new(5,1,5) * 10
  100. c.CFrame = CFrame.new(mouse.hit.p)
  101. c.Transparency = 0.5
  102. c.Color = Color3.new(0.1,0.3,0)
  103. c.TopSurface,c.BottomSurface = 0,0
  104. down = true
  105. while down == true do
  106. wait()
  107. if (p2.Position-mouse.hit.p).magnitude <= 40 then
  108. c.CFrame = CFrame.new(mouse.hit.p)
  109. end
  110. end
  111.  
  112. local ball = p2:Clone()
  113. ball.Parent = m
  114. ball.Transparency = 0.5
  115. ball.Size = Vector3.new(10,10,10)
  116. ball.CFrame = p2.CFrame * CFrame.new(0,3,0)
  117. ball:BreakJoints()
  118.  
  119. bp = Instance.new("BodyPosition",ball)
  120. bp.maxForce = Vector3.new() * math.huge
  121. bp.Name = "bp"
  122. bp.position = c.Position + Vector3.new(0,10,0)
  123.  
  124. while (ball.Position-bp.position).magnitude > 2 do wait() end
  125.  
  126. ball.bp:Remove()
  127. ball.Anchored = true
  128.  
  129. r = 5.5
  130.  
  131. for i = 1,360,180 do
  132. wait()
  133. local c2 = ball:Clone()
  134. c2.Parent = m
  135. c2.Size = ball.Size/3
  136. c2.CFrame = ball.CFrame + Vector3.new(math.cos(math.rad(i))*r,0,math.sin(math.rad(i))*r)
  137.  
  138. coroutine.resume(coroutine.create(function()
  139. while true do
  140. wait()
  141. for o = 1,360,20 do
  142. wait()
  143. c2.CFrame = ball.CFrame + Vector3.new(math.cos(math.rad(o))*r,0,math.sin(math.rad(o))*r)
  144. end
  145. end
  146. end))
  147.  
  148. end
  149.  
  150. for i = 1,360,180 do
  151. wait()
  152. local c2 = ball:Clone()
  153. c2.Parent = m
  154. c2.Size = ball.Size/3
  155. c2.CFrame = ball.CFrame + Vector3.new(0,math.cos(math.rad(i))*r,math.sin(math.rad(i))*r)
  156.  
  157. coroutine.resume(coroutine.create(function()
  158. while true do
  159. wait()
  160. for o = 1,360,20 do
  161. wait()
  162. c2.CFrame = ball.CFrame + Vector3.new(0,math.cos(math.rad(o))*r,math.sin(math.rad(o))*r)
  163. end
  164. end
  165. end))
  166.  
  167. end
  168.  
  169. c:Remove()
  170.  
  171. end
  172. end
  173.  
  174. function rise(mouse)
  175. r = 5
  176. he = 0
  177. if mouse.Target ~= nil then
  178.  
  179. local g = Instance.new("ScreenGui",ply.PlayerGui)
  180.  
  181. lab = Instance.new("TextLabel",g)
  182. lab.Size = UDim2.new(0.05,0,0.05,0)
  183. lab.Position = UDim2.new(-0.05,0,0.5,0)
  184. lab.FontSize = 7
  185.  
  186. lab:TweenPosition(UDim2.new(0.15,0,0.5,0),"Out","Quad",0.5)
  187.  
  188. pointer = hdl:Clone()
  189. pointer.Parent = Workspace.CurrentCamera
  190. pointer.Size = Vector3.new(0.5,0.2,0.5)
  191. pointer.Anchored = true
  192.  
  193. down = true
  194. coroutine.resume(coroutine.create(function() while down == true do wait()pointer.CFrame = CFrame.new(mouse.hit.p) end pointer:Remove() end))
  195. while down == true do wait(0.25) he = he+2 lab.Text = he end
  196.  
  197. local pos = Instance.new("CFrameValue",nil)
  198. pos.Value = mouse.hit
  199. for i = 1,360,20 do
  200. wait()
  201. local c = Instance.new("Part",Workspace)
  202. c.TopSurface,c.BottomSurface = 0,0
  203. c.Size = Vector3.new(1,he,1)
  204. c.Anchored = true
  205. Instance.new("CylinderMesh",c)
  206. c.Color = Color3.new(0.1,0,0.3)
  207. c.CFrame = CFrame.new((pos.Value + Vector3.new(math.cos(math.rad(i))*r,-he/2,math.sin(math.rad(i))*r)).p)
  208.  
  209. coroutine.resume(coroutine.create(function()
  210. for i = 1,he do
  211. wait()
  212. c.CFrame = c.CFrame + Vector3.new(0,1,0)
  213. end
  214. end))
  215.  
  216. end
  217.  
  218. lab:TweenPosition(UDim2.new(-0.05,0,0.5,0),"Out", "Quad",0.5)
  219. g:Remove()
  220. he = 0
  221.  
  222. end
  223. end
  224.  
  225. h = Instance.new("HopperBin",ply.Backpack)
  226.  
  227. function kd(key,mouse)
  228. if key == "f" then rise(mouse)
  229. end
  230. end
  231.  
  232. h.Selected:connect(function(mouse)
  233. mouse.KeyUp:connect(function(hit) if hit == "f" then down = false end end)
  234. mouse.Button1Up:connect(function() down = false end)
  235. mouse.Button1Down:connect(function() boom(mouse) end)
  236. mouse.KeyDown:connect(function(key) kd(key,mouse) end)
  237. end)
Add Comment
Please, Sign In to add comment