Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ By Sugerkid]]--
- --//Main
- local Player = game.Players.LocalPlayer
- local Character = Player.Character
- local Mouse = Player:GetMouse()
- local Animate = Character:FindFirstChild("Animate")
- if Animate then Animate:Destroy() end
- local ShirtId = "rbxassetid://70347331"
- local PantsId = "rbxassetid://70347345"
- local State = "Idle"
- local Sitting = false
- local Animations = false
- local Sprinting = false
- local rad = math.rad
- local sin = math.sin
- local cos = math.cos
- --//Parts
- local RA = Character["Right Arm"]
- local LA = Character["Left Arm"]
- local RL = Character["Right Leg"]
- local LL = Character["Left Leg"]
- local T = Character["Torso"]
- local H = Character["Head"]
- local HRP = Character["HumanoidRootPart"]
- local Humanoid = Character["Humanoid"]
- Humanoid.JumpPower = 0
- for i,v in pairs(Character:GetChildren()) do
- if v.ClassName == "Accessory" or v.ClassName == "Hat" then v:Destroy() end
- if v.ClassName == "Shirt" or v.ClassName == "Pants" then v:Destroy() end
- if v.ClassName == "BodyColors" then v:Destroy() end
- end
- local Shirt = Instance.new('Shirt',Character)
- local Pants = Instance.new('Pants',Character)
- Shirt.ShirtTemplate = ShirtId
- Pants.PantsTemplate = PantsId
- wait()
- T.BrickColor = BrickColor.new('Salmon')
- H.BrickColor = BrickColor.new('Salmon')
- RA.BrickColor = BrickColor.new('Salmon')
- LA.BrickColor = BrickColor.new('Salmon')
- RL.BrickColor = BrickColor.new('Salmon')
- LL.BrickColor = BrickColor.new('Salmon')
- if H:FindFirstChild('face') then
- H.face.Texture = "rbxassetid://297312774"
- end
- --//Funcs
- function Weld(x,y)
- local w = Instance.new("Weld")
- w.Part0 = x
- w.Part1 = y
- w.Name = tostring(y.Name).."_Weld"
- w.Parent = x
- return w
- end
- function Clerp(start,destination,increment)
- local function slerp(a,b,c)return (1-c)*a+(c*b)end
- local c1 = {start.X,start.Y,start.Z,start:toEulerAnglesXYZ()}
- local c2 = {destination.X,destination.Y,destination.Z,destination:toEulerAnglesXYZ()}
- for i,v in pairs(c1)do c1[i] = slerp(v,c2[i],increment)end
- return CFrame.new(c1[1],c1[2],c1[3])*CFrame.Angles(c1[4],c1[5],c1[6])
- end
- function CheckState()
- local XZMagnitude = Vector3.new(HRP.Velocity.X, 0, HRP.Velocity.Z).Magnitude
- local YMagnitude = Vector3.new(0, HRP.Velocity.Y, 0).Magnitude
- if XZMagnitude > 2 then State = "Walking" elseif XZMagnitude < 2 then State = "Idle" end
- if YMagnitude > 1.5 then State = "Jumping" end
- if Sitting then State = "Sitting" end
- return State
- end
- --//Welds
- local TW = Weld(HRP,T)
- local RAW = Weld(T,RA)
- local LAW = Weld(T,LA)
- local RLW = Weld(T,RL)
- local LLW = Weld(T,LL)
- local HW = Weld(T,H)
- Mouse.KeyDown:connect(function(Key)
- if Key:lower() == "q" then
- Sitting = not Sitting
- end
- end)
- function cap(n,x,f)
- if f==nil then f=false end
- if f then if x>n then x=n end else if x<n then x = n end end
- return x
- end
- --//Animate!
- while true do
- game:GetService('RunService').RenderStepped:wait()
- local S = CheckState()
- if S == "Idle" and not Animations then
- local TR = sin(tick())/15
- TW.C0 = Clerp(TW.C0, CFrame.new(0,0,0)*CFrame.Angles(-TR/2,0,0), .1)
- HW.C0 = Clerp(HW.C0, CFrame.new(0,1.5,0)*CFrame.Angles(sin(tick())/20,0,0), .1)
- RAW.C0 = Clerp(RAW.C0, CFrame.new(1.4,0,-cap(-.5,TR))*CFrame.Angles(cap(-.5,TR),0,rad(15)), .1)
- LAW.C0 = Clerp(LAW.C0, CFrame.new(-1.4,0,-cap(-.5,TR))*CFrame.Angles(cap(-.5,TR),0,-rad(15)), .1)
- RLW.C0 = Clerp(RLW.C0, CFrame.new(.5+rad(9),-2,-TR/2)*CFrame.Angles(TR/2,0,rad(10)), .1)
- LLW.C0 = Clerp(LLW.C0, CFrame.new(-.5-rad(9),-2,-TR/2)*CFrame.Angles(TR/2,0,-rad(10)), .1)
- elseif S == "Walking" and not Animations then
- local R = sin(HRP.RotVelocity.Y/15)/3
- local TR = sin(tick()*7)/2*Humanoid.WalkSpeed/16
- HW.C0 = Clerp(HW.C0, CFrame.new(0,1.5,0)*CFrame.Angles(0,0,0), .1)
- TW.C0 = Clerp(TW.C0, CFrame.new(0,0,0)*CFrame.Angles(0,0,R), .1)
- RAW.C0 = Clerp(RAW.C0, CFrame.new(1.4,0,-TR)*CFrame.Angles(TR,0,rad(15)-cap(0,R)), .1)
- LAW.C0 = Clerp(LAW.C0, CFrame.new(-1.4,0,TR)*CFrame.Angles(-TR,0,-rad(15)-cap(0,R)), .1)
- RLW.C0 = Clerp(RLW.C0, CFrame.new(.5+rad(2),-2,TR*1.5)*CFrame.Angles(-TR*1.5,0,rad(3)-R), .1)
- LLW.C0 = Clerp(LLW.C0, CFrame.new(-.5-rad(2),-2,-TR*1.5)*CFrame.Angles(TR*1.5,0,-rad(3)-R), .1)
- elseif S == "Sitting" and not Animations then
- TW.C0 = Clerp(TW.C0, CFrame.new(0,-1.9,0)*CFrame.Angles(rad(20),0,0), .1)
- HW.C0 = Clerp(HW.C0, CFrame.new(0,1.45,-rad(20))*CFrame.Angles(-rad(20),0,0), .1)
- RAW.C0 = Clerp(RAW.C0, CFrame.new(1.4+rad(5),0,rad(30))*CFrame.Angles(-rad(30),0,rad(5)), .1)
- LAW.C0 = Clerp(LAW.C0, CFrame.new(-1.4-rad(5),0,rad(30))*CFrame.Angles(-rad(30),0,-rad(5)), .1)
- RLW.C0 = Clerp(RLW.C0, CFrame.new(.5,-2+rad(60),-rad(60))*CFrame.Angles(rad(40),0,0), .1)
- LLW.C0 = Clerp(LLW.C0, CFrame.new(-.5,-2+rad(60)/2,-rad(60))*CFrame.Angles(rad(60),0,0), .1)
- end
- end
Add Comment
Please, Sign In to add comment