Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = game:GetService("Players").LocalPlayer
- local UIS = game:GetService("UserInputService")
- local Mouse = Player:GetMouse()
- local Character = Player.Character
- local Humanoid = Character.Humanoid
- local Torso = Character.Torso
- local LeftPart = Character["Left Arm"]
- local RightPart = Character["Right Arm"]
- local LeftArm = Torso["Left Shoulder"]
- local RightArm = Torso["Right Shoulder"]
- local LeftLeg = Torso["Left Hip"]
- local RightLeg = Torso["Right Hip"]
- local RootPart = Character.HumanoidRootPart
- local RootJoint = RootPart.RootJoint
- Character:WaitForChild("Animate"):Remove()
- Character.Humanoid:ClearAllChildren()
- Humanoid.WalkSpeed = 20
- local flare = Instance.new("Part",LeftPart)
- local flaremesh = Instance.new("SpecialMesh",flare)
- local flare2 = Instance.new("Part",RightPart)
- local flare2mesh = Instance.new("SpecialMesh",flare2)
- local Weld = Instance.new("Weld",flare)
- local Weld2 = Instance.new("Weld",flare2)
- local flaregunfire = Instance.new("Sound",Torso)
- flare.Size = Vector3.new(0.25,1,1.75)
- flare.CanCollide = false
- flaremesh.Scale = Vector3.new(0.015,0.015,0.015)
- flaremesh.MeshId = "rbxassetid://443983595"
- flaremesh.TextureId = "rbxassetid://443983604"
- flare2.Size = Vector3.new(0.25,1,1.75)
- flare2.CanCollide = false
- flare2mesh.Scale = Vector3.new(0.015,0.015,0.015)
- flare2mesh.MeshId = "rbxassetid://443983595"
- flare2mesh.TextureId = "rbxassetid://443983604"
- Weld.Part1 = flare
- Weld.Part0 = LeftPart
- Weld.C0 = CFrame.new(0,-1.25,-.25)*CFrame.Angles(-190,0,0)
- Weld2.Part1 = flare2
- Weld2.Part0 = RightPart
- Weld2.C0 = CFrame.new(0,-1.25,-.25)*CFrame.Angles(-190,0,0)
- flaregunfire.SoundId = "rbxassetid://168114845"
- flaregunfire.Volume = .7
- flaregunfire.Looped = false
- speed = .4
- sine = 1
- change = 1
- stage = 1
- action = false
- inair = false
- fireleft = false
- fireright = false
- fireleft2 = false
- fireright2 = false
- spawn(function()
- while true do
- sine = sine+change
- wait()
- local Velocity = RootPart.Velocity.Magnitude
- if Velocity > 0.01 then
- if not inair then
- if not action then
- 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)
- 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)
- 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)
- 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)
- RootJoint.C0 = RootJoint.C0:Lerp(CFrame.new(0,0,0)*CFrame.Angles(math.rad(-100),math.rad(0),math.rad(180)),speed)
- end
- end
- elseif Velocity < 0.01 then
- if not inair then
- if not action then
- 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)
- 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)
- 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)
- 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)
- 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)
- end
- end
- end
- if Humanoid:GetState() == Enum.HumanoidStateType.Freefall then -- In air
- if not action then
- inair = true
- 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)
- 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)
- LeftLeg.C0 = LeftLeg.C0:Lerp(CFrame.new(-.5,-.7,-1)*CFrame.Angles(math.rad(-15),math.rad(180),math.rad(0)),speed)
- RightLeg.C0 = RightLeg.C0:Lerp(CFrame.new(.5,-.45,-1)*CFrame.Angles(math.rad(-10),math.rad(180),math.rad(0)),speed)
- RootJoint.C0 = RootJoint.C0:Lerp(CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(180)),speed)
- end
- else
- inair = false
- end
- if fireleft then
- LeftArm.C0 = LeftArm.C0:lerp(CFrame.new(-.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(-70),math.rad(-90)),speed)
- RightArm.C0 = RightArm.C0:Lerp(CFrame.new(.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(-240)),speed)
- LeftLeg.C0 = LeftLeg.C0:Lerp(CFrame.new(-.5,-.95,-.5)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)),speed)
- RightLeg.C0 = RightLeg.C0:Lerp(CFrame.new(.5,-.95,-.5)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)),speed)
- RootJoint.C0 = RootJoint.C0:Lerp(CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(160)),speed)
- elseif fireright then
- LeftArm.C0 = LeftArm.C0:lerp(CFrame.new(-.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(230)),speed)
- RightArm.C0 = RightArm.C0:Lerp(CFrame.new(.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(70),math.rad(90)),speed)
- LeftLeg.C0 = LeftLeg.C0:Lerp(CFrame.new(-.5,-.95,-.5)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)),speed)
- RightLeg.C0 = RightLeg.C0:Lerp(CFrame.new(.5,-.95,-.5)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)),speed)
- RootJoint.C0 = RootJoint.C0:Lerp(CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(200)),speed)
- elseif fireleft2 then
- LeftArm.C0 = LeftArm.C0:lerp(CFrame.new(-.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(-70),math.rad(-160)),speed)
- RightArm.C0 = RightArm.C0:Lerp(CFrame.new(.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(-240)),speed)
- LeftLeg.C0 = LeftLeg.C0:Lerp(CFrame.new(-.5,-.95,-.5)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)),speed)
- RightLeg.C0 = RightLeg.C0:Lerp(CFrame.new(.5,-.95,-.5)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)),speed)
- RootJoint.C0 = RootJoint.C0:Lerp(CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(175)),speed)
- elseif fireright2 then
- LeftArm.C0 = LeftArm.C0:lerp(CFrame.new(-.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(230)),speed)
- RightArm.C0 = RightArm.C0:Lerp(CFrame.new(.9,.5,0)*CFrame.Angles(math.rad(0),math.rad(70),math.rad(160)),speed)
- LeftLeg.C0 = LeftLeg.C0:Lerp(CFrame.new(-.5,-.95,-.5)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)),speed)
- RightLeg.C0 = RightLeg.C0:Lerp(CFrame.new(.5,-.95,-.5)*CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)),speed)
- RootJoint.C0 = RootJoint.C0:Lerp(CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(185)),speed)
- end
- end
- end)
- Mouse.Button1Down:Connect(function()
- if not action then
- if not inair then
- action = true
- local flarepellet = Instance.new("Part",workspace)
- local flame = Instance.new("ParticleEmitter",flarepellet)
- flarepellet.BrickColor = BrickColor.new("Bright red")
- flarepellet.CanCollide = false
- flarepellet.Shape = Enum.PartType.Cylinder
- flarepellet.Material = Enum.Material.SmoothPlastic
- flarepellet.Size = Vector3.new(0.5,0.25,0.25)
- flarepellet.Anchored = false
- flame.Texture = "rbxassetid://399749242"
- flame.Size = NumberSequence.new(0.2,0.2,0.2,0.2)
- flame.Lifetime = NumberRange.new(0.05)
- flame.Rate = 3500
- if stage == 1 then
- stage = 2
- fireleft = true
- Humanoid.WalkSpeed = 0
- flarepellet.CFrame = CFrame.new(LeftPart.Position)
- flarepellet.Orientation = Vector3.new(LeftPart.Orientation.X,LeftPart.Orientation.Y+90,LeftPart.Orientation.Z)
- local Sound = Instance.new("Sound",flarepellet)
- Sound.SoundId = "rbxassetid://947384308"
- Sound.Looped = false
- Sound.Volume = .7
- Sound:Play()
- wait(.25)
- local Boom = Instance.new("Part",flare)
- local BoomMesh = Instance.new("SpecialMesh",Boom)
- Boom.Size = Vector3.new(0.25,0.25,0.25)
- Boom.CFrame = CFrame.new(flare.Position)
- Boom.Orientation = Vector3.new(flare.Orientation.X-90,flare.Orientation.Y,flare.Orientation.Z)
- Boom.BrickColor = BrickColor.new("Bright red")
- Boom.Anchored = true
- Boom.CanCollide = false
- BoomMesh.MeshId = "rbxassetid://489415447"
- fireleft = false
- fireleft2 = true
- flaregunfire.Parent = flare
- flaregunfire:Play()
- for i = 1,10 do
- wait()
- Boom.Transparency = Boom.Transparency+0.1
- BoomMesh.Scale = Vector3.new(BoomMesh.Scale.X+0.1,BoomMesh.Scale.Y+0.1,BoomMesh.Scale.Z+0.1)
- end
- Boom:Destroy()
- fireleft2 = false
- action = false
- Humanoid.WalkSpeed = 20
- elseif stage == 2 then
- Humanoid.WalkSpeed = 0
- stage = 1
- fireright = true
- flarepellet.CFrame = CFrame.new(RightPart.Position)
- flarepellet.Orientation = Vector3.new(RightPart.Orientation.X,RightPart.Orientation.Y+90,RightPart.Orientation.Z)
- local Sound = Instance.new("Sound",flarepellet)
- Sound.SoundId = "rbxassetid://947384308"
- Sound.Looped = false
- Sound.Volume = .7
- Sound:Play()
- wait(.25)
- fireright = false
- fireright2 = true
- flaregunfire.Parent = flare2
- flaregunfire:Play()
- local Boom = Instance.new("Part",flare2)
- local BoomMesh = Instance.new("SpecialMesh",Boom)
- Boom.Size = Vector3.new(0.25,0.25,0.25)
- Boom.CFrame = CFrame.new(flare2.Position)
- Boom.Orientation = Vector3.new(flare2.Orientation.X-90,flare2.Orientation.Y,flare2.Orientation.Z)
- Boom.BrickColor = BrickColor.new("Bright red")
- Boom.Anchored = true
- Boom.CanCollide = false
- BoomMesh.MeshId = "rbxassetid://489415447"
- for i = 1,10 do
- wait()
- Boom.Transparency = Boom.Transparency+0.1
- BoomMesh.Scale = Vector3.new(BoomMesh.Scale.X+0.1,BoomMesh.Scale.Y+0.1,BoomMesh.Scale.Z+0.1)
- end
- Boom:Destroy()
- fireright2 = false
- action = false
- Humanoid.WalkSpeed = 20
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement