Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --//====================================================\\--
- --|| teest
- --\\====================================================//--
- local CHARACTER = owner.Character
- local PLAYER = game:GetService('Players'):GetPlayerFromCharacter(CHARACTER)
- local HUM = CHARACTER.Humanoid
- local ROOT = HUM.Torso
- local HEAD = CHARACTER.Head
- local TORSO = CHARACTER.Torso
- local RIGHTARM = CHARACTER["Right Arm"]
- local LEFTARM = CHARACTER["Left Arm"]
- local RIGHTLEG = CHARACTER["Right Leg"]
- local LEFTLEG = CHARACTER["Left Leg"]
- local ROOTJOINT = ROOT["RootJoint"]
- local NECK = TORSO["Neck"]
- local RIGHTSHOULDER = TORSO["Right Shoulder"]
- local LEFTSHOULDER = TORSO["Left Shoulder"]
- local RIGHTHIP = TORSO["Right Hip"]
- local LEFTHIP = TORSO["Left Hip"]
- local MOUSEPOS = ROOT.Position
- ------------
- IT = Instance.new
- CF = CFrame.new
- VT = Vector3.new
- RAD = math.rad
- C3 = Color3.new
- UD2 = UDim2.new
- BRICKC = BrickColor.new
- ANGLES = CFrame.Angles
- EULER = CFrame.fromEulerAnglesXYZ
- COS = math.cos
- ACOS = math.acos
- SIN = math.sin
- ASIN = math.asin
- ABS = math.abs
- MRANDOM = math.random
- FLOOR = math.floor
- ------------
- if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
- do
- script.Parent = owner.Character
- local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
- local function NewFakeEvent()
- local Bind = Instance.new("BindableEvent")
- local Fake;Fake = {Connections = {},
- fakeEvent=true;
- Connect=function(self,Func)
- Bind.Event:connect(Func)
- self.Connections[Bind] = true
- return setmetatable({Connected = true},{
- __index = function (self,Index)
- if Index:lower() == "disconnect" then
- return function() Fake.Connections[Bind] = false;self.Connected = false end
- end
- return Fake[Index]
- end;
- __tostring = function() return "Connection" end;
- })
- end}
- Fake.connect = Fake.Connect;return Fake;
- end
- local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
- local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
- local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
- self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
- end};ContextActionService.UnBindAction = ContextActionService.BindAction
- local function TriggerEvent(self,Event,...)
- local Trigger = Mouse[Event]
- if Trigger and Trigger.fakeEvent and Trigger.Connections then
- for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
- end
- end
- Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
- Event.OnServerEvent:Connect(function(FiredBy,Input)
- if FiredBy.Name ~= owner.Name then return end
- if Input.MouseEvent then
- Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
- else
- local Begin = Input.UserInputState == Enum.UserInputState.Begin
- if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
- for _,Action in pairs(ContextActionService.Actions) do
- for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
- end
- Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
- UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
- end
- end)
- InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
- Event.Parent = NLS([[
- local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
- local Input = function(Input,gameProcessedEvent)
- if gameProcessedEvent then return end
- Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
- end
- UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
- local Hit,Target
- while wait(1/30) do
- if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
- Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
- end
- end
- ]],owner.Character)
- end
- RealGame = game;game = setmetatable({},{
- __index = function (self,Index)
- local Sandbox = function (Thing)
- if Thing:IsA("Player") then
- local RealPlayer = Thing
- return setmetatable({},{
- __index = function (self,Index)
- local Type = type(RealPlayer[Index])
- if Type == "function" then
- if Index:lower() == "getmouse" or Index:lower() == "mouse" then
- return function (self)return InternalData["Mouse"] end
- end
- return function (self,...)return RealPlayer[Index](RealPlayer,...) end
- end
- return RealPlayer[Index]
- end;
- __tostring = function(self) return RealPlayer.Name end
- })
- end
- end
- if RealGame[Index] then
- local Type = type(RealGame[Index])
- if Type == "function" then
- if Index:lower() == "getservice" or Index:lower() == "service" then
- return function (self,Service)
- local FakeServices = {
- ["players"] = function()
- return setmetatable({},{
- __index = function (self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...) return RealService[Index2](RealService,...)end
- else
- if Index2:lower() == "localplayer" then return Sandbox(owner) end
- return RealService[Index2]
- end
- end;
- __tostring = function(self) return RealGame:GetService(Service).Name end
- })
- end;
- ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
- ["userinputservice"] = function() return InternalData["UserInputService"] end;
- ["runservice"] = function()
- return setmetatable({},{
- __index = function(self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...) return RealService[Index2](RealService,...) end
- else
- local RunServices = {
- ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
- ["renderstepped"] = function() return RealService["Stepped"] end
- }
- if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
- return RealService[Index2]
- end
- end
- })
- end
- }
- if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
- return RealGame:GetService(Service)
- end
- end
- return function (self,...) return RealGame[Index](RealGame,...) end
- else
- if game:GetService(Index) then return game:GetService(Index) end
- return RealGame[Index]
- end
- end
- return nil
- end
- });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
- ------------
- local ANIM = "Idle"
- local ANIM_SPEED = 3
- local FRAME_SPEED = 1 / 60 -- (1 / 30) OR (1 / 60)
- local CHANGE = 2 / ANIM_SPEED
- local DAMAGEMULTIPLIER = 1
- local KEYHOLD = false
- local MOUSEHOLD = false
- local SINE = 0
- local ATTACKING = false
- local Debris = game:GetService("Debris")
- local Effects = IT("Folder",CHARACTER)
- Effects.Name = "FXFolder"
- local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
- local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
- local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
- local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
- if HUM:FindFirstChild("Animator") then
- HUM:FindFirstChild("Animator"):Destroy()
- end
- ------------
- function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
- local NEWPART = IT("Part")
- NEWPART.formFactor = FORMFACTOR
- NEWPART.Reflectance = REFLECTANCE
- NEWPART.Transparency = TRANSPARENCY
- NEWPART.CanCollide = false
- NEWPART.Locked = true
- NEWPART.Anchored = true
- if ANCHOR == false then
- NEWPART.Anchored = false
- end
- NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
- NEWPART.Name = NAME
- NEWPART.Size = SIZE
- NEWPART.Position = ROOT.Position
- NEWPART.Material = MATERIAL
- NEWPART:BreakJoints()
- NEWPART.Parent = PARENT
- return NEWPART
- end
- function WeldParts(A,B)
- local WLD = IT("ManualWeld")
- WLD.Part0 = A
- WLD.Part1 = B
- WLD.C1 = B.CFrame:inverse() * A.CFrame
- WLD.Parent = A
- return WLD
- end
- ----------------
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "ArtificialHB"
- script:WaitForChild("ArtificialHB")
- frame = FRAME_SPEED
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.ArtificialHB:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- ArtificialHB:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- ArtificialHB:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
- return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
- 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 = ACOS(cosTheta)
- local invSinTheta = 1 / SIN(theta)
- startInterp = SIN((1 - t) * theta) * invSinTheta
- finishInterp = SIN(t * theta) * invSinTheta
- else
- startInterp = 1 - t
- finishInterp = t
- end
- else
- if (1 + cosTheta) > 0.0001 then
- local theta = ACOS(-cosTheta)
- local invSinTheta = 1 / SIN(theta)
- startInterp = SIN((t - 1) * theta) * invSinTheta
- finishInterp = 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
- 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 Swait(NUMBER)
- if NUMBER == 0 or NUMBER == nil then
- ArtificialHB.Event:wait()
- else
- for i = 1, NUMBER do
- ArtificialHB.Event:wait()
- end
- end
- end
- ATTACKING = false
- HUM.WalkSpeed = 16
- function NewSound(TABLE)
- local ID = "rbxassetid://"..(TABLE.ID or 0)
- local PARENT = (TABLE.PARENT or ROOT)
- local VOLUME = (TABLE.VOLUME or 0.5)
- local PITCH = (TABLE.PITCH or 1)
- local LOOP = (TABLE.LOOP or false)
- local MAXDISTANCE = (TABLE.MAXDISTANCE or 100)
- local EMITTERSIZE = (TABLE.EMITTERSIZE or 10)
- local PLAYING = (TABLE.PLAYING or true)
- local PLAYONREMOVE = (TABLE.PLAYONREMOVE or false)
- local DOESDEBRIS = (TABLE.DOESDEBRIS or true)
- if ID ~= "rbxassetid://0" then
- local SOUND = IT("Sound",PARENT)
- SOUND.SoundId = ID
- SOUND.Volume = VOLUME
- SOUND.Pitch = PITCH
- SOUND.Looped = LOOP
- SOUND.MaxDistance = MAXDISTANCE
- SOUND.EmitterSize = EMITTERSIZE
- SOUND.PlayOnRemove = PLAYONREMOVE
- if DOESDEBRIS == true and PLAYING == true and LOOP == false then
- Debris:AddItem(SOUND,SOUND.TimeLength+5)
- end
- if PLAYING == true then
- SOUND:Play()
- end
- return SOUND
- end
- end
- ---------------
- function WHATSTHIS()
- ATTACKING = true
- NewSound({ID = 2820730608,PARENT = ROOT,VOLUME = 10,PITCH = 1,LOOP = false,MAXDISTANCE = 125,EMITTERSIZE = 100,PLAYING = false,PLAYONREMOVE = false,DOESDEBRIS = false})
- for i=0, 1.6, 0.1 / ANIM_SPEED do
- Swait()
- ROOTJOINT.C0 = Clerp(ROOTJOINT.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1.5 / ANIM_SPEED)
- NECK.C0 = Clerp(NECK.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1.5 / ANIM_SPEED)
- RIGHTSHOULDER.C0 = Clerp(RIGHTSHOULDER.C0, CF(1.5, 0, 0) * ANGLES(RAD(180), RAD(0), RAD(-10)) * RIGHTSHOULDERC0, 1.5 / ANIM_SPEED)
- LEFTSHOULDER.C0 = Clerp(LEFTSHOULDER.C0, CF(-1.5, 0, 0) * ANGLES(RAD(180), RAD(0), RAD(10)) * LEFTSHOULDERC0, 1.5 / ANIM_SPEED)
- RIGHTHIP.C0 = Clerp(RIGHTHIP.C0, CF(1, -1 - 0.05 * COS(SINE / 24), -0.01) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(1), RAD(0), RAD(0)), 0.5 / ANIM_SPEED)
- LEFTHIP.C0 = Clerp(LEFTHIP.C0, CF(-1, -1 - 0.05 * COS(SINE / 24), -0.01) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(1), RAD(0), RAD(0)), 0.5 / ANIM_SPEED)
- end
- for i=0, 1.2, 0.1 / ANIM_SPEED do
- Swait()
- ROOTJOINT.C0 = Clerp(ROOTJOINT.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1.5 / ANIM_SPEED)
- NECK.C0 = Clerp(NECK.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1.5 / ANIM_SPEED)
- RIGHTSHOULDER.C0 = Clerp(RIGHTSHOULDER.C0, CF(1.5, 0, 0) * ANGLES(RAD(120), RAD(0), RAD(-10)) * RIGHTSHOULDERC0, 1.5 / ANIM_SPEED)
- LEFTSHOULDER.C0 = Clerp(LEFTSHOULDER.C0, CF(-1.5, 0, 0) * ANGLES(RAD(120), RAD(0), RAD(10)) * LEFTSHOULDERC0, 1.5 / ANIM_SPEED)
- RIGHTHIP.C0 = Clerp(RIGHTHIP.C0, CF(1, -1 - 0.05 * COS(SINE / 24), -0.01) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(1), RAD(0), RAD(0)), 0.5 / ANIM_SPEED)
- LEFTHIP.C0 = Clerp(LEFTHIP.C0, CF(-1, -1 - 0.05 * COS(SINE / 24), -0.01) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(1), RAD(0), RAD(0)), 0.5 / ANIM_SPEED)
- end
- for i=0, 1.2, 0.1 / ANIM_SPEED do
- Swait()
- ROOTJOINT.C0 = Clerp(ROOTJOINT.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1.5 / ANIM_SPEED)
- NECK.C0 = Clerp(NECK.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1.5 / ANIM_SPEED)
- RIGHTSHOULDER.C0 = Clerp(RIGHTSHOULDER.C0, CF(1.5, 0, 0) * ANGLES(RAD(90), RAD(0), RAD(-10)) * RIGHTSHOULDERC0, 1.5 / ANIM_SPEED)
- LEFTSHOULDER.C0 = Clerp(LEFTSHOULDER.C0, CF(-1.5, 0, 0) * ANGLES(RAD(90), RAD(0), RAD(10)) * LEFTSHOULDERC0, 1.5 / ANIM_SPEED)
- RIGHTHIP.C0 = Clerp(RIGHTHIP.C0, CF(1, -1 - 0.05 * COS(SINE / 24), -0.01) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(1), RAD(0), RAD(0)), 0.5 / ANIM_SPEED)
- LEFTHIP.C0 = Clerp(LEFTHIP.C0, CF(-1, -1 - 0.05 * COS(SINE / 24), -0.01) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(1), RAD(0), RAD(0)), 0.5 / ANIM_SPEED)
- end
- ATTACKING = false
- end
- ---------------
- local mouse = owner:GetMouse()
- mouse.KeyDown:connect(function(key)
- key=key:lower()
- if key == "e" then
- if ATTACKING == false then
- WHATSTHIS()
- end
- end
- end)
- ---------------
- while true do
- Swait()
- SINE = SINE + CHANGE
- if CHARACTER:FindFirstChild("Animate") then
- CHARACTER:FindFirstChild("Animate"):Destroy()
- end
- if CHARACTER:FindFirstChild("Sound") then
- CHARACTER:FindFirstChild("Sound"):Destroy()
- end
- if CHARACTER:FindFirstChild("Health") then
- CHARACTER:FindFirstChild("Health"):Destroy()
- end
- for _,v in next, HUM:GetPlayingAnimationTracks() do
- v:Stop();
- end
- local TORSOVELOCITY = (ROOT.Velocity * VT(1, 0, 1)).magnitude
- local TORSOVERTICALVELOCITY = ROOT.Velocity.y
- local HITFLOOR = Raycast(ROOT.Position, (CF(ROOT.Position, ROOT.Position + VT(0, -1, 0))).lookVector, 4+HUM.HipHeight, CHARACTER)
- local WALKSPEEDVALUE = 5-(1*(HUM.WalkSpeed/16))
- if WALKSPEEDVALUE <= 1 then
- WALKSPEEDVALUE = 1
- end
- local SITTING = HUM.Sit
- local ADD = HUM.WalkSpeed*2
- if ANIM == "Walk" and TORSOVELOCITY > 1 and ATTACKING == false and SITTING == false then
- ROOTJOINT.C1 = Clerp(ROOTJOINT.C1, ROOTC0 * CF(0, 0, -0.05 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - ROOT.RotVelocity.Y / 35, RAD(0)), 2 * (HUM.WalkSpeed / 16) / ANIM_SPEED)
- NECK.C1 = Clerp(NECK.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - HEAD.RotVelocity.Y / 30), 0.2 * (HUM.WalkSpeed / 16) / ANIM_SPEED)
- RIGHTHIP.C1 = Clerp(RIGHTHIP.C1, CF(0.5, 0.875 - 0.3 * SIN(SINE / WALKSPEEDVALUE), -0.5 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.25 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RIGHTLEG.RotVelocity.Y / 35, RAD(0), RAD((35+ADD) * COS(SINE / WALKSPEEDVALUE))), 0.6 / ANIM_SPEED)
- LEFTHIP.C1 = Clerp(LEFTHIP.C1, CF(-0.5, 0.875 + 0.3 * SIN(SINE / WALKSPEEDVALUE), 0.5 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.25 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LEFTLEG.RotVelocity.Y / 35, RAD(0), RAD((35+ADD) * COS(SINE / WALKSPEEDVALUE))), 0.6 / ANIM_SPEED)
- elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) or ATTACKING == true or SITTING == true then
- ROOTJOINT.C1 = Clerp(ROOTJOINT.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / ANIM_SPEED)
- NECK.C1 = Clerp(NECK.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / ANIM_SPEED)
- RIGHTHIP.C1 = Clerp(RIGHTHIP.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / ANIM_SPEED)
- LEFTHIP.C1 = Clerp(LEFTHIP.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / ANIM_SPEED)
- end
- if SITTING == false then
- if HITFLOOR then
- if TORSOVELOCITY < 1 and HITFLOOR ~= nil then
- ANIM = "Idle"
- if ATTACKING == false then
- ROOTJOINT.C0 = Clerp(ROOTJOINT.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 24)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / ANIM_SPEED)
- NECK.C0 = Clerp(NECK.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(10 - 2.5 * COS(SINE / 24)), RAD(0), RAD(0)), 0.5 / ANIM_SPEED)
- RIGHTSHOULDER.C0 = Clerp(RIGHTSHOULDER.C0, CF(1.5, 0.5, -0.75) * ANGLES(RAD(90), RAD(0), RAD(56)) * RIGHTSHOULDERC0, 0.5 / ANIM_SPEED)
- LEFTSHOULDER.C0 = Clerp(LEFTSHOULDER.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-5), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.5 / ANIM_SPEED)
- RIGHTHIP.C0 = Clerp(RIGHTHIP.C0, CF(1, -1 - 0.05 * COS(SINE / 24), -0.01) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(1), RAD(0), RAD(0)), 0.5 / ANIM_SPEED)
- LEFTHIP.C0 = Clerp(LEFTHIP.C0, CF(-1, -1 - 0.05 * COS(SINE / 24), -0.01) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(1), RAD(0), RAD(0)), 0.5 / ANIM_SPEED)
- end
- elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
- ANIM = "Walk"
- if ATTACKING == false then
- ROOTJOINT.C0 = Clerp(ROOTJOINT.C0,ROOTC0 * CF(0, 0, -0.05) * ANGLES(RAD(HUM.WalkSpeed/2), RAD(0), RAD(15*COS(SINE / WALKSPEEDVALUE))), 0.25 / ANIM_SPEED)
- NECK.C0 = Clerp(NECK.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-HUM.WalkSpeed/2 - 2 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(-15*COS(SINE / WALKSPEEDVALUE))), 0.25 / ANIM_SPEED)
- RIGHTSHOULDER.C0 = Clerp(RIGHTSHOULDER.C0, CF(1.5, 0.5, 0) * ANGLES(RAD((3+(ADD*1.25)) * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-22 * COS(SINE / (WALKSPEEDVALUE/2)))) * RIGHTSHOULDERC0, 0.75 / ANIM_SPEED)
- LEFTSHOULDER.C0 = Clerp(LEFTSHOULDER.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-(3+(ADD*1.25)) * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(22 * COS(SINE / (WALKSPEEDVALUE/2)))) * LEFTSHOULDERC0, 0.75 / ANIM_SPEED)
- RIGHTHIP.C0 = Clerp(RIGHTHIP.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(90-5*COS(SINE / WALKSPEEDVALUE)), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(-15)), 0.25 / ANIM_SPEED)
- LEFTHIP.C0 = Clerp(LEFTHIP.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90-5*COS(SINE / WALKSPEEDVALUE)), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(15)), 0.25 / ANIM_SPEED)
- end
- end
- else
- if TORSOVERTICALVELOCITY > 0 then
- ANIM = "Jump"
- if ATTACKING == false then
- ROOTJOINT.C0 = Clerp(ROOTJOINT.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / ANIM_SPEED)
- NECK.C0 = Clerp(NECK.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / ANIM_SPEED)
- RIGHTSHOULDER.C0 = Clerp(RIGHTSHOULDER.C0, CF(1.5, 0.35, 0) * ANGLES(RAD(-5), RAD(0), RAD(-10)) * RIGHTSHOULDERC0, 0.5 / ANIM_SPEED)
- LEFTSHOULDER.C0 = Clerp(LEFTSHOULDER.C0, CF(-1.5, 0.35, 0) * ANGLES(RAD(-5), RAD(0), RAD(10)) * LEFTSHOULDERC0, 0.5 / ANIM_SPEED)
- RIGHTHIP.C0 = Clerp(RIGHTHIP.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 1 / ANIM_SPEED)
- LEFTHIP.C0 = Clerp(LEFTHIP.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.5 / ANIM_SPEED)
- end
- else
- ANIM = "Fall"
- if ATTACKING == false then
- ROOTJOINT.C0 = Clerp(ROOTJOINT.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / ANIM_SPEED)
- NECK.C0 = Clerp(NECK.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / ANIM_SPEED)
- RIGHTSHOULDER.C0 = Clerp(RIGHTSHOULDER.C0, CF(1.5, 0.55, 0) * ANGLES(RAD(-5), RAD(0), RAD(80)) * RIGHTSHOULDERC0, 0.5 / ANIM_SPEED)
- LEFTSHOULDER.C0 = Clerp(LEFTSHOULDER.C0, CF(-1.5, 0.55, 0) * ANGLES(RAD(-5), RAD(0), RAD(-80)) * LEFTSHOULDERC0, 0.5 / ANIM_SPEED)
- RIGHTHIP.C0 = Clerp(RIGHTHIP.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.8 / ANIM_SPEED)
- LEFTHIP.C0 = Clerp(LEFTHIP.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / ANIM_SPEED)
- end
- end
- end
- else
- ANIM = "Sit"
- if ATTACKING == false then
- ROOTJOINT.C0 = Clerp(ROOTJOINT.C0,ROOTC0 * CF(0, 0, -0.5) * ANGLES(RAD(0), RAD(0), RAD(0)), 1.25 / ANIM_SPEED)
- NECK.C0 = Clerp(NECK.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1.25 / ANIM_SPEED)
- RIGHTSHOULDER.C0 = Clerp(RIGHTSHOULDER.C0, CF(1.5, 0.65, 0) * ANGLES(RAD(50), RAD(10), RAD(-45))*CF(0,-0.25,0) * RIGHTSHOULDERC0, 1.25 / ANIM_SPEED)
- LEFTSHOULDER.C0 = Clerp(LEFTSHOULDER.C0, CF(-1.5, 0.65, 0) * ANGLES(RAD(50), RAD(-10), RAD(45))*CF(0,-0.25,0) * LEFTSHOULDERC0, 1.25 / ANIM_SPEED)
- RIGHTHIP.C0 = Clerp(RIGHTHIP.C0, CF(1, -0.25, -1) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 1.25 / ANIM_SPEED)
- LEFTHIP.C0 = Clerp(LEFTHIP.C0, CF(-1, -0.25, -1) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-10)), 1.25 / ANIM_SPEED)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement