Skip to content

Instantly share code, notes, and snippets.

@thekaisbest
Created May 27, 2021 07:56
Show Gist options
  • Save thekaisbest/4cfee725a69c5797443f371f16ccb9f4 to your computer and use it in GitHub Desktop.
Save thekaisbest/4cfee725a69c5797443f371f16ccb9f4 to your computer and use it in GitHub Desktop.
plr = game.Players.LocalPlayer
char = plr.Character
mouse = plr:GetMouse()
char.Animate:Remove()
dag = char["Hussar SabreAccessory"]
dag.Name = "Fire"
char["Fire"].Handle.AccessoryWeld:Destroy()
att0 = Instance.new("Attachment",char["Fire"].Handle)
att0.Orientation = Vector3.new(0,0,0)
att0.Position = Vector3.new(0,1,-1.5)
att1 = Instance.new("Attachment",char["Right Arm"])
ap = Instance.new("AlignPosition",char["Fire"].Handle)
ap.Attachment0 = att0
ap.Attachment1 = att1
ap.RigidityEnabled = true
ao = Instance.new("AlignOrientation",char["Fire"].Handle)
ao.Attachment0 = att0
ao.Attachment1 = att1
ao.RigidityEnabled = true
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 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
Humanoid.WalkSpeed = 23
local function slice()
for i = 0, 5, 0.2 / 0.5 do
swait()
RightShoulder.C0=RightShoulder.C0:Lerp(RightShoulderOrigin*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-50),0,math.rad(-10)),0.1)
LeftShoulder.C0=LeftShoulder.C0:Lerp(LeftShoulderOrigin*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-25),math.rad(10),math.rad(-20)),0.1)
RightHip.C0=RightHip.C0:Lerp(RightHipOrigin*CFrame.new(.5,1,0)*CFrame.Angles(0,math.rad(-10),0),0.1)
LeftHip.C0=LeftHip.C0:Lerp(LeftHipOrigin*CFrame.new(0,0,0)*CFrame.Angles(0,0,math.rad(20)),0.1)
RootJoint.C0=RootJoint.C0:Lerp(RootJointOrigin*CFrame.new(0,0,0)*CFrame.Angles(0,0,math.rad(-35)),0.1)
end
for i = 0, 15, 0.2 / 0.5 do
swait()
RightShoulder.C0=RightShoulder.C0:Lerp(RightShoulderOrigin*CFrame.new(1,0,0)*CFrame.Angles(math.rad(-40),math.rad(10),math.rad(160)),0.1)
LeftShoulder.C0=LeftShoulder.C0:Lerp(LeftShoulderOrigin*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-30),math.rad(10),math.rad(50)),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,math.rad(20)),0.1)
RootJoint.C0=RootJoint.C0:Lerp(RootJointOrigin*CFrame.new(0,0,0)*CFrame.Angles(0,0,0),0.1)
end
end
mouse.Button1Down:connect(function()
if ATTACK == false then
ATTACK = true
slice()
ATTACK = false
end
end)
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(math.rad(-12),math.rad(-10),math.rad(-25)-math.sin(tick()*10)/9),0.1)
LeftShoulder.C0=LeftShoulder.C0:Lerp(LeftShoulderOrigin*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-12),math.rad(10),math.rad(25)-math.sin(tick()*10)/9),0.1)
RightHip.C0=RightHip.C0:Lerp(RightHipOrigin*CFrame.new(0,math.sin(tick()*5)/4,0)*CFrame.Angles(math.rad(-2),0,math.sin(tick()*8)/1),0.1)
LeftHip.C0=LeftHip.C0:Lerp(LeftHipOrigin*CFrame.new(0,math.sin(tick()*5)/4,0)*CFrame.Angles(math.rad(-2),0,math.sin(tick()*8)/1),0.1)
RootJoint.C0=RootJoint.C0:Lerp(RootJointOrigin*CFrame.new(0,0,0.05-math.sin(tick()*5)/4)*CFrame.Angles(math.rad(20),0,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(math.rad(-10),math.rad(-20),math.sin(tick()*4)/3.5),0.1)
LeftShoulder.C0=LeftShoulder.C0:Lerp(LeftShoulderOrigin*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-10),math.rad(10),math.sin(tick()*2)/4),0.1)
RightHip.C0=RightHip.C0:Lerp(RightHipOrigin*CFrame.new(0,math.sin(tick()*5)/4,0)*CFrame.Angles(math.rad(-10),math.rad(-10),0),0.1)
LeftHip.C0=LeftHip.C0:Lerp(LeftHipOrigin*CFrame.new(0,math.sin(tick()*5)/4,0)*CFrame.Angles(math.rad(-10),math.rad(10),0),0.1)
RootJoint.C0=RootJoint.C0:Lerp(RootJointOrigin*CFrame.new(0,0,0.05-math.sin(tick()*5)/4)*CFrame.Angles(0,0,0),0.1)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment