Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = owner
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- if hum.RigType ~= Enum.HumanoidRigType.R6 then warn("You must be r6 to use this script.") return end
- local torso = char:FindFirstChild("Torso")
- local RootPart = char["HumanoidRootPart"]
- local RootJoint = RootPart["RootJoint"]
- local rarm,larm,rleg,lleg,head = char:FindFirstChild("Right Arm"),char:FindFirstChild("Left Arm"),char:FindFirstChild("Right Leg"),char:FindFirstChild("Left Leg"),char:FindFirstChild("Head")
- local char = plr.Character
- local cos = math.cos
- local sin = math.sin
- local rad = math.rad
- local sine = 0
- local random = math.random
- local floor = math.floor
- local noise = math.noise
- local angles = CFrame.Angles
- local CF = CFrame.new
- local it=Instance.new
- local vt=Vector3.new
- local euler=CFrame.fromEulerAnglesXYZ
- local debris = game:GetService("Debris")
- local tween = game:GetService("TweenService")
- local lastcampos = Vector3.new(0,0,0)
- local idling = true
- local walking = false
- local damaged = false
- local hitting = false
- local shifting = false
- local sprinting = false
- local died = false
- Model0 = Instance.new("Model")
- Part1 = Instance.new("Part")
- Part2 = Instance.new("Part")
- Part3 = Instance.new("Part")
- Part4 = Instance.new("Part")
- Part5 = Instance.new("Part")
- Part6 = Instance.new("Part")
- Model0.Name = "mc_char"
- Model0.Parent = char
- Part1.Name = "rl"
- Part1.Parent = Model0
- Part1.Color = rleg.Color
- Part1.Size = Vector3.new(1, 2, 1)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.Material = Enum.Material.SmoothPlastic
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part2.Name = "ra"
- Part2.Parent = Model0
- Part2.Color = rarm.Color
- Part2.Size = Vector3.new(1, 2.2, 1)
- Part2.BottomSurface = Enum.SurfaceType.Smooth
- Part2.Material = Enum.Material.SmoothPlastic
- Part2.TopSurface = Enum.SurfaceType.Smooth
- Part3.Name = "tors"
- Part3.Parent = Model0
- Part3.Color = torso.Color
- Part3.Size = Vector3.new(1, 2.1, 2)
- Part3.BottomSurface = Enum.SurfaceType.Smooth
- Part3.Material = Enum.Material.SmoothPlastic
- Part3.TopSurface = Enum.SurfaceType.Smooth
- Part4.Name = "la"
- Part4.Parent = Model0
- Part4.Color = larm.Color
- Part4.Size = Vector3.new(1, 2.2, 1)
- Part4.BottomSurface = Enum.SurfaceType.Smooth
- Part4.Material = Enum.Material.SmoothPlastic
- Part4.TopSurface = Enum.SurfaceType.Smooth
- Part5.Name = "hed"
- Part5.Parent = Model0
- Part5.Color = head.Color
- Part5.Size = Vector3.new(2, 2, 2)
- Part5.BottomSurface = Enum.SurfaceType.Smooth
- Part5.Material = Enum.Material.SmoothPlastic
- Part5.TopSurface = Enum.SurfaceType.Smooth
- Part6.Name = "ll"
- Part6.Parent = Model0
- Part6.Color = lleg.Color
- Part6.Size = Vector3.new(1, 2, 1)
- Part6.BottomSurface = Enum.SurfaceType.Smooth
- Part6.Material = Enum.Material.SmoothPlastic
- Part6.TopSurface = Enum.SurfaceType.Smooth
- local shirt = char:FindFirstChild("Shirt")
- local pants = char:FindFirstChild("Pants")
- if shirt then
- shirt = shirt.ShirtTemplate
- end
- if pants then
- pants = pants.PantsTemplate
- end
- for i,v in pairs(char:GetDescendants()) do
- if v:IsA("Decal") or v:IsA("Texture") or v:IsA("Shirt") or v:IsA("Pants") or v:IsA("ShirtGraphic") or v:IsA("BodyColors") or v:IsA("Accessory") or v:IsA("Hat") then
- v:Destroy()
- end
- if v:IsA("Part") then
- v.CanCollide = false
- v.Transparency = 1
- end
- end
- for i,v in pairs(hum:GetChildren()) do
- v:Destroy()
- end
- local mc_char = Model0
- for i,v in pairs(mc_char:GetDescendants()) do
- if v:IsA("UnionOperation") or v:IsA("Part") then
- v.Anchored = false
- v.CanCollide = false
- v.Transparency = 0
- end
- end
- local face = Instance.new("Decal",mc_char['hed'])
- face.Texture = "rbxassetid://984409236"
- local hats = {493450535,181335938,63036639,63723892,203973449}
- local hatpart = Instance.new("Part",mc_char)
- hatpart.Anchored = false
- hatpart.CanCollide = false
- hatpart.Size = Vector3.new(1.6, 0.6, 1.8)
- local hatmesh = Instance.new("SpecialMesh",hatpart)
- hatmesh.MeshId = 'rbxassetid://72081410'
- hatmesh.TextureId = 'rbxassetid://' .. hats[math.random(1,#hats)]
- hum.BreakJointsOnDeath = false
- hum.WalkSpeed = 16
- local hitbox = Instance.new("Part",torso)
- hitbox.Transparency = 1
- hitbox.Size = Vector3.new(4,5,4)
- hitbox.CanCollide = false
- ------------------------
- local ll = Instance.new("Weld")
- ll.Parent = lleg
- ll.Part0 = lleg
- ll.Part1 = mc_char['ll']
- ll.C0 = lleg.CFrame:Inverse()
- ll.C1 = mc_char['ll'].CFrame:Inverse()
- ll.C0 = CF(0,0,0)*angles(rad(0),rad(0),rad(0))
- ------------------------
- local rl = Instance.new("Weld")
- rl.Parent = rleg
- rl.Part0 = rleg
- rl.Part1 = mc_char['rl']
- rl.C0 = rleg.CFrame:Inverse()
- rl.C1 = mc_char['rl'].CFrame:Inverse()
- rl.C0 = CF(0,0,0)*angles(rad(0),rad(0),rad(0))
- ------------------------
- local la = Instance.new("Weld")
- la.Parent = larm
- la.Part0 = larm
- la.Part1 = mc_char['la']
- la.C0 = larm.CFrame:Inverse()
- la.C1 = mc_char['la'].CFrame:Inverse()
- la.C0 = CF(0,0,0)*angles(rad(0),rad(0),rad(0))
- ------------------------
- local ra = Instance.new("Weld")
- ra.Parent = rarm
- ra.Part0 = rarm
- ra.Part1 = mc_char['ra']
- ra.C0 = rarm.CFrame:Inverse()
- ra.C1 = mc_char['ra'].CFrame:Inverse()
- ra.C0 = CF(0,0,0)*angles(rad(0),rad(0),rad(0))
- ------------------------
- local hed = Instance.new("Weld")
- hed.Parent = head
- hed.Part0 = head
- hed.Part1 = mc_char['hed']
- hed.C0 = head.CFrame:Inverse()
- hed.C1 = mc_char['hed'].CFrame:Inverse()
- hed.C0 = CF(0,.6,0)*angles(rad(0),rad(0),rad(0))
- ------------------------
- local hat = Instance.new("Weld")
- hat.Parent = mc_char['hed']
- hat.Part0 = mc_char['hed']
- hat.Part1 = hatpart
- hat.C0 = mc_char['hed'].CFrame:Inverse()
- hat.C1 = hatpart.CFrame:Inverse()
- hat.C0 = CF(0,1.2,0)*angles(rad(5),rad(0),rad(0))
- ------------------------
- local tors = Instance.new("Weld")
- tors.Parent = torso
- tors.Part0 = torso
- tors.Part1 = mc_char['tors']
- tors.C0 = torso.CFrame:Inverse()
- tors.C1 = mc_char['tors'].CFrame:Inverse()
- tors.C0 = CF(0,.05,0)*angles(rad(0),rad(90),rad(0))
- ----------------------------------------------
- local hb = Instance.new("Weld")
- hb.Parent = torso
- hb.Part0 = torso
- hb.Part1 = hitbox
- hb.C0 = torso.CFrame:Inverse()
- hb.C1 = hitbox.CFrame:Inverse()
- hb.C0 = CF(0,0,-1)*angles(rad(0),rad(0),rad(0))
- ----------------------------------------------
- function lerp(object, newCFrame, alpha)
- return object:lerp(newCFrame, alpha)
- end
- New = function(Object, Parent, Name, Data)
- local Object = Instance.new(Object)
- for Index, Value in pairs(Data or {}) do
- Object[Index] = Value
- end
- Object.Parent = Parent
- Object.Name = Name
- return Object
- end
- function weld(parent,part0,part1,c0)
- local weld=it("Weld")
- weld.Parent=parent
- weld.Part0=part0
- weld.Part1=part1
- weld.C0=c0
- return weld
- end
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "ArtificialHB"
- script:WaitForChild("ArtificialHB")
- Frame_Speed = 1 / 60
- 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
- script.ArtificialHB:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.ArtificialHB:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- function swait(num)
- if num == 0 or num == nil then
- ArtificialHB.Event:wait()
- else
- for i = 1, num do
- ArtificialHB.Event:wait()
- end
- end
- end
- function play(id,par,vol,pitch,loop,starting,ending)
- local current = Instance.new("Sound",par)
- current.SoundId = "rbxassetid://" ..id
- current.Parent = par or script
- current.Volume = vol or 1
- current.PlaybackSpeed = pitch or 1
- current.Looped = loop or false
- current:Play()
- current.TimePosition = starting or 0
- spawn(function()
- if ending ~= nil and tonumber(ending) then
- repeat wait() until current.TimePositon >= ending
- current:Stop()
- debris:AddItem(current,1)
- else
- repeat wait() until not current.IsPlaying
- debris:AddItem(current,1)
- end
- end)
- return current
- end
- function rayCast(Pos, Dir, Max, Ignore)
- return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
- end
- local punch1 = Instance.new("Sound",tors)
- punch1.SoundId = "rbxassetid://3362346832"
- punch1.Volume = 2
- local punch2 = Instance.new("Sound",tors)
- punch2.SoundId = "rbxassetid://3362337129"
- punch2.Volume = 2
- local death = Instance.new("Sound",tors)
- death.SoundId = "rbxassetid://535690488"
- death.Volume = 2
- function hit()
- local connection
- connection = hitbox.Touched:Connect(function(obj)
- local targethum = obj.Parent:FindFirstChildOfClass("Humanoid")
- if obj and obj.Parent and targethum and targethum.Parent and obj.Parent.ClassName == "Model" and not targethum:FindFirstChild("Fist Hit") then
- if targethum.Health > 0 then
- local confirm = Instance.new("IntValue",targethum)
- confirm.Name = "Fist Hit"
- debris:AddItem(confirm,.12)
- targethum.Health = targethum.Health - 10
- --play("3362346832",obj,2)
- punch1:Play()
- for i,v in pairs(obj.Parent:GetChildren()) do
- if (v:IsA("Part") or v:IsA("WedgePart") or v:IsA("BasePart") or v:IsA("MeshPart") or v:IsA("UnionOperation")) and v.Name ~= "effects" then
- local box = Instance.new("SelectionBox",v)
- box.Adornee = v
- box.Color3 = Color3.new(1,0,0)
- box.SurfaceColor3 = Color3.new(1,0,0)
- box.SurfaceTransparency = .75
- box.LineThickness = 0
- box.Transparency = 1
- game:GetService("Debris"):AddItem(box,.5)
- end
- end
- end
- end
- end)
- wait(.12)
- connection:Disconnect()
- end
- local currentHealth = hum.Health
- hum.HealthChanged:Connect(function(health)
- if (health >= currentHealth) or (died) then return end
- local change = math.abs(currentHealth - health)
- local left = change
- currentHealth = health
- if math.random(1,2) == 1 then
- --play("3362346832",torso,2)
- punch1:Play()
- else
- --play("3362337129",torso,2)
- punch2:Play()
- end
- if not damaged then
- damaged = true
- end
- for i,v in pairs(mc_char:GetChildren()) do
- if (v:IsA("Part") or v:IsA("WedgePart") or v:IsA("BasePart") or v:IsA("MeshPart") or v:IsA("UnionOperation")) and v.Name ~= "effects" then
- local box = Instance.new("SelectionBox",v)
- box.Adornee = v
- box.Color3 = Color3.new(1,0,0)
- box.SurfaceColor3 = Color3.new(1,0,0)
- box.SurfaceTransparency = .75
- box.LineThickness = 0
- box.Transparency = 1
- game:GetService("Debris"):AddItem(box,.5)
- end
- end
- spawn(function()
- wait(.25)
- damaged = false
- end)
- end)
- hum.Died:Connect(function()
- died = true
- --play("535690488",torso,2)
- death:Play()
- for i,v in pairs(mc_char:GetChildren()) do
- if (v:IsA("Part") or v:IsA("WedgePart") or v:IsA("BasePart") or v:IsA("MeshPart") or v:IsA("UnionOperation")) and v.Name ~= "effects" then
- local box = Instance.new("SelectionBox",v)
- box.Adornee = v
- box.Color3 = Color3.new(1,0,0)
- box.SurfaceColor3 = Color3.new(1,0,0)
- box.SurfaceTransparency = .75
- box.LineThickness = 0
- box.Transparency = 1
- end
- end
- for i,v in pairs(char:GetDescendants()) do
- if v:IsA("Part") or v:IsA("WedgePart") or v:IsA("BasePart") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
- v.CanCollide = false
- end
- end
- wait(.25)
- for i,v in pairs(char:GetDescendants()) do
- if v:IsA("Part") or v:IsA("WedgePart") or v:IsA("BasePart") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
- v.Anchored = true
- end
- end
- end)
- ------------------------------------------
- local remote = Instance.new("RemoteEvent",char)
- remote.Name = "mc_char_remote"
- local code = [[
- local mouse = game:GetService("Players").LocalPlayer:GetMouse()
- local remote = script.Parent
- mouse.Button1Down:Connect(function()
- remote:FireServer(1,nil)
- end)
- spawn(function()
- while wait(.1) do
- remote:FireServer(4,mouse.Hit.p)
- end
- end)
- mouse.KeyDown:Connect(function(key)
- if string.byte(key) == 50 then
- remote:FireServer(2,true)
- end
- if string.byte(key) == 48 then
- remote:FireServer(3,true)
- end
- end)
- mouse.KeyUp:Connect(function(key)
- if string.byte(key) == 50 then
- remote:FireServer(2,false)
- end
- if string.byte(key) == 48 then
- remote:FireServer(3,false)
- end
- end)
- ]]
- NLS(code,remote)
- remote.OnServerEvent:Connect(function(plr,mode,data)
- if mode == 4 and not died then
- lastcampos = data
- end
- if mode == 1 and not died and not hitting then
- spawn(function()
- hitting = true
- hit()
- hitting = false
- end)
- end
- if mode == 2 and not died and not sprinting then
- if data then
- shifting = true
- hum.WalkSpeed = 7
- elseif not data then
- shifting = false
- hum.WalkSpeed = 16
- end
- end
- if mode == 3 and not died and not shifting then
- if data then
- sprinting = true
- hum.WalkSpeed = 40
- elseif not data then
- sprinting = false
- hum.WalkSpeed = 16
- end
- end
- end)
- ------------------------------------------
- --[[spawn(function()
- while wait(0) do
- local Y, X, Z = workspace.CurrentCamera.CFrame:toEulerAnglesYXZ()
- Y = -Y-math.rad(90)
- if X > 0 and X < 1.57 then
- X = X+(1.57-X)*2
- elseif X < 0 and X > -1.57 then
- X = X+(-1.57-X)*2
- end
- print(X+Y+Z)
- hed.C0=lerp(hed.C0,hed.C0*CF(0,.6,0)*angles(rad(0 + 1 * cos(sine / 60)),rad(0 + 1 * cos(sine / 60)),rad(0 + 1 * cos(sine / 60)))*angles(rad(0 - 2 * cos(sine / 60)),rad(0 - 2 * cos(sine / 60)),rad(0 - 2 * cos(sine / 60))),.5)
- end
- end)]]
- ------------------------------------------
- spawn(function()
- while wait(0) do
- spawn(function()
- sine = sine+5*wait()/(1/30)
- end)
- local torvel=(torso.Velocity*Vector3.new(1,0,1)).magnitude
- local hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,char)
- if not died then
- if damaged then -- damaged
- if math.random(1,2) == 1 then
- la.C0=lerp(ll.C0,CF(0,0,.3)*angles(rad(-25), rad(0), rad(0)),1)
- ra.C0=lerp(ra.C0,CF(0,0,-.3)*angles(rad(25), rad(0), rad(0)),1)
- ll.C0=lerp(ll.C0,CF(0,0,-.3)*angles(rad(25), rad(0), rad(0)),1)
- rl.C0=lerp(rl.C0,CF(0,0,.3)*angles(rad(-25), rad(0), rad(0)),1)
- tors.C0=lerp(tors.C0,CF(0,.05,0)*angles(rad(0), rad(90), rad(0)),1)
- hed.C0=lerp(hed.C0,CF(head.Position,lastcampos)*CF(0,.6,0)*angles(rad(0 + 1 * cos(sine / 60)),rad(0 + 1 * cos(sine / 60)),rad(0 + 1 * cos(sine / 60)))*angles(rad(0 - 2 * cos(sine / 60)),rad(0 - 2 * cos(sine / 60)),rad(0 - 2 * cos(sine / 60))),1)
- wait(.25)
- else
- la.C0=lerp(ll.C0,CF(0,0,-.3)*angles(rad(25), rad(0), rad(0)),1)
- ra.C0=lerp(ra.C0,CF(0,0,.3)*angles(rad(-25), rad(0), rad(0)),1)
- ll.C0=lerp(ll.C0,CF(0,0,.3)*angles(rad(-25), rad(0), rad(0)),1)
- rl.C0=lerp(rl.C0,CF(0,0,-.3)*angles(rad(25), rad(0), rad(0)),1)
- tors.C0=lerp(tors.C0,CF(0,.05,0)*angles(rad(0), rad(90), rad(0)),1)
- hed.C0=lerp(hed.C0,CF(head.Position,lastcampos)*CF(0,.6,0)*angles(rad(0 + 1 * cos(sine / 60)),rad(0 + 1 * cos(sine / 60)),rad(0 + 1 * cos(sine / 60)))*angles(rad(0 - 2 * cos(sine / 60)),rad(0 - 2 * cos(sine / 60)),rad(0 - 2 * cos(sine / 60))),1)
- wait(.25)
- end
- elseif shifting and torvel < 1 then -- shift
- walking = false
- idling = true
- la.C0=lerp(ll.C0,CF(0,-.5,0)*angles(rad(-45 - 3 * cos(sine / 40)), rad(0), rad(0 - 3 * cos(sine / 43))),1)
- if not hitting then
- ra.C0=lerp(ra.C0,CF(0,-.5,0)*angles(rad(-45 + 3 * cos(sine / 40)), rad(0), rad(0 + 3 * cos(sine / 43))),1)
- else
- ra.C0=lerp(ra.C0,CF(-.5,.3,-.6)*angles(rad(80), rad(0), rad(-25)),.5)
- end
- ll.C0=lerp(ll.C0,CF(0,0,.6)*angles(rad(0 - 2 * cos(sine / 65)), rad(0), rad(0 - 2 * cos(sine / 70))),1)
- rl.C0=lerp(rl.C0,CF(0,0,.6)*angles(rad(0), rad(0), rad(0)),1)
- tors.C0=lerp(tors.C0,CF(0,-.5,0)*angles(rad(-45), rad(90), rad(0)),1)
- hed.C0=lerp(hed.C0,CF(head.Position,lastcampos)*CF(0,-.4,-.4)*angles(rad(0 + 1 * cos(sine / 60)),rad(0 + 1 * cos(sine / 60)),rad(0 + 1 * cos(sine / 60)))*angles(rad(0 - 2 * cos(sine / 60)),rad(0 - 2 * cos(sine / 60)),rad(0 - 2 * cos(sine / 60))),1)
- elseif shifting and torvel > 1 then -- shift walk
- walking = true
- idling = false
- la.C0=lerp(ll.C0,CF(0,-.5,0)*angles(rad(-45 - 10 * cos(sine / 40)), rad(0), rad(0 - 3 * cos(sine / 43))),1)
- if not hitting then
- ra.C0=lerp(ra.C0,CF(0,-.5,0)*angles(rad(-45 + 10 * cos(sine / 40)), rad(0), rad(0 + 3 * cos(sine / 43))),1)
- else
- ra.C0=lerp(ra.C0,CF(-.5,.3,-.6)*angles(rad(80), rad(0), rad(-25)),.5)
- end
- ll.C0=lerp(ll.C0,CF(0,0,.6)*angles(rad(12 * cos(sine / 30)), rad(0), rad(0)),1)
- rl.C0=lerp(rl.C0,CF(0,0,.6)*angles(rad(-12 * cos(sine / 30)), rad(0), rad(0)),1)
- tors.C0=lerp(tors.C0,CF(0,-.5,0)*angles(rad(-45), rad(90), rad(0)),1)
- hed.C0=lerp(hed.C0,CF(head.Position,lastcampos)*CF(0,-.4,-.4)*angles(rad(0 + 1 * cos(sine / 60)),rad(0 + 1 * cos(sine / 60)),rad(0 + 1 * cos(sine / 60)))*angles(rad(0 - 2 * cos(sine / 60)),rad(0 - 2 * cos(sine / 60)),rad(0 - 2 * cos(sine / 60))),1)
- elseif torvel < 1 then -- idle
- walking = false
- idling = true
- la.C0=lerp(ll.C0,angles(rad(0 - 3 * cos(sine / 40)), rad(0), rad(0 - 3 * cos(sine / 43))),.5)
- if not hitting then
- ra.C0=lerp(ra.C0,angles(rad(0 + 3 * cos(sine / 40)), rad(0), rad(0 + 3 * cos(sine / 43))),.5)
- else
- ra.C0=lerp(ra.C0,CF(-.5,.3,-.6)*angles(rad(80), rad(0), rad(-25)),.5)
- end
- ll.C0=lerp(ll.C0,angles(rad(0 - 2 * cos(sine / 65)), rad(0), rad(0 - 2 * cos(sine / 70))),.5)
- rl.C0=lerp(rl.C0,angles(rad(0), rad(0), rad(0)),.5)
- tors.C0=lerp(tors.C0,CF(0,.05,0)*angles(rad(0), rad(90), rad(0)),.5)
- hed.C0=lerp(hed.C0,CF(head.Position,lastcampos)*CF(0,.6,0)*angles(rad(0 + 1 * cos(sine / 60)),rad(0 + 1 * cos(sine / 60)),rad(0 + 1 * cos(sine / 60)))*angles(rad(0 - 2 * cos(sine / 60)),rad(0 - 2 * cos(sine / 60)),rad(0 - 2 * cos(sine / 60))),1)
- elseif sprinting and torvel > 5 then -- sprinting
- walking = true
- idling = false
- la.C0=lerp(la.C0,CF(0,.4,0 - 1 * cos(sine / 14) + .1 * cos(sine / 30))*angles(rad(120 * cos(sine / 14)), rad(0), rad(0 + 7 * cos(sine / 14))),.7)
- if not hitting then
- ra.C0=lerp(ra.C0,CF(0,.4,0 - -1 * cos(sine / 14) + .1 * cos(sine / 30))*angles(rad(-120 * cos(sine / 14)), rad(0 + 7 * cos(sine / 14)), rad(0)),.7)
- else
- ra.C0=lerp(ra.C0,CF(-.5,.3,-.6)*angles(rad(80), rad(0), rad(-25)),.5)
- end
- ll.C0=lerp(ll.C0,CF(0,.4,0 - 1 * cos(sine / 14) + .1 * cos(sine / 30))*angles(rad(120 * cos(sine / 14)), rad(0 + 7 * cos(sine / 14)), rad(0)),.7)
- rl.C0=lerp(rl.C0,CF(0,.4,0 - -1 * cos(sine / 14) + .1 * cos(sine / 30))*angles(rad(-120 * cos(sine / 14)), rad(0 + 7 * cos(sine / 14)), rad(0)),.7)
- tors.C0=lerp(tors.C0,CF(0,.05 - .1 * cos(sine / 16),0)*angles(rad(0), rad(90), rad(0)),.7)
- hed.C0=lerp(hed.C0,CF(head.Position,lastcampos)*CF(0,.6 - .1 * cos(sine / 16),0)*angles(rad(0 + 1 * cos(sine / 60)),rad(0 + 1 * cos(sine / 60)),rad(0 + 1 * cos(sine / 60)))*angles(rad(0 - 2 * cos(sine / 60)),rad(0 - 2 * cos(sine / 60)),rad(0 - 2 * cos(sine / 60))),1)
- elseif torvel > 1 then -- walking
- walking = true
- idling = false
- la.C0=lerp(la.C0,CF(0,0,0 - .3 * cos(sine / 24) + .05 * cos(sine / 16))*angles(rad(32 * cos(sine / 24)), rad(0), rad(0 + 4 * cos(sine / 24))),.5)
- if not hitting then
- ra.C0=lerp(ra.C0,CF(0,0,0 - -.3 * cos(sine / 24) + .05 * cos(sine / 16))*angles(rad(-32 * cos(sine / 24)), rad(0), rad(0 + 4 * cos(sine / 24))),.5)
- else
- ra.C0=lerp(ra.C0,CF(-.5,.3,-.6)*angles(rad(80), rad(0), rad(-25)),.5)
- end
- ll.C0=lerp(ll.C0,CF(0,0,0 - .3 * cos(sine / 24) + .05 * cos(sine / 16))*angles(rad(24 * cos(sine / 24)), rad(0 + 7 * cos(sine / 24)), rad(0)),.5)
- rl.C0=lerp(rl.C0,CF(0,0,0 - -.3 * cos(sine / 24) + .05 * cos(sine / 16))*angles(rad(-24 * cos(sine / 24)), rad(0 + 7 * cos(sine / 24)), rad(0)),.5)
- tors.C0=lerp(tors.C0,CF(0,.05 - .05 * cos(sine / 16),0)*angles(rad(0), rad(90), rad(0)),.5)
- hed.C0=lerp(hed.C0,CF(head.Position,lastcampos)*CF(0,.6 - .05 * cos(sine / 16),0)*angles(rad(0 + 1 * cos(sine / 60)),rad(0 + 1 * cos(sine / 60)),rad(0 + 1 * cos(sine / 60)))*angles(rad(0 - 2 * cos(sine / 60)),rad(0 - 2 * cos(sine / 60)),rad(0 - 2 * cos(sine / 60))),1)
- end
- elseif died then
- RootJoint.C0=lerp(RootJoint.C0,angles(rad(0), rad(0), rad(90)),.5)
- end
- end
- end)
Add Comment
Please, Sign In to add comment