Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- do
- print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
- script.Parent = Player.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- local Player = owner
- local UIS = game:GetService("UserInputService")
- 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)
- local theme = Instance.new("Sound",Torso)
- theme.SoundId = "rbxassetid://163010314"
- theme.Volume = 1000
- theme:Play()
- 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 = .3
- 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
- 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",Character)
- local flame = Instance.new("ParticleEmitter",flarepellet)
- local flarepelletforce = Instance.new("BodyVelocity",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 = true
- flarepellet.CFrame = CFrame.new(Character.Torso.Position)
- 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
- local Sound = Instance.new("Sound",flarepellet)
- Sound.SoundId = "rbxassetid://947384308"
- Sound.Looped = false
- Sound.Volume = 5
- wait(.25)
- Sound:Play()
- 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()
- flarepellet.CFrame = CFrame.new(LeftPart.Position)
- flarepellet.Orientation = Vector3.new(LeftPart.Orientation.X,RightPart.Orientation.Y+90,RightPart.Orientation.Z)
- flarepelletforce.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- flarepelletforce.Velocity = RootPart.CFrame.LookVector*200
- flarepellet.Anchored = false
- flarepellet.Touched:Connect(function(hit)
- if hit.Parent == Player.Character then return end
- if hit and hit.Parent:FindFirstChild("Humanoid") then
- flarepellet:Destroy()
- local Explosion = Instance.new("Part",hit.Parent)
- Explosion.Shape = Enum.PartType.Ball
- Explosion.BrickColor = BrickColor.new("Bright red")
- Explosion.Material = Enum.Material.Neon
- Explosion.Position = hit.Parent.Torso.Position
- Explosion.Size = Vector3.new(.05,.05,.05)
- Explosion.Anchored = true
- Explosion.CanCollide = false
- local ExplodeSound = Instance.new("Sound",Explosion)
- ExplodeSound.SoundId = "rbxassetid://262562442"
- ExplodeSound.Volume = 3
- ExplodeSound:Play()
- local somethingsburning = Instance.new("ParticleEmitter",hit.Parent.Torso)
- somethingsburning.Texture = "rbxassetid://2022785480"
- somethingsburning.Rate = 1000
- somethingsburning.SpreadAngle = Vector2.new(100,100)
- somethingsburning.Size = NumberSequence.new(1,1,1,1)
- somethingsburning.Lifetime = NumberRange.new(.5)
- local uhoh = Instance.new("Sound",hit.Parent.Torso)
- uhoh.SoundId = "rbxassetid://298181829"
- uhoh.Volume = 1
- uhoh.Looped = true
- uhoh:Play()
- for i = 1,20 do
- wait()
- Explosion.Size = Vector3.new(Explosion.Size.X+1,Explosion.Size.Y+1,Explosion.Size.Z+1)
- Explosion.Transparency = Explosion.Transparency+0.05
- end
- wait(3)
- hit.Parent:BreakJoints()
- local rip = Instance.new("Sound",hit.Parent.Torso)
- rip.SoundId = "rbxassetid://535690488"
- rip.Volume = 10
- rip:Play()
- somethingsburning:Destroy()
- uhoh:Destroy()
- wait(1)
- hit.Parent:Destroy()
- end
- end)
- for i = 1,10 do
- wait()
- Boom.Transparency = Boom.Transparency+0.1
- BoomMesh.Scale = Vector3.new(BoomMesh.Scale.X+.1,BoomMesh.Scale.Y+.1,BoomMesh.Scale.Z+.1)
- end
- Boom:Destroy()
- fireleft2 = false
- action = false
- Humanoid.WalkSpeed = 20
- wait(5)
- flarepellet:Destroy()
- elseif stage == 2 then
- Humanoid.WalkSpeed = 0
- stage = 1
- fireright = true
- local Sound = Instance.new("Sound",flarepellet)
- Sound.SoundId = "rbxassetid://947384308"
- Sound.Looped = true
- Sound.Volume = 5
- wait(.25)
- Sound:Play()
- 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"
- flarepellet.CFrame = CFrame.new(RightPart.Position)
- flarepellet.Orientation = Vector3.new(RightPart.Orientation.X,RightPart.Orientation.Y+90,RightPart.Orientation.Z)
- flarepelletforce.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- flarepelletforce.Velocity = RootPart.CFrame.LookVector*200
- flarepellet.Anchored = false
- flarepellet.Touched:Connect(function(hit)
- if hit.Parent == Player.Character then return end
- if hit and hit.Parent:FindFirstChild("Humanoid") then
- flarepellet:Destroy()
- local Explosion = Instance.new("Part",hit.Parent)
- Explosion.Shape = Enum.PartType.Ball
- Explosion.BrickColor = BrickColor.new("Bright red")
- Explosion.Material = Enum.Material.Neon
- Explosion.Position = hit.Parent.Torso.Position
- Explosion.Size = Vector3.new(.05,.05,.05)
- Explosion.Anchored = true
- Explosion.CanCollide = false
- local ExplodeSound = Instance.new("Sound",Explosion)
- ExplodeSound.SoundId = "rbxassetid://262562442"
- ExplodeSound.Volume = 3
- ExplodeSound:Play()
- local somethingsburning = Instance.new("ParticleEmitter",hit.Parent.Torso)
- somethingsburning.Texture = "rbxassetid://2022785480"
- somethingsburning.Rate = 1000
- somethingsburning.SpreadAngle = Vector2.new(100,100)
- somethingsburning.Size = NumberSequence.new(1,1,1,1)
- somethingsburning.Lifetime = NumberRange.new(.5)
- local uhoh = Instance.new("Sound",hit.Parent.Torso)
- uhoh.SoundId = "rbxassetid://298181829"
- uhoh.Volume = 1
- uhoh.Looped = true
- uhoh:Play()
- for i = 1,20 do
- wait()
- Explosion.Size = Vector3.new(Explosion.Size.X+1,Explosion.Size.Y+1,Explosion.Size.Z+1)
- Explosion.Transparency = Explosion.Transparency+0.05
- end
- wait(3)
- hit.Parent:BreakJoints()
- local rip = Instance.new("Sound",hit.Parent.Torso)
- rip.SoundId = "rbxassetid://535690488"
- rip.Volume = 10
- rip:Play()
- somethingsburning:Destroy()
- uhoh:Destroy()
- wait(1)
- hit.Parent:Destroy()
- end
- end)
- 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
- wait(5)
- flarepellet:Destroy()
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement