Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --By iiSharkBus
- require(5227539577)()
- repeat wait(4) until game.Players.LocalPlayer.Character
- print("Running Among Us")
- local player = game.Players.LocalPlayer
- local mouse = player:GetMouse()
- local UIS = game:GetService("UserInputService")
- local character = player.Character
- local runS = game:GetService("RunService").Stepped
- local hum = character:FindFirstChildOfClass("Humanoid")
- local rArm = character["Right Arm"]
- local lArm = character["Left Arm"]
- local rLeg = character["Right Leg"]
- local lLeg = character["Left Leg"]
- local tors = character.Torso
- local hed = character.Head
- local root = character.HumanoidRootPart
- local rootj = root.RootJoint
- local sine = 0
- local anim = nil
- local idle = 0
- local animSpeed = .35
- local attack = false
- local running = false
- character.Animate:Destroy()
- hum.Animator:Destroy()
- local theme = Instance.new("Sound",character.Torso)
- theme.Volume = 2
- theme.Looped = true
- theme.SoundId = "rbxassetid://6065418936"
- theme:Play()
- local killsound = Instance.new("Sound",character.Torso)
- killsound.Volume = 2
- killsound.SoundId = "rbxassetid://5700183626"
- local AMONGUSS = Instance.new("Sound",character.Torso)
- AMONGUSS.Volume = 2.5
- AMONGUSS.SoundId = "rbxassetid://6484812516"
- local DEATH = Instance.new("Sound",character.Torso)
- DEATH.Volume = 3
- DEATH.SoundId = "rbxassetid://6303118683"
- rArm.Transparency = 1
- lArm.Transparency = 1
- hed.Transparency = 0.99
- hed:ClearAllChildren()
- for i, v in pairs(character:GetChildren()) do
- if v:IsA("Accessory") then
- v:Destroy()
- end
- end
- local airTank = Instance.new("Part",character)
- airTank.Name = "AirTank"
- airTank.CanCollide = false
- airTank.Size = Vector3.new(1.4,1.4,.65)
- airTank.BrickColor = tors.BrickColor
- airTank.Material = Enum.Material.SmoothPlastic
- local selbox = Instance.new("SelectionBox",airTank)
- selbox.Adornee = airTank
- selbox.LineThickness = 0.02
- selbox.Color3 = Color3.new(0,0,0)
- local airtankweld = Instance.new("Weld",airTank)
- airtankweld.Part0 = airTank
- airtankweld.Part1 = tors
- airtankweld.C0 = CFrame.new(0,0,-.65)
- local llWeld = Instance.new("Weld",tors)
- llWeld.Part0 = tors
- llWeld.Part1 = lLeg
- llWeld.C0 = CFrame.new(-.5,-2,0)
- local rlWeld = Instance.new("Weld",tors)
- rlWeld.Part0 = tors
- rlWeld.Part1 = rLeg
- rlWeld.C0 = CFrame.new(.5,-2,0)
- local hedWeld = Instance.new("Weld",tors)
- hedWeld.Part0 = tors
- hedWeld.Part1 = hed
- hedWeld.C0 = CFrame.new(0,1.5,0)
- character["Shirt Graphic"].Graphic = 'rbxassetid://6371368975'
- function castRay(position, dir, maximun, ignore)
- return workspace:FindPartOnRay(Ray.new(position, dir.unit * (maximun or math.huge)), character)
- end
- function ragdoll(char)
- --Credit to Rufus14
- local victimshumanoid = char:findFirstChildOfClass("Humanoid")
- local checkragd = char:findFirstChild("ragded")
- if not checkragd then
- local boolvalue = Instance.new("BoolValue", char)
- boolvalue.Name = "ragded"
- if not char:findFirstChild("UpperTorso") then
- char.Archivable = true
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "Sound" then
- v:remove()
- end
- for q,w in pairs(v:GetChildren()) do
- if w.ClassName == "Sound" then
- w:remove()
- end
- end
- end
- local ragdoll = char:Clone()
- for i,v in pairs(ragdoll:GetDescendants()) do
- if v.ClassName == "Motor" or v.ClassName == "Motor6D" then
- v:destroy()
- end
- end
- ragdoll:findFirstChildOfClass("Humanoid").BreakJointsOnDeath = false
- --ragdoll:findFirstChildOfClass("Humanoid").Health = 0
- if ragdoll:findFirstChild("Health") then
- if ragdoll:findFirstChild("Health").ClassName == "Script" then
- ragdoll:findFirstChild("Health").Disabled = true
- end
- end
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" then
- v:destroy()
- end
- end
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "Accessory" then
- local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
- if attachment1 then
- for q,w in pairs(char:GetChildren()) do
- if w.ClassName == "Part" then
- local attachment2 = w:findFirstChild(attachment1.Name)
- if attachment2 then
- local hinge = Instance.new("HingeConstraint", v.Handle)
- hinge.Attachment0 = attachment1
- hinge.Attachment1 = attachment2
- hinge.LimitsEnabled = true
- hinge.LowerAngle = 0
- hinge.UpperAngle = 0
- end
- end
- end
- end
- end
- end
- ragdoll.Parent = workspace
- if ragdoll:findFirstChild("Right Arm") then
- local glue = Instance.new("Glue", ragdoll.Torso)
- glue.Part0 = ragdoll.Torso
- glue.Part1 = ragdoll:findFirstChild("Right Arm")
- glue.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Arm"))
- limbcollider.Size = Vector3.new(1.4,1,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- limbcollider.Name = "LimbCollider"
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Arm")
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- end
- if ragdoll:findFirstChild("Left Arm") then
- local glue = Instance.new("Glue", ragdoll.Torso)
- glue.Part0 = ragdoll.Torso
- glue.Part1 = ragdoll:findFirstChild("Left Arm")
- glue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Arm"))
- limbcollider.Size = Vector3.new(1.4,1,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Name = "LimbCollider"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Arm")
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- end
- if ragdoll:findFirstChild("Left Leg") then
- local glue = Instance.new("Glue", ragdoll.Torso)
- glue.Part0 = ragdoll.Torso
- glue.Part1 = ragdoll:findFirstChild("Left Leg")
- glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Leg"))
- limbcollider.Size = Vector3.new(1.4,1,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Name = "LimbCollider"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Leg")
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- end
- if ragdoll:findFirstChild("Right Leg") then
- local glue = Instance.new("Glue", ragdoll.Torso)
- glue.Part0 = ragdoll.Torso
- glue.Part1 = ragdoll:findFirstChild("Right Leg")
- glue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- glue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Leg"))
- limbcollider.Size = Vector3.new(1.4,1,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Name = "LimbCollider"
- limbcollider.Transparency = 1
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Leg")
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- end
- if ragdoll:findFirstChild("Head") and ragdoll.Torso:findFirstChild("NeckAttachment") then
- local HeadAttachment = Instance.new("Attachment", ragdoll["Head"])
- HeadAttachment.Position = Vector3.new(0, -0.5, 0)
- local connection = Instance.new('HingeConstraint', ragdoll["Head"])
- connection.LimitsEnabled = true
- connection.Attachment0 = ragdoll.Torso.NeckAttachment
- connection.Attachment1 = HeadAttachment
- connection.UpperAngle = 60
- connection.LowerAngle = -60
- elseif ragdoll:findFirstChild("Head") and not ragdoll.Torso:findFirstChild("NeckAttachment") then
- local hedweld = Instance.new("Weld", ragdoll.Torso)
- hedweld.Part0 = ragdoll.Torso
- hedweld.Part1 = ragdoll.Head
- hedweld.C0 = CFrame.new(0,1.5,0)
- end
- game.Debris:AddItem(ragdoll, 30)
- local function aaaalol()
- wait(0.2)
- local function searchforvelocity(wot)
- for i,v in pairs(wot:GetChildren()) do
- searchforvelocity(v)
- if v.ClassName == "BodyPosition" or v.ClassName == "BodyVelocity" then
- v:destroy()
- end
- end
- end
- searchforvelocity(ragdoll)
- wait(0.5)
- if ragdoll:findFirstChildOfClass("Humanoid") then
- ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true
- end
- --[[if ragdoll:findFirstChild("HumanoidRootPart") then
- ragdoll:findFirstChild("HumanoidRootPart"):destroy()
- end]]
- end
- spawn(aaaalol)
- elseif char:findFirstChild("UpperTorso") then
- char.Archivable = true
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "Sound" then
- v:remove()
- end
- for q,w in pairs(v:GetChildren()) do
- if w.ClassName == "Sound" then
- w:remove()
- end
- end
- end
- local ragdoll = char:Clone()
- ragdoll:findFirstChildOfClass("Humanoid").BreakJointsOnDeath = false
- for i,v in pairs(ragdoll:GetDescendants()) do
- if v.ClassName == "Motor" or v.ClassName == "Motor6D" then
- v:destroy()
- end
- end
- ragdoll:BreakJoints()
- ragdoll:findFirstChildOfClass("Humanoid").Health = 0
- if ragdoll:findFirstChild("Health") then
- if ragdoll:findFirstChild("Health").ClassName == "Script" then
- ragdoll:findFirstChild("Health").Disabled = true
- end
- end
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" or v.ClassName == "MeshPart" then
- v:destroy()
- end
- end
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "Accessory" then
- local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
- if attachment1 then
- for q,w in pairs(char:GetChildren()) do
- if w.ClassName == "Part" or w.ClassName == "MeshPart" then
- local attachment2 = w:findFirstChild(attachment1.Name)
- if attachment2 then
- local hinge = Instance.new("HingeConstraint", v.Handle)
- hinge.Attachment0 = attachment1
- hinge.Attachment1 = attachment2
- hinge.LimitsEnabled = true
- hinge.LowerAngle = 0
- hinge.UpperAngle = 0
- end
- end
- end
- end
- end
- end
- ragdoll.Parent = workspace
- local Humanoid = ragdoll:findFirstChildOfClass("Humanoid")
- Humanoid.PlatformStand = true
- local function makeballconnections(limb, attachementone, attachmenttwo, twistlower, twistupper)
- local connection = Instance.new('BallSocketConstraint', limb)
- connection.LimitsEnabled = true
- connection.Attachment0 = attachementone
- connection.Attachment1 = attachmenttwo
- connection.TwistLimitsEnabled = true
- connection.TwistLowerAngle = twistlower
- connection.TwistUpperAngle = twistupper
- local limbcollider = Instance.new("Part", limb)
- limbcollider.Size = Vector3.new(0.1,1,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- limbcollider:BreakJoints()
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = limb
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
- end
- local function makehingeconnections(limb, attachementone, attachmenttwo, lower, upper)
- local connection = Instance.new('HingeConstraint', limb)
- connection.LimitsEnabled = true
- connection.Attachment0 = attachementone
- connection.Attachment1 = attachmenttwo
- connection.LimitsEnabled = true
- connection.LowerAngle = lower
- connection.UpperAngle = upper
- local limbcollider = Instance.new("Part", limb)
- limbcollider.Size = Vector3.new(0.1,1,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- limbcollider:BreakJoints()
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = limb
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
- end
- local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head)
- HeadAttachment.Position = Vector3.new(0, -0.5, 0)
- if ragdoll.UpperTorso:findFirstChild("NeckAttachment") then
- makehingeconnections(Humanoid.Parent.Head, HeadAttachment, ragdoll.UpperTorso.NeckAttachment, -50, 50)
- end
- makehingeconnections(Humanoid.Parent.LowerTorso, Humanoid.Parent.LowerTorso.WaistRigAttachment, Humanoid.Parent.UpperTorso.WaistRigAttachment, -50, 50)
- makeballconnections(Humanoid.Parent.LeftUpperArm, Humanoid.Parent.LeftUpperArm.LeftShoulderRigAttachment, Humanoid.Parent.UpperTorso.LeftShoulderRigAttachment, -200, 200, 180)
- makehingeconnections(Humanoid.Parent.LeftLowerArm, Humanoid.Parent.LeftLowerArm.LeftElbowRigAttachment, Humanoid.Parent.LeftUpperArm.LeftElbowRigAttachment, 0, -60)
- makehingeconnections(Humanoid.Parent.LeftHand, Humanoid.Parent.LeftHand.LeftWristRigAttachment, Humanoid.Parent.LeftLowerArm.LeftWristRigAttachment, -20, 20)
- --
- makeballconnections(Humanoid.Parent.RightUpperArm, Humanoid.Parent.RightUpperArm.RightShoulderRigAttachment, Humanoid.Parent.UpperTorso.RightShoulderRigAttachment, -200, 200, 180)
- makehingeconnections(Humanoid.Parent.RightLowerArm, Humanoid.Parent.RightLowerArm.RightElbowRigAttachment, Humanoid.Parent.RightUpperArm.RightElbowRigAttachment, 0, -60)
- makehingeconnections(Humanoid.Parent.RightHand, Humanoid.Parent.RightHand.RightWristRigAttachment, Humanoid.Parent.RightLowerArm.RightWristRigAttachment, -20, 20)
- --
- makeballconnections(Humanoid.Parent.RightUpperLeg, Humanoid.Parent.RightUpperLeg.RightHipRigAttachment, Humanoid.Parent.LowerTorso.RightHipRigAttachment, -80, 80, 80)
- makehingeconnections(Humanoid.Parent.RightLowerLeg, Humanoid.Parent.RightLowerLeg.RightKneeRigAttachment, Humanoid.Parent.RightUpperLeg.RightKneeRigAttachment, 0, 60)
- makehingeconnections(Humanoid.Parent.RightFoot, Humanoid.Parent.RightFoot.RightAnkleRigAttachment, Humanoid.Parent.RightLowerLeg.RightAnkleRigAttachment, -20, 20)
- --
- makeballconnections(Humanoid.Parent.LeftUpperLeg, Humanoid.Parent.LeftUpperLeg.LeftHipRigAttachment, Humanoid.Parent.LowerTorso.LeftHipRigAttachment, -80, 80, 80)
- makehingeconnections(Humanoid.Parent.LeftLowerLeg, Humanoid.Parent.LeftLowerLeg.LeftKneeRigAttachment, Humanoid.Parent.LeftUpperLeg.LeftKneeRigAttachment, 0, 60)
- makehingeconnections(Humanoid.Parent.LeftFoot, Humanoid.Parent.LeftFoot.LeftAnkleRigAttachment, Humanoid.Parent.LeftLowerLeg.LeftAnkleRigAttachment, -20, 20)
- for i,v in pairs(Humanoid.Parent:GetChildren()) do
- if v.ClassName == "Accessory" then
- local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
- if attachment1 then
- for q,w in pairs(Humanoid.Parent:GetChildren()) do
- if w.ClassName == "Part" then
- local attachment2 = w:findFirstChild(attachment1.Name)
- if attachment2 then
- local hinge = Instance.new("HingeConstraint", v.Handle)
- hinge.Attachment0 = attachment1
- hinge.Attachment1 = attachment2
- hinge.LimitsEnabled = true
- hinge.LowerAngle = 0
- hinge.UpperAngle = 0
- end
- end
- end
- end
- end
- end
- for i,v in pairs(ragdoll:GetChildren()) do
- for q,w in pairs(v:GetChildren()) do
- if w.ClassName == "Motor6D"--[[ and w.Name ~= "Neck"--]] and w.Name ~= "ouch_weld" then
- w:destroy()
- end
- end
- end
- if ragdoll:findFirstChild("HumanoidRootPart") then
- ragdoll.HumanoidRootPart:destroy()
- end
- if ragdoll:findFirstChildOfClass("Humanoid") then
- ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true
- end
- local function waitfordatmoment()
- wait(0.2)
- local function searchforvelocity(wot)
- for i,v in pairs(wot:GetChildren()) do
- searchforvelocity(v)
- if v.ClassName == "BodyPosition" or v.ClassName == "BodyVelocity" then
- v:destroy()
- end
- end
- end
- searchforvelocity(ragdoll)
- end
- spawn(waitfordatmoment)
- game.Debris:AddItem(ragdoll, 30)
- end
- end
- end
- UIS.InputBegan:Connect(function(input, istyping)
- if not istyping then
- if input.KeyCode == Enum.KeyCode.LeftShift then
- running = true
- end
- if not attack then
- if input.KeyCode == Enum.KeyCode.Q then
- attack = true
- local hb = Instance.new("Part",character)
- game.Debris:AddItem(hb,0.3)
- hb.Size = Vector3.new(5,4,5)
- hb.Transparency = 1
- hb.CanCollide = false
- hb.CFrame = tors.CFrame
- hb.Material = Enum.Material.SmoothPlastic
- local hbweld = Instance.new("Weld",hb)
- hbweld.Part0 = hb
- hbweld.Part1 = tors
- hb.Touched:Connect(function(hit)
- local humn = hit.Parent:FindFirstChildOfClass("Humanoid")
- if humn and humn.Health > 0 then
- if hit:IsDescendantOf(character) then return end
- local suspect = humn.Parent
- if suspect then
- ragdoll(suspect)
- killsound:Play()
- end
- end
- end)
- wait(0.3)
- attack = false
- end
- if input.KeyCode == Enum.KeyCode.E then
- attack = true
- local bill = Instance.new("BillboardGui",hed)
- game.Debris:AddItem(bill,0.914)
- bill.LightInfluence = 1
- bill.Size = UDim2.new(6,0,2,0)
- bill.Active = true
- bill.ClipsDescendants = true
- bill.ResetOnSpawn = false
- bill.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- bill.AlwaysOnTop = true
- bill.StudsOffset = Vector3.new(0,2,0)
- local txt = Instance.new("TextLabel",bill)
- txt.Size = UDim2.new(1, 0, 1, 0)
- txt.BackgroundColor = BrickColor.new("Institutional white")
- txt.BackgroundColor3 = Color3.new(1, 1, 1)
- txt.BackgroundTransparency = 1
- txt.Font = Enum.Font.FredokaOne
- txt.FontSize = Enum.FontSize.Size14
- txt.Text = "AMONG US"
- txt.TextColor = tors.BrickColor
- txt.TextScaled = true
- txt.TextSize = 14
- txt.TextStrokeTransparency = 0
- txt.TextWrap = true
- txt.TextWrapped = true
- spawn(function()
- AMONGUSS:Play()
- wait(0.35)
- DEATH:Play()
- end)
- wait(0.4)
- local sphere = Instance.new("Part",workspace)
- sphere.CFrame = tors.CFrame
- sphere.BrickColor = tors.BrickColor
- sphere.Size = Vector3.new(1,1,1)
- sphere.CanCollide = false
- sphere.Anchored = true
- sphere.Shape = Enum.PartType.Ball
- sphere.TopSurface = Enum.SurfaceType.Smooth
- sphere.BottomSurface = Enum.SurfaceType.Smooth
- sphere.Touched:Connect(function(hit)
- local humn = hit.Parent:FindFirstChildOfClass("Humanoid")
- if humn and humn.Health > 0 then
- if hit:IsDescendantOf(character) then return end
- local suspect = humn.Parent
- if suspect then
- local val = suspect:FindFirstChildOfClass("BinaryStringValue")
- if not val then
- Instance.new("BinaryStringValue",suspect).Name = "nut" --Any name you want
- local dmg = math.random(20,40)
- if humn.Health <= dmg then
- ragdoll(suspect)
- else
- humn:TakeDamage(dmg)
- end
- local bv = Instance.new("BodyVelocity",suspect.HumanoidRootPart)
- game.Debris:AddItem(bv,0.1)
- bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- bv.Velocity = tors.CFrame.lookVector + Vector3.new(0,90,200)
- wait(.1)
- suspect:FindFirstChildOfClass("BinaryStringValue"):Destroy() --I don't know why I put this in here.
- else
- --nothing
- end
- end
- end
- end)
- for i = 1,100,5 do
- wait(1/60)
- sphere.Transparency = sphere.Transparency + 0.05
- sphere.Size = sphere.Size + Vector3.new(2,2,2)
- end
- sphere:Destroy()
- attack = false
- end
- end
- end
- end)
- UIS.InputEnded:Connect(function(input, istyping)
- if not istyping then
- if input.KeyCode == Enum.KeyCode.LeftShift then
- running = false
- end
- end
- end)
- while wait(1/60) do
- if running then
- hum.WalkSpeed = 50
- else
- hum.WalkSpeed = 16
- end
- local torsvelo = (root.Velocity*Vector3.new(1,0,1)).magnitude
- local velderp = root.Velocity.y
- hitfloor,posfloor = castRay(root.Position,(CFrame.new(root.Position,root.Position - Vector3.new(0,1,0))).lookVector,4,character)
- sine = sine + 1
- if not attack and anim == "idle" then
- idle = idle + 1
- elseif not attack and anim ~= "idle" then
- idle = 0
- end
- if idle >= 300 then
- --afk animation
- end
- if torsvelo < 1 then
- anim = "idle"
- llWeld.C0 = llWeld.C0:lerp(CFrame.new(-.5,-2,0) * CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),animSpeed)
- rlWeld.C0 = rlWeld.C0:lerp(CFrame.new(.5,-2,0) * CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),animSpeed)
- rootj.C0 = rootj.C0:lerp(CFrame.new(0,0.05 * math.sin(sine/7.5),0) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(0),math.rad(-180)),animSpeed)
- elseif torsvelo > 1 then
- anim = "walk"
- llWeld.C0 = llWeld.C0:lerp(CFrame.new(-.5,-1.6,1 * math.cos(sine/2.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-70 * math.cos(sine/2.5)),math.rad(0),math.rad(0)),animSpeed)
- rlWeld.C0 = rlWeld.C0:lerp(CFrame.new(.5,-1.6,1 * -math.cos(sine/2.5)) * CFrame.fromEulerAnglesXYZ(math.rad(70 * math.cos(sine/2.5)),math.rad(0),math.rad(0)),animSpeed)
- rootj.C0 = rootj.C0:lerp(CFrame.new(math.sin(sine/12.5)*.1,0.05 * math.sin(sine/5),0) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(0),math.rad(-180)),animSpeed)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement