astronaut32

arm rocket

Sep 7th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.80 KB | None | 0 0
  1. --==Made by LuisPambid==--
  2. local player=game.Players.LocalPlayer
  3. local char=player.Character
  4. repeat wait() until player and char
  5. local torso=char.Torso
  6. local head=char.Head
  7. local human=char.Humanoid
  8. local hat
  9. for i, v in pairs(char:children()) do if v:isA("Hat") then hat=v end end
  10. local arm={Left=char["Left Arm"], Right=char["Right Arm"]}
  11. local leg={Left=char["Left Leg"], Right=char["Right Leg"]}
  12. local c=function(f) coroutine.resume(coroutine.create(f)) end
  13. pcall(function() torso.roblox:clone().Parent=fake.Torso torso.roblox:remove() head.face:remove() for i, v in pairs(char:children()) do if v.ClassName=="Hat" then v:remove() end v.Transparency=1 end end)
  14. local add={
  15. Part=function(par, a, c, col, t, s, cf)
  16. local p=Instance.new("Part", par) p.TopSurface="Smooth" p.BottomSurface="Smooth" p.formFactor="Custom" p.Anchored=a p.CanCollide=c p.BrickColor=BrickColor.new(col) p.Transparency=t p.Size=s p.CFrame=cf or CFrame.new()
  17. return p
  18. end,
  19. Weld=function(par, p1, cf)
  20. local w=Instance.new("Weld", par) w.Part0=w.Parent or par w.Part1=p1 w.C1=cf or CFrame.new()
  21. return w
  22. end,
  23. Mesh=function(ins, par, s, of, t)
  24. local m=Instance.new(ins, par) m.Scale=s or Vector3.new() m.Offset=of or Vector3.new() pcall(function() m.MeshType=t end)
  25. return m
  26. end
  27. }
  28. local gui=Instance.new("ScreenGui", player.PlayerGui)
  29. local label=Instance.new("TextLabel", gui)
  30. label.Text="Lock Off"
  31. label.Position=UDim2.new(0, 0, 0, 200)
  32. label.Size=UDim2.new(0, 80, 0, 50)
  33. label.BorderColor=BrickColor.Black() label.BackgroundColor=BrickColor.Black()
  34. label.TextColor=BrickColor.White()
  35. label.Font="ArialBold"
  36. label.FontSize="Size18"
  37. local labelb=Instance.new("TextLabel", label)
  38. labelb.Text=""
  39. labelb.Position=UDim2.new(0, 0, 1, 0)
  40. labelb.Size=UDim2.new(3, 0, 1, 0)
  41. labelb.BorderColor=BrickColor.Black() labelb.BackgroundColor=BrickColor.Black()
  42. labelb.TextColor=BrickColor.White()
  43. labelb.Font="ArialBold"
  44. labelb.FontSize="Size18"
  45. local labelc=Instance.new("TextLabel", label)
  46. labelc.Text="Slow Off"
  47. labelc.Position=UDim2.new(0, 0, -1, 0)
  48. labelc.Size=UDim2.new(1, 0, 1, 0)
  49. labelc.BorderColor=BrickColor.Black() labelc.BackgroundColor=BrickColor.Black()
  50. labelc.TextColor=BrickColor.White()
  51. labelc.Font="ArialBold"
  52. labelc.FontSize="Size18"
  53.  
  54. local scriptname="Advance Arm Rocket"
  55. pcall(function() char[scriptname]:remove() end)
  56. local model=Instance.new("Model", char) model.Name=scriptname
  57. local bin=Instance.new("HopperBin", player.Backpack) bin.Name=model.Name
  58. local skincolor="Really black"
  59. local selected=false
  60. local rShoulder
  61. local hdeb=false
  62. local tdeb=false
  63. local kdeb=false
  64. local kdeb2=false
  65. local deb=false
  66.  
  67. function click(mouse)
  68. if deb==false then deb=true
  69. local rocket=add.Part(char, false, false, arm.Right.Color, 0, Vector3.new(1, 1, 2), torso.CFrame*CFrame.new(0, 4, 0)*CFrame.Angles(-math.rad(90), 0, 0))
  70. local trail
  71. c(function()
  72. local old=(rocket.CFrame*cf).p
  73. while tdeb==true do
  74. wait()
  75. local new=(rocket.CFrame*cf).p
  76. local mag=(old-new).magnitude
  77. local dis=(old+new)/2
  78. trail=add.Part(workspace, true, false, rocket.Color, 0, Vector3.new(1, 1, 1), CFrame.new(dis, new)*CFrame.Angles(math.pi/2, 0, 0))
  79. local tMesh=add.Mesh("CylinderMesh", trail, Vector3.new(1, 1, 1), nil, nil)
  80. old=new
  81. c(function()
  82. for i=1, 0, -.2 do
  83. wait()
  84. trail.Mesh.Scale=trail.Mesh.Scale*Vector3.new(i, 1, i)
  85. end
  86. trail:remove()
  87. end)
  88. c(function()
  89. for i=0, 1, .2 do
  90. wait()
  91. trail.Transparency=i
  92. end
  93. end)
  94. end
  95. end)
  96. rocket.Touched:connect(function(h)
  97. if h.Parent~=nil and h~=trail and h~=rocket and hdeb==false and h.Parent~=char then hdeb=true
  98. local exp=Instance.new("Explosion", workspace)
  99. exp.Position=rocket.Position
  100. exp.BlastPressure=4
  101. exp.BlastRadius=4
  102. local boom=add.Part(char, true, false, "Bright yellow", .5, Vector3.new(4, 4, 4), rocket.CFrame)
  103. local mesh=add.Mesh("SpecialMesh", boom, Vector3.new(1, 1, 1), nil, "Sphere")
  104. c(function()
  105. for i=0, 2, .2 do
  106. wait()
  107. boom.Mesh.Scale=boom.Mesh.Scale+Vector3.new(i, i, i)
  108. end
  109. boom:remove()
  110. end)
  111. pcall(function() rocket:remove() end)
  112. wait()
  113. hdeb=false
  114. tdeb=false
  115. end
  116. end)
  117. local bf=Instance.new("BodyForce", rocket) bf.force=Vector3.new(0, rocket:getMass()*196.2, 0)
  118. local bv=Instance.new("BodyVelocity", rocket) bv.maxForce=Vector3.new(math.huge, math.huge, math.huge)
  119. local tgt=mouse.Target
  120. local h=mouse
  121. if mouse.Target and mouse.Target.Name~="Base" then
  122. c(function()
  123. while true do
  124. rocket.CFrame=CFrame.new(rocket.CFrame.p, tgt.CFrame.p)
  125. bv.velocity=rocket.CFrame.lookVector*50
  126. wait(0)
  127. end
  128. end)
  129. else
  130. bv.velocity=rocket.CFrame.lookVector*50
  131. end
  132. wait(.1)
  133. deb=false
  134. end
  135. end
  136. bin.Selected:connect(function(mouse) selected=true
  137. mouse.Icon="http://www.roblox.com/asset/?id=22589358" --GREEN
  138. mouse.KeyDown:connect(function(key)
  139. if key=="q" and kdeb==false and kdeb2==false then kdeb=true --kdeb2=true
  140. for i, v in pairs(workspace:children()) do
  141. pcall(function() if v.Humanoid~=human then v.Humanoid.WalkSpeed=1 end end)
  142. end
  143. labelc.Text="Slow On"
  144. labelc.TextColor=BrickColor.Red()
  145. for i=5, 0, -1 do
  146. wait(1)
  147. labelc.Text="Slow On "..i
  148. end
  149. for i, v in pairs(workspace:children()) do
  150. pcall(function() if v.Humanoid~=human then v.Humanoid.WalkSpeed=16 end end)
  151. end
  152. labelc.Text="Slow Off"
  153. labelc.TextColor=BrickColor.White()
  154. kdeb=false
  155. end
  156. --[[ elseif key=="q" and kdeb==false and kdeb2==true then kdeb=true kdeb2=false
  157. for i, v in pairs(game.Workspace:children()) do
  158. pcall(function() v.Parent.Humanoid.WalkSpeed=16 end)
  159. end
  160. labelc.Text="Slow Off"
  161. labelc.TextColor=BrickColor.White()
  162. kdeb=false
  163. end]]
  164. end)
  165. mouse.Button1Down:connect(function() click(mouse) end)
  166. pcall(function() torso["Right Shoulder"]:remove() arm.Right.Anchored=true end)
  167. while selected do
  168. if mouse.Target and mouse.Target.Name~="Base" then
  169. pcall(function() labelb.Text=mouse.Target.Parent.Name.."'s "..mouse.Target.Name
  170. labelb.TextColor=BrickColor.Red()
  171. end)
  172. label.Text="Lock On"
  173. label.TextColor=BrickColor.Red()
  174. mouse.Icon="http://www.roblox.com/asset/?id=22590748" --RED
  175. else
  176. pcall(function() labelb.Text="None"
  177. labelb.TextColor=BrickColor.White() end)
  178. label.Text="Lock Off"
  179. label.TextColor=BrickColor.White()
  180. mouse.Icon="http://www.roblox.com/asset/?id=22589358" --GREEN
  181. end
  182. local Place0=torso.CFrame
  183. Place0=Place0 + ((Place0 * CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)).lookVector * 0.5) + (Place0 * CFrame.fromEulerAnglesXYZ(0,math.pi/2,0)).lookVector*-1
  184. local Place1=Place0 + ((Place0.p-mouse.Hit.p).unit * -2)
  185. arm.Right.CFrame=CFrame.new((Place0.p + Place1.p)/2, Place0.p) * CFrame.fromEulerAnglesXYZ(-math.pi/2,0,0)
  186. wait(0)
  187. end
  188. end)--mediafire
Add Comment
Please, Sign In to add comment