Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Uh.. why did you run it as local instead of global? Idiot.") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- do
- print("FE Compatibility code by Mokiros")
- 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
- plr = owner
- char = plr.Character
- local color = Color3.new(1,1,0.7)
- local dark =false
- hum = char.Humanoid
- local cam = game.Workspace.CurrentCamera
- t = char.Torso
- h = char.Head
- ra = char["Right Arm"]
- la = char["Left Arm"]
- rl = char["Right Leg"]
- ll = char["Left Leg"]
- tors = char.Torso
- lleg = char["Left Leg"]
- root = char.HumanoidRootPart
- hed = char.Head
- rleg = char["Right Leg"]
- rarm = char["Right Arm"]
- larm = char["Left Arm"]
- it = Instance.new
- vt = Vector3.new
- bc = BrickColor.new
- br = BrickColor.random
- it = Instance.new
- cf = CFrame.new
- ceuler = CFrame.fromEulerAnglesXYZ
- Player=owner
- Character=Player.Character
- PlayerGui=Player.PlayerGui
- Backpack=Player.Backpack
- Torso=Character.Torso
- Head=Character.Head
- Humanoid=Character.Humanoid
- m=Instance.new('Model',Character)
- LeftArm=Character["Left Arm"]
- LeftLeg=Character["Left Leg"]
- RightArm=Character["Right Arm"]
- RightLeg=Character["Right Leg"]
- LS=Torso["Left Shoulder"]
- LH=Torso["Left Hip"]
- RS=Torso["Right Shoulder"]
- RH=Torso["Right Hip"]
- Face = Head.face
- Neck=Torso.Neck
- it=Instance.new
- attacktype=1
- vt=Vector3.new
- cf=CFrame.new
- euler=CFrame.fromEulerAnglesXYZ
- angles=CFrame.Angles
- cloaked=false
- necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
- LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
- RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
- RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
- RootPart=Character.HumanoidRootPart
- RootJoint=RootPart.RootJoint
- RootCF=euler(-1.57,0,3.14)
- attack = false
- attackdebounce = false
- deb=false
- equipped=false
- hand=false
- MMouse=nil
- combo=0
- mana=0
- trispeed=.2
- attackmode='none'
- local idle=0
- local Anim="Idle"
- local sine = 0
- local change = 1
- local hold = false
- player=nil
- local inf = Instance.new("TextLabel")
- inf.BackgroundTransparency = 1
- inf.Text = ""
- inf.Font = "SciFi"
- inf.TextScaled = true
- inf.Size = UDim2.new(0.1,0,0.1,0)
- inf.Position = UDim2.new(0.4,0,0.1,0)
- gu = Instance.new("ScreenGui")
- gu.Parent = owner.PlayerGui
- inf.Parent = gu
- --save shoulders
- RSH, LSH=nil, nil
- --welds
- RW, LW=Instance.new("Weld"), Instance.new("Weld")
- RW.Name="Right Shoulder" LW.Name="Left Shoulder"
- LH=Torso["Left Hip"]
- RH=Torso["Right Hip"]
- TorsoColor=Torso.BrickColor
- function NoOutline(Part)
- Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
- end
- player=Player
- ch=Character
- RSH=ch.Torso["Right Shoulder"]
- LSH=ch.Torso["Left Shoulder"]
- --
- RSH.Parent=nil
- LSH.Parent=nil
- --
- RW.Name="Right Shoulder"
- RW.Part0=ch.Torso
- RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
- RW.C1=cf(0, 0.5, 0)
- RW.Part1=ch["Right Arm"]
- RW.Parent=ch.Torso
- --
- LW.Name="Left Shoulder"
- LW.Part0=ch.Torso
- LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
- LW.C1=cf(0, 0.5, 0)
- LW.Part1=ch["Left Arm"]
- LW.Parent=ch.Torso
- local Pt = Instance.new('ParticleEmitter', Character.HumanoidRootPart)
- Pt.Rate = 0
- Pt.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,3), NumberSequenceKeypoint.new(1,3)})
- Pt.Drag = 3
- Pt.Name = "Effect"
- Pt.SpreadAngle = Vector2.new(360,360)
- Pt.Color = ColorSequence.new(color)
- Pt.Acceleration = Vector3.new(0,10,0)
- Pt.Texture = "http://www.roblox.com/asset/?id=4581757159"
- Pt.LightEmission = 1
- Pt.Speed = NumberRange.new(20,40)
- Pt.LockedToPart = false
- Pt.Lifetime = NumberRange.new(1,2)
- Pt.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0), NumberSequenceKeypoint.new(0.7,0), NumberSequenceKeypoint.new(1,1)})
- Pt.RotSpeed = NumberRange.new(-30,30)
- Pt.Rotation = NumberRange.new(-180,180)
- for _,v in pairs(owner.Character:GetChildren()) do
- if v:IsA("Part") then
- local Pta = Instance.new('ParticleEmitter', v)
- Pta.Rate = 0
- Pta.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,1), NumberSequenceKeypoint.new(1,1)})
- Pta.Drag = 0
- Pta.Name = "Darkkk"
- Pta.ZOffset = -1
- Pta.SpreadAngle = Vector2.new(10,10)
- Pta.Color = ColorSequence.new(Color3.new(0,0,0), Color3.new(0.3,0,0))
- Pta.Acceleration = Vector3.new(0,0,0)
- Pta.Texture = "rbxasset://textures/particles/explosion01_implosion_main.dds"
- Pta.LightEmission = 0
- Pta.Speed = NumberRange.new(0,0)
- Pta.LockedToPart = true
- Pta.Lifetime = NumberRange.new(1,2)
- Pta.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1), NumberSequenceKeypoint.new(0.2,0), NumberSequenceKeypoint.new(0.8,0), NumberSequenceKeypoint.new(1,1)})
- Pta.RotSpeed = NumberRange.new(-180,180)
- Pta.Rotation = NumberRange.new(-180,180)
- end
- end
- local Ptaa = Instance.new('ParticleEmitter', RightLeg)
- Ptaa.Rate = 0
- Ptaa.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,3), NumberSequenceKeypoint.new(1,3)})
- Ptaa.Drag = 1
- Ptaa.Name = "Darkkk"
- Ptaa.ZOffset = -1
- Ptaa.EmissionDirection = "Front"
- Ptaa.SpreadAngle = Vector2.new(0,360)
- Ptaa.Color = ColorSequence.new(Color3.new(0,0,0), Color3.new(0.3,0,0))
- Ptaa.Acceleration = Vector3.new(0,0,0)
- Ptaa.Texture = "rbxasset://textures/particles/explosion01_implosion_main.dds"
- Ptaa.LightEmission = 0
- Ptaa.Speed = NumberRange.new(30,40)
- Ptaa.LockedToPart = false
- Ptaa.Lifetime = NumberRange.new(0.5,3)
- Ptaa.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1), NumberSequenceKeypoint.new(0.2,0), NumberSequenceKeypoint.new(0.8,0), NumberSequenceKeypoint.new(1,1)})
- Ptaa.RotSpeed = NumberRange.new(-180,180)
- Ptaa.Rotation = NumberRange.new(-180,180)
- local Ptaa1 = Instance.new('ParticleEmitter', LeftLeg)
- Ptaa1.Rate = 0
- Ptaa1.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,5), NumberSequenceKeypoint.new(1,5)})
- Ptaa1.Drag = 1
- Ptaa1.Name = "Darkkk"
- Ptaa1.ZOffset = -1
- Ptaa1.EmissionDirection = "Front"
- Ptaa1.SpreadAngle = Vector2.new(0,360)
- Ptaa1.Color = ColorSequence.new(Color3.new(0,0,0), Color3.new(0.3,0,0))
- Ptaa1.Acceleration = Vector3.new(0,0,0)
- Ptaa1.Texture = "rbxasset://textures/particles/explosion01_implosion_main.dds"
- Ptaa1.LightEmission = 0
- Ptaa1.Speed = NumberRange.new(30,40)
- Ptaa1.LockedToPart = false
- Ptaa1.Lifetime = NumberRange.new(0.5,3)
- Ptaa1.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1), NumberSequenceKeypoint.new(0.2,0), NumberSequenceKeypoint.new(0.8,0), NumberSequenceKeypoint.new(1,1)})
- Ptaa1.RotSpeed = NumberRange.new(-180,180)
- Ptaa1.Rotation = NumberRange.new(-180,180)
- local Pt2 = Instance.new('ParticleEmitter', Character.HumanoidRootPart)
- Pt2.Rate = 0
- Pt2.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,5), NumberSequenceKeypoint.new(1,5)})
- Pt2.Drag = 3
- Pt2.Name = "Effect"
- Pt2.SpreadAngle = Vector2.new(360,360)
- Pt2.Color = ColorSequence.new(color)
- Pt2.Acceleration = Vector3.new(0,0,0)
- Pt2.Texture = "rbxasset://textures/particles/explosion01_implosion_main.dds"
- Pt2.LightEmission = 1
- Pt2.Speed = NumberRange.new(69,100)
- Pt2.LockedToPart = false
- Pt2.Lifetime = NumberRange.new(2,3)
- Pt2.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0), NumberSequenceKeypoint.new(0.7,0), NumberSequenceKeypoint.new(1,1)})
- Pt2.RotSpeed = NumberRange.new(-30,30)
- fallgently = Instance.new("BodyVelocity")
- fallgently.MaxForce = Vector3.new(0,math.huge,0)
- fallgently.Velocity = Vector3.new(0,-7.5,0)
- local muter = false
- local ORGID = 905506530
- local ORVOL = 4
- local ORPIT = 1
- local kan = Instance.new("Sound",plr.Character.Head)
- kan.Volume = 4
- kan.TimePosition = 0
- kan.PlaybackSpeed = 1
- kan.Pitch = 1
- kan.SoundId = "rbxassetid://905506530"
- kan.Name = "I c u looking at those sounds, pervert"
- kan.Looped = true
- kan:Play()
- plr.Chatted:connect(function(message)
- if message:sub(1,3) == "id/" then
- ORGID = message:sub(4)
- kan.TimePosition = 0
- kan:Play()
- elseif message:sub(1,6) == "pitch/" then
- ORPIT = message:sub(7)
- elseif message:sub(1,4) == "vol/" then
- ORVOL = message:sub(5)
- elseif message:sub(1,7) == "skipto/" then
- kan.TimePosition = message:sub(8)
- end
- end)
- function lerp(object, newCFrame, alpha)
- return object:lerp(newCFrame, alpha)
- end
- function clerp(a,b,t)
- local qa = {QuaternionFromCFrame(a)}
- local qb = {QuaternionFromCFrame(b)}
- local ax, ay, az = a.x, a.y, a.z
- local bx, by, bz = b.x, b.y, b.z
- local _t = 1-t
- return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
- end
- function QuaternionFromCFrame(cf)
- local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
- local trace = m00 + m11 + m22
- if trace > 0 then
- local s = math.sqrt(1 + trace)
- local recip = 0.5/s
- return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
- else
- local i = 0
- if m11 > m00 then
- i = 1
- end
- if m22 > (i == 0 and m00 or m11) then
- i = 2
- end
- if i == 0 then
- local s = math.sqrt(m00-m11-m22+1)
- local recip = 0.5/s
- return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
- elseif i == 1 then
- local s = math.sqrt(m11-m22-m00+1)
- local recip = 0.5/s
- return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
- elseif i == 2 then
- local s = math.sqrt(m22-m00-m11+1)
- local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
- end
- end
- end
- function QuaternionToCFrame(px, py, pz, x, y, z, w)
- local xs, ys, zs = x + x, y + y, z + z
- local wx, wy, wz = w*xs, w*ys, w*zs
- local xx = x*xs
- local xy = x*ys
- local xz = x*zs
- local yy = y*ys
- local yz = y*zs
- local zz = z*zs
- return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
- end
- function QuaternionSlerp(a, b, t)
- local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
- local startInterp, finishInterp;
- if cosTheta >= 0.0001 then
- if (1 - cosTheta) > 0.0001 then
- local theta = math.acos(cosTheta)
- local invSinTheta = 1/math.sin(theta)
- startInterp = math.sin((1-t)*theta)*invSinTheta
- finishInterp = math.sin(t*theta)*invSinTheta
- else
- startInterp = 1-t
- finishInterp = t
- end
- else
- if (1+cosTheta) > 0.0001 then
- local theta = math.acos(-cosTheta)
- local invSinTheta = 1/math.sin(theta)
- startInterp = math.sin((t-1)*theta)*invSinTheta
- finishInterp = math.sin(t*theta)*invSinTheta
- else
- startInterp = t-1
- finishInterp = t
- end
- end
- return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
- end
- local function CFrameFromTopBack(at, top, back)
- local right = top:Cross(back)
- return CFrame.new(at.x, at.y, at.z,
- right.x, top.x, back.x,
- right.y, top.y, back.y,
- right.z, top.z, back.z)
- end
- local bodvel=Instance.new("BodyVelocity")
- local bg=Instance.new("BodyGyro")
- function swait(num)
- if num==0 or num==nil then
- game:service'RunService'.Stepped:wait(0)
- else
- for i=0,num do
- game:service'RunService'.Stepped:wait(0)
- end
- end
- end
- function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
- return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
- end
- attach = Instance.new("Attachment")
- attach.Position = Vector3.new(0,Character["Left Leg"].Size.Y/2,0)
- attach.Parent = Character["Left Leg"]
- attach2 = Instance.new("Attachment")
- attach2.Position = Vector3.new(0,-Character["Left Leg"].Size.Y/2,0)
- attach2.Parent = Character["Left Leg"]
- trail = Instance.new("Trail")
- trail.LightEmission = 1
- trail.Color = ColorSequence.new(color)
- trail.Transparency = NumberSequence.new({
- NumberSequenceKeypoint.new(0,0),
- NumberSequenceKeypoint.new(0.5,0),
- NumberSequenceKeypoint.new(1,1)
- })
- trail.Lifetime = 0.5
- trail.Parent = Character["Left Leg"]
- trail.Attachment0 = attach
- trail.Attachment1 = attach2
- aattach = Instance.new("Attachment")
- aattach.Position = Vector3.new(0,Character["Right Leg"].Size.Y/2,0)
- aattach.Parent = Character["Right Leg"]
- aattach2 = Instance.new("Attachment")
- aattach2.Position = Vector3.new(0,-Character["Right Leg"].Size.Y/2,0)
- aattach2.Parent = Character["Right Leg"]
- atrail = Instance.new("Trail")
- atrail.LightEmission = 1
- atrail.Color = ColorSequence.new(color)
- atrail.Transparency = NumberSequence.new({
- NumberSequenceKeypoint.new(0,0),
- NumberSequenceKeypoint.new(0.5,0),
- NumberSequenceKeypoint.new(1,1)
- })
- atrail.Lifetime = 0.5
- atrail.Parent = Character["Right Leg"]
- atrail.Attachment0 = aattach
- atrail.Attachment1 = aattach2
- Character.Humanoid.Animator.Parent = nil
- atttack = false
- function pulse(charge)
- bv = Instance.new("BodyVelocity")
- bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- bv.Velocity = owner.Character.Torso.CFrame.lookVector * (500+ charge) + Vector3.new(0,200,0)
- bv.Parent = Character.HumanoidRootPart
- Pt2:Emit(math.random(200,300))
- wait(.1)
- bv.Parent = nil
- atttack = false
- end
- local transfor = false
- function blight()
- ORGID = 2102705685
- kan.TimePosition = 0
- owner.Character.Torso.Anchored = true
- ball = Instance.new("Part")
- ballme = Instance.new("SpecialMesh")
- ballme.MeshType = "Sphere"
- ballme.Parent = ball
- ball.Anchored = true
- ball.Material = "Neon"
- ball.Size = Vector3.new(.1,.1,.1)
- ball.CanCollide = false
- ball.Transparency = 1
- ball.Color = Color3.new(1,1,0.7)
- ball.CFrame = owner.Character.Torso.CFrame
- ball.Parent = script
- local TweenService = game:GetService("TweenService")
- local goal = {}
- goal.Size = Vector3.new(1000, 1000, 1000)
- goal.Color = Color3.new(0, 0, 0)
- goal.Transparency = 1
- goal.CFrame = (ball.CFrame*CFrame.Angles(0,-200,0))
- local tweenInfo = TweenInfo.new(
- 2, -- Time
- Enum.EasingStyle.Quint, -- EasingStyle
- Enum.EasingDirection.InOut, -- EasingDirection
- 0, -- RepeatCount (when less than zero the tween will loop indefinitely)
- false, -- Reverses (tween will reverse once reaching it's goal)
- 0 -- DelayTime
- )
- local tween = TweenService:Create(ball, tweenInfo, goal)
- local goal2 = {}
- goal2.Size = Vector3.new(10, 10, 10)
- goal2.Color = Color3.new(1, 0, 0)
- goal2.Transparency = 0.1
- goal2.CFrame = (ball.CFrame*CFrame.Angles(0,100,0))
- local tweenInfo2 = TweenInfo.new(
- 17.9, -- Time
- Enum.EasingStyle.Quint, -- EasingStyle
- Enum.EasingDirection.InOut, -- EasingDirection
- 0, -- RepeatCount (when less than zero the tween will loop indefinitely)
- false, -- Reverses (tween will reverse once reaching it's goal)
- 0 -- DelayTime
- )
- local tween2 = TweenService:Create(ball, tweenInfo2, goal2)
- attack = true
- transfor = true
- tween2:Play()
- wait(17.9)
- owner.Character.Torso.Anchored = false
- tween:Play()
- for _,v in pairs(owner.Character:GetChildren()) do
- if v:FindFirstChild("Darkkk") then
- v.Darkkk.Rate = 100
- end
- end
- Ptaa.Rate = 250
- Ptaa1.Rate = 500
- color = Color3.new(0.2,0,0)
- trail.LightEmission = 0
- atrail.LightEmission = 0
- Pt.LightEmission = 0
- Pt2.LightEmission = 0
- dark = true
- attack = false
- transfor = false
- end
- Character.Humanoid.WalkSpeed = 20
- runni = false
- Mouse.KeyDown:Connect(function(key)
- if transfor == true then return end
- if key == "z" then
- if atttack == false then
- hold = true
- atttack = true
- charg = 0
- repeat
- if not dark then
- charg = charg + 1
- else
- charg = charg + 10
- end
- inf.Text = "Pulse power: "..charg
- swait(.5)
- until hold == false or charg >= 400
- inf.Text = ""
- pulse(charg)
- end
- elseif key == "p" then
- blight()
- elseif key == "q" and runni == false then
- runni = true
- if not dark then
- Character.Humanoid.WalkSpeed = 100
- Character.Humanoid.JumpPower = 200
- else
- Character.Humanoid.WalkSpeed = 500
- Character.Humanoid.JumpPower = 700
- end
- atrail.Lifetime = 0.5
- trail.Lifetime = 0.5
- elseif key == "q" and runni == true then
- runni = false
- if not dark then
- Character.Humanoid.WalkSpeed = 20
- Character.Humanoid.JumpPower = 50
- else
- Character.Humanoid.WalkSpeed = 200
- Character.Humanoid.JumpPower = 300
- end
- atrail.Lifetime = .5
- trail.Lifetime = .5
- elseif key == "x" then
- hold = true
- while hold == true do
- Character.Humanoid.WalkSpeed = Character.Humanoid.WalkSpeed + 10
- atrail.Lifetime = atrail.Lifetime + 0.1
- trail.Lifetime = trail.Lifetime + 0.1
- wait()
- end
- elseif key == "c" then
- hold = true
- while hold == true do
- fallgently.Parent = Character.HumanoidRootPart
- Pt.Rate = 300
- wait()
- end
- fallgently.Parent = nil
- Pt.Rate = 0
- end
- end)
- Mouse.KeyUp:Connect(function()
- hold = false
- end)
- idleanim=.4
- while true do
- swait()
- if muter == false then
- kan.Volume = ORVOL
- else
- kan.Volume = 0
- end
- atrail.Color = ColorSequence.new(color)
- trail.Color = ColorSequence.new(color)
- Pt.Color = ColorSequence.new(color)
- Pt2.Color = ColorSequence.new(color)
- kan.PlaybackSpeed = ORPIT
- kan.Pitch = ORPIT
- kan.SoundId = "rbxassetid://" ..ORGID
- kan.Looped = true
- kan.Parent = plr.Character.Head
- kan:Resume()
- sine = sine + change
- local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
- local velderp=RootPart.Velocity.y
- hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
- if equipped==true or equipped==false then
- if attack==false then
- idle=idle+1
- else
- idle=0
- end
- if idle>=500 then
- --stuff
- end
- if RootPart.Velocity.y > 1 and hitfloor==nil then
- Anim="Jump"
- if attack==false then
- RH.C0=clerp(RH.C0,cf(1,-0.35 - 0.05 * math.cos(sine / 25),-0.75)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),.1)
- LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(20)),.1)
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 25))*angles(math.rad(-tors.Velocity.Y/6),math.rad(0),math.rad(0)),.1)
- Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.1)
- RW.C0=clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(-5),math.rad(0),math.rad(25)),.1)
- LW.C0=clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(-5),math.rad(0),math.rad(-25)),.1)
- end
- elseif RootPart.Velocity.y < -1 and hitfloor==nil then
- Anim="Fall"
- if attack==false then
- RH.C0=clerp(RH.C0,cf(1,-0.35 - 0.05 * math.cos(sine / 25),-0.75)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),.1)
- LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(20)),.1)
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 25))*angles(math.rad(-tors.Velocity.Y/6),math.rad(0),math.rad(0)),.1)
- Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(2.5),math.rad(0),math.rad(0)),.1)
- RW.C0=clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(-15),math.rad(0),math.rad(55)),.1)
- LW.C0=clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(-15),math.rad(0),math.rad(-55)),.1)
- end
- elseif torvel<1 and hitfloor~=nil then
- Anim="Idle"
- if attack==false then
- if equipped == false then
- RH.C0=clerp(RH.C0,cf(1,-1 + 0.05 * math.cos(sine / 20) - 0.02 * math.cos(sine / 40),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-3 + 2 * math.cos(sine / 40)),math.rad(-15),math.rad(0 + 2 * math.cos(sine / 20))),.1)
- LH.C0=clerp(LH.C0,cf(-1,-1 + 0.05 * math.cos(sine / 20) - 0.02 * math.cos(sine / 40),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-3 - 2 * math.cos(sine / 40)),math.rad(1),math.rad(0 - 2 * math.cos(sine / 20))),.1)
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0 + 0.02 * math.cos(sine / 40),0 - 0.02 * math.cos(sine / 40),-0.05 - 0.05 * math.cos(sine / 20))*angles(math.rad(0 + 2 * math.cos(sine / 20)),math.rad(0 + 2 * math.cos(sine / 40)),math.rad(30 + 3 * math.cos(sine / 40))),.1)
- Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(2),math.rad(0 - 7 * math.cos(sine / 40)),math.rad(-30 - 3 * math.cos(sine / 40))),.1)
- RW.C0=clerp(RW.C0,cf(1.45,0.5 + 0.05 * math.cos(sine / 28),0.1)*angles(math.rad(6 + 5 * math.cos(sine / 26)),math.rad(-10 - 6 * math.cos(sine / 24)),math.rad(13 - 5 * math.cos(sine / 34))),.1)
- LW.C0=clerp(LW.C0,cf(-1.4,0.5 + 0.05 * math.cos(sine / 28),0.1)*angles(math.rad(13 - 1 * math.cos(sine / 25)),math.rad(10 + 2 * math.cos(sine / 24)),math.rad(10 + 2 * math.cos(sine / 34))),.1)
- else
- RH.C0=clerp(RH.C0,cf(1,-1 + 0.05 * math.cos(sine / 20) - 0.02 * math.cos(sine / 40),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-3 + 2 * math.cos(sine / 40)),math.rad(0 - 6 * math.cos(sine / 40)),math.rad(-6 + 2 * math.cos(sine / 20) - 6 * math.cos(sine / 40))),.1)
- LH.C0=clerp(LH.C0,cf(-1,-1 + 0.05 * math.cos(sine / 20) - 0.02 * math.cos(sine / 40),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-3 - 2 * math.cos(sine / 40)),math.rad(10 - 6 * math.cos(sine / 40)),math.rad(3 - 2 * math.cos(sine / 20) - 3 * math.cos(sine / 40))),.1)
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0 + 0.02 * math.cos(sine / 40),0 - 0.06 * math.cos(sine / 40),-0.05 - 0.05 * math.cos(sine / 20))*angles(math.rad(0 + 2 * math.cos(sine / 20)),math.rad(0 + 2 * math.cos(sine / 40)),math.rad(-20 + 6 * math.cos(sine / 40))),.1)
- Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(6),math.rad(0 - 2 * math.cos(sine / 42)),math.rad(20 - 6 * math.cos(sine / 40))),.1)
- RW.C0=clerp(RW.C0,cf(1.45,0.5 + 0.05 * math.cos(sine / 28),0.1)*angles(math.rad(13 + 3 * math.cos(sine / 26)),math.rad(-20 - 3 * math.cos(sine / 24)),math.rad(-20 - 5 * math.cos(sine / 34))),.1)
- LW.C0=clerp(LW.C0,cf(-1.45,0.5 + 0.05 * math.cos(sine / 28),0.1)*angles(math.rad(13 - 3 * math.cos(sine / 25)),math.rad(10 + 3 * math.cos(sine / 24)),math.rad(10 + 5 * math.cos(sine / 34))),.1)
- end
- end
- elseif torvel>2 and torvel<42 and hitfloor~=nil then
- Anim="Walk"
- if attack==false then
- if equipped == false then
- RH.C0=clerp(RH.C0,cf(1,-1 + 0.05 * math.cos(sine / 4),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0 + 5 * math.cos(sine / 8)),math.rad(0 + 45 * math.cos(sine / 8))),.1)
- LH.C0=clerp(LH.C0,cf(-1,-1 + 0.05 * math.cos(sine / 4),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0 + 5 * math.cos(sine / 8)),math.rad(0 + 45 * math.cos(sine / 8))),.1)
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,-0.05,-0.05 + 0.05 * math.cos(sine / 4))*angles(math.rad(5 + 3 * math.cos(sine / 4)),math.rad(0 + root.RotVelocity.Y/1.5),math.rad(0 - root.RotVelocity.Y - 10 * math.cos(sine / 8))),.1)
- Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-5 - 5 * math.cos(sine / 4)),math.rad(0 + root.RotVelocity.Y/1.5),math.rad(0 - hed.RotVelocity.Y*1.5 + 10 * math.cos(sine / 8))),.1)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0 + 0.25 * math.cos(sine / 8))*angles(math.rad(0 - 50 * math.cos(sine / 8)),math.rad(0),math.rad(5 - 10 * math.cos(sine / 4))),.1)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0 - 0.25 * math.cos(sine / 8))*angles(math.rad(0 + 50 * math.cos(sine / 8)),math.rad(0),math.rad(-5 + 10 * math.cos(sine / 4))),.1)
- else
- RH.C0=clerp(RH.C0,cf(1,-1 + 0.05 * math.cos(sine / 4),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0 + 5 * math.cos(sine / 8)),math.rad(0 + 60 * math.cos(sine / 8))),.1)
- LH.C0=clerp(LH.C0,cf(-1,-1 + 0.05 * math.cos(sine / 4),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0 + 5 * math.cos(sine / 8)),math.rad(0 + 60 * math.cos(sine / 8))),.1)
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,-0.05,0 + 0.15 * math.cos(sine / 4))*angles(math.rad(10 - 3 * math.cos(sine / 4)),math.rad(0 + root.RotVelocity.Y/1.5),math.rad(-10 - root.RotVelocity.Y - 5 * math.cos(sine / 8))),.1)
- Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(5 + 3 * math.cos(sine / 4)),math.rad(0 + root.RotVelocity.Y/1.5 + 3 * math.cos(sine / 57)),math.rad(10 - hed.RotVelocity.Y*1.5 + 5 * math.cos(sine / 8))),.1)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0 + 0.25 * math.cos(sine / 8))*angles(math.rad(-10),math.rad(0),math.rad(15 - 2 * math.cos(sine / 34))),.1)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0 - 0.25 * math.cos(sine / 8))*angles(math.rad(0 + 50 * math.cos(sine / 8)),math.rad(0),math.rad(-5 + 10 * math.cos(sine / 4))),.1)
- end
- end
- elseif torvel>=42 and hitfloor~=nil then
- Anim="Run"
- if attack==false then
- RH.C0=clerp(RH.C0,cf(1,-1 - 0.15 * math.cos(sine / 3),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 85 * math.cos(sine / 6))),.1 + (math.clamp((Character.Humanoid.WalkSpeed/200), 0.1, 0.5)))
- LH.C0=clerp(LH.C0,cf(-1,-1 - 0.5 * math.cos(sine / 3),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 85 * math.cos(sine / 6))),.1 + (math.clamp((Character.Humanoid.WalkSpeed/200), 0.1, 0.5)))
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,-0.3,-0.05 + 0.15 * math.cos(sine / 3))*angles(math.rad(15 - 4 * math.cos(sine / 3)),math.rad(0 + root.RotVelocity.Y*1.5),math.rad(0 - root.RotVelocity.Y - 10 * math.cos(sine / 6))),.1 + (math.clamp((Character.Humanoid.WalkSpeed/200), 0.1, 0.5)))
- Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-2.5 + 4 * math.cos(sine / 3)),math.rad(0 + root.RotVelocity.Y*1.5),math.rad(0 - hed.RotVelocity.Y*1.5 + 10 * math.cos(sine / 6))),.1 + (math.clamp((Character.Humanoid.WalkSpeed/200), 0.1, 0.25)))
- RW.C0=clerp(RW.C0,cf(1.5,.5,0 + 0.5 * math.cos(sine / 6))*angles(math.rad(0 - 100 * math.cos(sine / 6)),math.rad(0),math.rad(5 - 20 * math.cos(sine / 3))),.1 + (math.clamp((Character.Humanoid.WalkSpeed/200), 0.1, 0.5)))
- LW.C0=clerp(LW.C0,cf(-1.5,.5,0 - 0.5 * math.cos(sine / 6))*angles(math.rad(0 + 100 * math.cos(sine / 6)),math.rad(0),math.rad(-5 + 20 * math.cos(sine / 3))),.1 + (math.clamp((Character.Humanoid.WalkSpeed/200), 0.1, 0.5)))
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment