Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wait(0.5)
- local character = game.Players.LocalPlayer.Character
- character.Humanoid.WalkSpeed = 25
- workspace.Gravity = 70--80--90
- local ttw = 0.5
- local frame = 0
- function getdirection (direction,orientation,typ)
- if typ == "Y" then
- local mover = CFrame.new(Vector3.new(0,0,0),direction)
- local x, y, z = mover:ToOrientation()
- local final = math.deg(y) - orientation.Y
- return final
- end
- end
- --print((character.Humanoid.WalkSpeed/16)*0.5)
- local rv = Instance.new("BoolValue",character)
- rv.Name = "RD"
- rv.Value = false
- local children = character:GetChildren()
- for c = 1,#children do
- local child = children[c]
- if child then
- if child.ClassName == "CharacterMesh" or child.ClassName == "Accessory" then
- child:Destroy()
- end
- end
- end
- local leftlegA = Instance.new("Attachment",character["Left Leg"])
- leftlegA.Name = "LLA"
- leftlegA.Position = Vector3.new(0,1,0)
- local leftlegB = Instance.new("Attachment",character.Torso)
- leftlegB.Name = "LLB"
- leftlegB.Position = Vector3.new(-0.5,-1,0)
- local phylleg = Instance.new("BallSocketConstraint",character.Torso)
- phylleg.Name = "LegJoint"
- phylleg.Attachment0 = leftlegA
- phylleg.Attachment1 = leftlegB
- character.Torso["Left Hip"].Part1 = nil
- local rightlegA = Instance.new("Attachment",character["Right Leg"])
- rightlegA.Name = "LLA"
- rightlegA.Position = Vector3.new(0,1,0)
- local rightlegB = Instance.new("Attachment",character.Torso)
- rightlegB.Name = "LLB"
- rightlegB.Position = Vector3.new(0.5,-1,0)
- local phylleg = Instance.new("BallSocketConstraint",character.Torso)
- phylleg.Name = "LegJoint"
- phylleg.Attachment0 = rightlegA
- phylleg.Attachment1 = rightlegB
- character.Torso["Right Hip"].Part1 = nil
- local leftarmA = Instance.new("Attachment",character["Left Arm"])
- leftarmA.Name = "LLA"
- leftarmA.Position = Vector3.new(0,0.5,0)
- local leftarmB = Instance.new("Attachment",character.Torso)
- leftarmB.Name = "LLB"
- leftarmB.Position = Vector3.new(-1.5,0.5,0)
- local phylarm = Instance.new("BallSocketConstraint",character.Torso)
- phylarm.Name = "armJoint"
- phylarm.Attachment0 = leftarmA
- phylarm.Attachment1 = leftarmB
- character.Torso["Left Shoulder"].Part1 = nil
- local rightarmA = Instance.new("Attachment",character["Right Arm"])
- rightarmA.Name = "LLA"
- rightarmA.Position = Vector3.new(0,0.5,0)
- local rightarmB = Instance.new("Attachment",character.Torso)
- rightarmB.Name = "LLB"
- rightarmB.Position = Vector3.new(1.5,0.5,0)
- local phylarm = Instance.new("BallSocketConstraint",character.Torso)
- phylarm.Name = "armJoint"
- phylarm.Attachment0 = rightarmA
- phylarm.Attachment1 = rightarmB
- character.Torso["Right Shoulder"].Part1 = nil
- local llb = Instance.new("Part",character["Left Leg"])
- llb.Size = character["Left Leg"].Size
- llb.CFrame = character["Left Leg"].CFrame
- llb.Name = "Collision"
- llb.Transparency = 1
- local llbweld = Instance.new("WeldConstraint",llb)
- llbweld.Part0 = llb
- llbweld.Part1 = character["Left Leg"]
- local rlb = Instance.new("Part",character["Right Leg"])
- rlb.Size = character["Right Leg"].Size
- rlb.CFrame = character["Right Leg"].CFrame
- rlb.Name = "Collision"
- rlb.Transparency = 1
- local rlbweld = Instance.new("WeldConstraint",rlb)
- rlbweld.Part0 = rlb
- rlbweld.Part1 = character["Right Leg"]
- local lab = Instance.new("Part",character["Left Arm"])
- lab.Size = character["Left Arm"].Size
- lab.CFrame = character["Left Arm"].CFrame
- lab.Name = "Collision"
- lab.Transparency = 1
- local labweld = Instance.new("WeldConstraint",lab)
- labweld.Part0 = lab
- labweld.Part1 = character["Left Arm"]
- local rab = Instance.new("Part",character["Right Arm"])
- rab.Size = character["Right Arm"].Size
- rab.CFrame = character["Right Arm"].CFrame
- rab.Name = "Collision"
- rab.Transparency = 1
- local rabweld = Instance.new("WeldConstraint",rab)
- rabweld.Part0 = rab
- rabweld.Part1 = character["Right Arm"]
- character.Humanoid.PlatformStand = true
- local nocll = Instance.new("NoCollisionConstraint",character["Left Leg"])
- nocll.Part0 = llb
- nocll.Part1 = character.Torso
- local nocrl = Instance.new("NoCollisionConstraint",character["Right Leg"])
- nocrl.Part0 = rlb
- nocrl.Part1 = character.Torso
- local nocla = Instance.new("NoCollisionConstraint",character["Left Arm"])
- nocla.Part0 = lab
- nocla.Part1 = character.Torso
- local nocra = Instance.new("NoCollisionConstraint",character["Right Arm"])
- nocra.Part0 = rab
- nocra.Part1 = character.Torso
- local lrl = Instance.new("NoCollisionConstraint",character.Torso)
- lrl.Part0 = rlb
- lrl.Part1 = llb
- character.Humanoid.WalkSpeed = 20
- local gy = Instance.new("BodyGyro",character.Torso)
- gy.MaxTorque = Vector3.new(40000000, 40000000, 40000000)
- gy.D = 50
- gy.P = 500
- local ll = Instance.new("Attachment",character.Torso)
- ll.Name = "LA"
- local rl = Instance.new("Attachment",character.Torso)
- rl.Name = "RA"
- local llc = Instance.new("Attachment",character["Left Leg"])
- llc.Name = "LCA"
- local rlc = Instance.new("Attachment",character["Right Leg"])
- rlc.Name = "RCA"
- local lj = Instance.new("AlignOrientation",character["Left Leg"])
- lj.Name = "LO"
- lj.Attachment0 = llc
- lj.Attachment1 = ll
- lj.MaxTorque = 1000000000000000000
- lj.Responsiveness = 45
- local rj = Instance.new("AlignOrientation",character["Right Leg"])
- rj.Name = "RO"
- rj.Attachment0 = rlc
- rj.Attachment1 = rl
- rj.MaxTorque = 1000000000000000000
- rj.Responsiveness = 45
- local frame = 0
- local moveval = 0
- local vel = Instance.new("BodyVelocity",character.Torso)
- vel.MaxForce = Vector3.new(40000000,0,40000000)
- local force = Instance.new("BodyForce",character.HumanoidRootPart)
- force.Force = Vector3.new(0,0,0)
- function getmass ()
- local totalmass = 0
- local children = character:GetDescendants()
- for dec = 1,#children do
- local child = children[dec]
- if string.match(child.ClassName , "Part") then
- totalmass = totalmass + child:GetMass()
- end
- end
- return totalmass
- end
- local derb = game:GetService("Debris")
- local landed = true
- local mv = true
- game:GetService("RunService").RenderStepped:Connect(function()
- gy.CFrame = workspace.CurrentCamera.CFrame
- --ll.CFrame = CFrame.Angles(0,math.rad(-character.Torso.Orientation.Y),0) * character.Torso["Left Hip"].C0
- --rl.CFrame = CFrame.Angles(0,math.rad(-character.Torso.Orientation.Y),0) * character.Torso["Right Hip"].C0
- local mass = getmass()
- vel.Velocity = character.Humanoid.MoveDirection * character.Humanoid.WalkSpeed
- force.Force = ((character.Humanoid.MoveDirection * character.Humanoid.WalkSpeed)*(mass))*moveval --25
- if rv.Value == true or landed == false then
- rj.MaxTorque = 0
- lj.MaxTorque = 0
- gy.MaxTorque = Vector3.new(0,0,0)
- vel.MaxForce = Vector3.new(0,0,0)
- if mv == true then
- moveval = 1
- else
- moveval = 0
- end
- else
- rj.MaxTorque = 10000000000000000000
- lj.MaxTorque = 10000000000000000000
- gy.MaxTorque = Vector3.new(40000000, 40000000, 40000000)
- vel.MaxForce = Vector3.new(40000000,0,40000000)
- moveval = 0
- end
- if character.Humanoid.Health == 0 then
- script:Destroy()
- end
- if math.abs(character.Humanoid.MoveDirection.Magnitude) ~= 0 then
- ttw = (1.1) - ((character.Humanoid.WalkSpeed*2)*(0.0625*0.35)) --0.65
- local direction = getdirection(character.Humanoid.MoveDirection , character.Torso.Orientation,"Y")
- local dir = 0
- if frame == 0 then
- character.Torso.LA.CFrame = CFrame.Angles(math.rad(-character.Torso.Orientation.X),math.rad(--[[direction]]0),0) * CFrame.Angles(math.rad(40),0,0)-- * CFrame.Angles(0,math.rad(-direction)*dir,0)
- character.Torso.RA.CFrame = CFrame.Angles(math.rad(-character.Torso.Orientation.X),math.rad(--[[direction]]0),0) * CFrame.Angles(math.rad(-40),0,0)-- * CFrame.Angles(0,math.rad(-direction)*dir,0)
- elseif frame ~= 0 then
- character.Torso.LA.CFrame = CFrame.Angles(math.rad(-character.Torso.Orientation.X),math.rad(--[[direction]]0),0) * CFrame.Angles(math.rad(-40),0,0)-- * CFrame.Angles(0,math.rad(-direction)*dir,0)
- character.Torso.RA.CFrame = CFrame.Angles(math.rad(-character.Torso.Orientation.X),math.rad(--[[direction]]0),0) * CFrame.Angles(math.rad(40),0,0)-- * CFrame.Angles(0,math.rad(-direction)*dir,0)
- end
- else
- character.Torso.LA.CFrame = CFrame.Angles(math.rad(-character.Torso.Orientation.X),0,0)
- character.Torso.RA.CFrame = CFrame.Angles(math.rad(-character.Torso.Orientation.X),0,0)
- end
- local ray = Ray.new(character.Torso.Position , -Vector3.new(0,3.3,0))---Vector3.new(-character.Humanoid.MoveDirection.X*1.25,character.Hight.Value,-character.Humanoid.MoveDirection.Z*1.25)
- local h , pos = workspace:FindPartOnRay(ray , character , false , true)
- if h and h.Name ~= "Handle" then
- landed = true
- end
- if character.Humanoid.Jump == true then
- if (h and h.Name ~= "Handle" and h.CanCollide == true) or character:FindFirstChild("water") then
- landed = false
- local jump = Instance.new("BodyVelocity",character.Head)
- if character:FindFirstChild("water") then
- jump.Velocity = Vector3.new(0,40--[[*0.6]],0)
- jump.MaxForce = Vector3.new(0,5000,0)
- else
- jump.Velocity = Vector3.new(0,40,0)
- jump.MaxForce = Vector3.new(0,9999999,0)
- end
- jump.Name = "JMP"
- jump.P = 1250
- derb:AddItem(jump,0.1)
- --[[if character:FindFirstChild("water") then
- wait(2)
- end]]--
- landed = false
- wait(0.25)
- landed = false
- end
- end
- end)
- while wait(ttw) do
- if frame == 0 then
- frame = 1
- elseif frame ~= 0 then
- frame = 0
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement