Advertisement
fusionfriends

Untitled

Mar 4th, 2019
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.87 KB | None | 0 0
  1. local Player = game:GetService("Players").LocalPlayer
  2. local UIS = game:GetService("UserInputService")
  3. local Mouse = Player:GetMouse()
  4. local Character = Player.Character
  5. local Humanoid = Character.Humanoid
  6. local Torso = Character.Torso
  7. local LeftPart = Character["Left Arm"]
  8. local RightPart = Character["Right Arm"]
  9. local LeftArm = Torso["Left Shoulder"]
  10. local RightArm = Torso["Right Shoulder"]
  11. local LeftLeg = Torso["Left Hip"]
  12. local RightLeg = Torso["Right Hip"]
  13. local RootPart = Character.HumanoidRootPart
  14. local RootJoint = RootPart.RootJoint
  15.  
  16. Character:WaitForChild("Animate"):Remove()
  17. Character.Humanoid:ClearAllChildren()
  18.  
  19. Humanoid.WalkSpeed = 20
  20.  
  21. local flare = Instance.new("Part",LeftPart)
  22. local flaremesh = Instance.new("SpecialMesh",flare)
  23. local flare2 = Instance.new("Part",RightPart)
  24. local flare2mesh = Instance.new("SpecialMesh",flare2)
  25.  
  26. local Weld = Instance.new("Weld",flare)
  27. local Weld2 = Instance.new("Weld",flare2)
  28.  
  29. local flaregunfire = Instance.new("Sound",Torso)
  30.  
  31. flare.Size = Vector3.new(0.25,1,1.75)
  32. flare.CanCollide = false
  33.  
  34. flaremesh.Scale = Vector3.new(0.015,0.015,0.015)
  35. flaremesh.MeshId = "rbxassetid://443983595"
  36. flaremesh.TextureId = "rbxassetid://443983604"
  37.  
  38. flare2.Size = Vector3.new(0.25,1,1.75)
  39. flare2.CanCollide = false
  40.  
  41. flare2mesh.Scale = Vector3.new(0.015,0.015,0.015)
  42. flare2mesh.MeshId = "rbxassetid://443983595"
  43. flare2mesh.TextureId = "rbxassetid://443983604"
  44.  
  45. Weld.Part1 = flare
  46. Weld.Part0 = LeftPart
  47. Weld.C0 = CFrame.new(0,-1.25,-.25)*CFrame.Angles(-190,0,0)
  48.  
  49. Weld2.Part1 = flare2
  50. Weld2.Part0 = RightPart
  51. Weld2.C0 = CFrame.new(0,-1.25,-.25)*CFrame.Angles(-190,0,0)
  52.  
  53. flaregunfire.SoundId = "rbxassetid://168114845"
  54. flaregunfire.Volume = .7
  55. flaregunfire.Looped = false
  56.  
  57. speed = .4
  58. sine = 1
  59. change = 1
  60. stage = 1
  61. action = false
  62. inair = false
  63. fireleft = false
  64. fireright = false
  65. fireleft2 = false
  66. fireright2 = false
  67.  
  68. spawn(function()
  69. while true do
  70. sine = sine+change
  71. wait()
  72. local Velocity = RootPart.Velocity.Magnitude
  73. if Velocity > 0.01 then
  74. if not inair then
  75. if not action then
  76. LeftArm.C0 = LeftArm.C0:lerp(CFrame.new(-.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(230-10*math.sin(sine/10))),speed)
  77. RightArm.C0 = RightArm.C0:Lerp(CFrame.new(.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(-240+10*math.sin(sine/10))),speed)
  78. LeftLeg.C0 = LeftLeg.C0:Lerp(CFrame.new(-.5,-.95,-.6)*CFrame.Angles(math.rad(0-60*math.sin(sine/3)),math.rad(180),math.rad(0)),speed)
  79. RightLeg.C0 = RightLeg.C0:Lerp(CFrame.new(.5,-.95,-.6)*CFrame.Angles(math.rad(0+60*math.sin(sine/3)),math.rad(180),math.rad(0)),speed)
  80. RootJoint.C0 = RootJoint.C0:Lerp(CFrame.new(0,0,0)*CFrame.Angles(math.rad(-100),math.rad(0),math.rad(180)),speed)
  81. end
  82. end
  83. elseif Velocity < 0.01 then
  84. if not inair then
  85. if not action then
  86. LeftArm.C0 = LeftArm.C0:lerp(CFrame.new(-.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(230-10*math.sin(sine/10))),speed)
  87. RightArm.C0 = RightArm.C0:Lerp(CFrame.new(.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(-240+10*math.sin(sine/10))),speed)
  88. LeftLeg.C0 = LeftLeg.C0:Lerp(CFrame.new(-.5,-.95-.15*math.sin(sine/10),-.5)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)),speed)
  89. RightLeg.C0 = RightLeg.C0:Lerp(CFrame.new(.5,-.95-.15*math.sin(sine/10),-.5)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)),speed)
  90. RootJoint.C0 = RootJoint.C0:Lerp(CFrame.new(0,0+.15*math.sin(sine/10),0)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(180)),speed)
  91. end
  92. end
  93. end
  94. if Humanoid:GetState() == Enum.HumanoidStateType.Freefall then -- In air
  95. if not action then
  96. inair = true
  97. LeftArm.C0 = LeftArm.C0:lerp(CFrame.new(-.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(230-10*math.sin(sine/5))),speed)
  98. RightArm.C0 = RightArm.C0:Lerp(CFrame.new(.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(-240+10*math.sin(sine/5))),speed)
  99. LeftLeg.C0 = LeftLeg.C0:Lerp(CFrame.new(-.5,-.7,-1)*CFrame.Angles(math.rad(-15),math.rad(180),math.rad(0)),speed)
  100. RightLeg.C0 = RightLeg.C0:Lerp(CFrame.new(.5,-.45,-1)*CFrame.Angles(math.rad(-10),math.rad(180),math.rad(0)),speed)
  101. RootJoint.C0 = RootJoint.C0:Lerp(CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(180)),speed)
  102. end
  103. else
  104. inair = false
  105. end
  106. if fireleft then
  107. LeftArm.C0 = LeftArm.C0:lerp(CFrame.new(-.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(-70),math.rad(-90)),speed)
  108. RightArm.C0 = RightArm.C0:Lerp(CFrame.new(.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(-240)),speed)
  109. LeftLeg.C0 = LeftLeg.C0:Lerp(CFrame.new(-.5,-.95,-.5)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)),speed)
  110. RightLeg.C0 = RightLeg.C0:Lerp(CFrame.new(.5,-.95,-.5)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)),speed)
  111. RootJoint.C0 = RootJoint.C0:Lerp(CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(160)),speed)
  112. elseif fireright then
  113. LeftArm.C0 = LeftArm.C0:lerp(CFrame.new(-.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(230)),speed)
  114. RightArm.C0 = RightArm.C0:Lerp(CFrame.new(.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(70),math.rad(90)),speed)
  115. LeftLeg.C0 = LeftLeg.C0:Lerp(CFrame.new(-.5,-.95,-.5)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)),speed)
  116. RightLeg.C0 = RightLeg.C0:Lerp(CFrame.new(.5,-.95,-.5)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)),speed)
  117. RootJoint.C0 = RootJoint.C0:Lerp(CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(200)),speed)
  118. elseif fireleft2 then
  119. LeftArm.C0 = LeftArm.C0:lerp(CFrame.new(-.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(-70),math.rad(-160)),speed)
  120. RightArm.C0 = RightArm.C0:Lerp(CFrame.new(.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(-240)),speed)
  121. LeftLeg.C0 = LeftLeg.C0:Lerp(CFrame.new(-.5,-.95,-.5)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)),speed)
  122. RightLeg.C0 = RightLeg.C0:Lerp(CFrame.new(.5,-.95,-.5)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)),speed)
  123. RootJoint.C0 = RootJoint.C0:Lerp(CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(175)),speed)
  124. elseif fireright2 then
  125. LeftArm.C0 = LeftArm.C0:lerp(CFrame.new(-.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(230)),speed)
  126. RightArm.C0 = RightArm.C0:Lerp(CFrame.new(.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(70),math.rad(160)),speed)
  127. LeftLeg.C0 = LeftLeg.C0:Lerp(CFrame.new(-.5,-.95,-.5)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)),speed)
  128. RightLeg.C0 = RightLeg.C0:Lerp(CFrame.new(.5,-.95,-.5)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)),speed)
  129. RootJoint.C0 = RootJoint.C0:Lerp(CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(185)),speed)
  130. end
  131. end
  132. end)
  133. Mouse.Button1Down:Connect(function()
  134. if not action then
  135. if not inair then
  136. action = true
  137. local flarepellet = Instance.new("Part",workspace)
  138. local flame = Instance.new("ParticleEmitter",flarepellet)
  139. flarepellet.BrickColor = BrickColor.new("Bright red")
  140. flarepellet.CanCollide = false
  141. flarepellet.Shape = Enum.PartType.Cylinder
  142. flarepellet.Material = Enum.Material.SmoothPlastic
  143. flarepellet.Size = Vector3.new(0.5,0.25,0.25)
  144. flarepellet.Anchored = false
  145. flame.Texture = "rbxassetid://399749242"
  146. flame.Size = NumberSequence.new(0.2,0.2,0.2,0.2)
  147. flame.Lifetime = NumberRange.new(0.05)
  148. flame.Rate = 3500
  149. if stage == 1 then
  150. stage = 2
  151. fireleft = true
  152. Humanoid.WalkSpeed = 0
  153. flarepellet.CFrame = CFrame.new(LeftPart.Position)
  154. flarepellet.Orientation = Vector3.new(LeftPart.Orientation.X,LeftPart.Orientation.Y+90,LeftPart.Orientation.Z)
  155. local Sound = Instance.new("Sound",flarepellet)
  156. Sound.SoundId = "rbxassetid://947384308"
  157. Sound.Looped = false
  158. Sound.Volume = .7
  159. Sound:Play()
  160. wait(.25)
  161. local Boom = Instance.new("Part",flare)
  162. local BoomMesh = Instance.new("SpecialMesh",Boom)
  163. Boom.Size = Vector3.new(0.25,0.25,0.25)
  164. Boom.CFrame = CFrame.new(flare.Position)
  165. Boom.Orientation = Vector3.new(flare.Orientation.X-90,flare.Orientation.Y,flare.Orientation.Z)
  166. Boom.BrickColor = BrickColor.new("Bright red")
  167. Boom.Anchored = true
  168. Boom.CanCollide = false
  169. BoomMesh.MeshId = "rbxassetid://489415447"
  170. fireleft = false
  171. fireleft2 = true
  172. flaregunfire.Parent = flare
  173. flaregunfire:Play()
  174. for i = 1,10 do
  175. wait()
  176. Boom.Transparency = Boom.Transparency+0.1
  177. BoomMesh.Scale = Vector3.new(BoomMesh.Scale.X+0.1,BoomMesh.Scale.Y+0.1,BoomMesh.Scale.Z+0.1)
  178. end
  179. Boom:Destroy()
  180. fireleft2 = false
  181. action = false
  182. Humanoid.WalkSpeed = 20
  183. elseif stage == 2 then
  184. Humanoid.WalkSpeed = 0
  185. stage = 1
  186. fireright = true
  187. flarepellet.CFrame = CFrame.new(RightPart.Position)
  188. flarepellet.Orientation = Vector3.new(RightPart.Orientation.X,RightPart.Orientation.Y+90,RightPart.Orientation.Z)
  189. local Sound = Instance.new("Sound",flarepellet)
  190. Sound.SoundId = "rbxassetid://947384308"
  191. Sound.Looped = false
  192. Sound.Volume = .7
  193. Sound:Play()
  194. wait(.25)
  195. fireright = false
  196. fireright2 = true
  197. flaregunfire.Parent = flare2
  198. flaregunfire:Play()
  199. local Boom = Instance.new("Part",flare2)
  200. local BoomMesh = Instance.new("SpecialMesh",Boom)
  201. Boom.Size = Vector3.new(0.25,0.25,0.25)
  202. Boom.CFrame = CFrame.new(flare2.Position)
  203. Boom.Orientation = Vector3.new(flare2.Orientation.X-90,flare2.Orientation.Y,flare2.Orientation.Z)
  204. Boom.BrickColor = BrickColor.new("Bright red")
  205. Boom.Anchored = true
  206. Boom.CanCollide = false
  207. BoomMesh.MeshId = "rbxassetid://489415447"
  208. for i = 1,10 do
  209. wait()
  210. Boom.Transparency = Boom.Transparency+0.1
  211. BoomMesh.Scale = Vector3.new(BoomMesh.Scale.X+0.1,BoomMesh.Scale.Y+0.1,BoomMesh.Scale.Z+0.1)
  212. end
  213. Boom:Destroy()
  214. fireright2 = false
  215. action = false
  216. Humanoid.WalkSpeed = 20
  217. end
  218. end
  219. end
  220. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement