Harder Coding

Make A Script

Plugin("My Script", function()
-- Dont touch below
HumanDied = false
local Char=game.Players.LocalPlayer.Character
local Humanoid = game.Players.LocalPlayer.Character.Humanoid
local Torso=Char.Torso
local RightShoulder=Torso['Right Shoulder'] -- Right arm
local RightShoulderOrigin=RightShoulder.C0
local LeftShoulder=Torso['Left Shoulder'] -- Left arm
local LeftShoulderOrigin=LeftShoulder.C0
local RightHip=Torso['Right Hip'] -- Right leg
local RightHipOrigin=RightHip.C0
local LeftHip=Torso['Left Hip'] -- Left leg
local LeftHipOrigin=LeftHip.C0
local RootJoint=Char.HumanoidRootPart.RootJoint -- Torso
local RootJointOrigin=RootJoint.C0

local RightLeg = Char["Right Leg"]
local LeftLeg = Char["Left Leg"]
local ATTACK = false
local RootPart = Char.HumanoidRootPart
local VT = Vector3.new
local mouse = game.Players.LocalPlayer:GetMouse()

pcall(function()
    Char.Animate:Destroy()
end)
for i,v in pairs(Humanoid:GetPlayingAnimationTracks()) do
    v:Stop()
end

function swait()
    game:GetService('RunService').Heartbeat:wait()
end
-- Touch below
while Humanoid.Health > 0 do
    swait()
    local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
    local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  if TORSOVELOCITY > 1 and ATTACK == false then -- walk anim
    RightShoulder.C0=RightShoulder.C0:Lerp(RightShoulderOrigin*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),0.1)
    LeftShoulder.C0=LeftShoulder.C0:Lerp(LeftShoulderOrigin*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),0.1)
  RightHip.C0=RightHip.C0:Lerp(RightHipOrigin*CFrame.new(0,0,0)*CFrame.Angles(0 + RightLeg.RotVelocity.Y / 70,0,math.cos(tick()*7)/1),0.1)
  LeftHip.C0=LeftHip.C0:Lerp(LeftHipOrigin*CFrame.new(0,0,0)*CFrame.Angles(0 - LeftLeg.RotVelocity.Y / 70,0,math.cos(tick()*7)/1),0.1)
  RootJoint.C0=RootJoint.C0:Lerp(RootJointOrigin*CFrame.new(0,0,0)*CFrame.Angles(0,0 - RootPart.RotVelocity.Y / 70 ,0),0.1)
  elseif TORSOVELOCITY < 1 and ATTACK == false then -- no walk
    RightShoulder.C0=RightShoulder.C0:Lerp(RightShoulderOrigin*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),0.1)
  LeftShoulder.C0=LeftShoulder.C0:Lerp(LeftShoulderOrigin*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),0.1)
  RightHip.C0=RightHip.C0:Lerp(RightHipOrigin*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),0.1)
  LeftHip.C0=LeftHip.C0:Lerp(LeftHipOrigin*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),0.1)
  RootJoint.C0=RootJoint.C0:Lerp(RootJointOrigin*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),0.1)
end
end

end)

Last updated