Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char = owner.Character
- bg = Instance.new("BodyGyro",char["Right Arm"])
- bg.MaxTorque = Vector3.new(0,0,0)
- bg.P = 50000
- bg2 = Instance.new("BodyGyro",char.Head)
- bg2.MaxTorque = Vector3.new(0,0,0)
- bg2.P = 50000
- local limbcollider = Instance.new("Part", char:findFirstChild("Right Arm"))
- limbcollider.Size = Vector3.new(1.4,1,1)
- limbcollider.Transparency = 1
- limbcollider.Name = "LimbCollider"
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = char:findFirstChild("Right Arm")
- limbcolliderweld.Part1 = limbcollider
- limbcollider.Shape = "Cylinder"
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- local limbcollider2 = Instance.new("Part", char:findFirstChild("Left Arm"))
- limbcollider2.Size = Vector3.new(1.4,1,1)
- limbcollider2.Transparency = 1
- limbcollider2.Name = "LimbCollider"
- limbcollider2.Shape = "Cylinder"
- local limbcolliderweld2 = Instance.new("Weld", limbcollider2)
- limbcolliderweld2.Part0 = char:findFirstChild("Left Arm")
- limbcolliderweld2.Part1 = limbcollider2
- limbcolliderweld2.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- local limbcollider3 = Instance.new("Part", char.Head)
- limbcollider3.Size = Vector3.new(0.75,0.75,0.75)
- limbcollider3.Shape = "Ball"
- limbcollider3.Transparency = 1
- limbcollider3.Name = "LimbCollider"
- local limbcolliderweld = Instance.new("Weld", limbcollider3)
- limbcolliderweld.Part0 = char.Head
- limbcolliderweld.Part1 = limbcollider3
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- char.Humanoid.RequiresNeck = false
- for i,v in pairs(char:GetDescendants()) do
- pcall(function()
- if v:IsA("Motor6D") then
- if v.Name ~= "RootJoint" then
- v.Enabled = false
- end
- end
- end)
- end
- function the()
- local Socket = Instance.new("BallSocketConstraint")
- local a1 = Instance.new("Attachment")
- local a2 = Instance.new("Attachment")
- a1.Parent = char["Left Arm"]
- a2.Parent = char.Torso
- Socket.Parent = char["Left Arm"]
- Socket.Attachment0 = a1
- Socket.Attachment1 = a2
- a1.WorldCFrame = a1.Parent.CFrame * CFrame.new(0,0.5,0)
- a2.WorldCFrame = a2.Parent.CFrame * CFrame.new(-1.5,0.5,0)
- end
- function the2()
- local Socket = Instance.new("BallSocketConstraint")
- local a1 = Instance.new("Attachment")
- local a2 = Instance.new("Attachment")
- a1.Parent = char["Right Arm"]
- a2.Parent = char.Torso
- Socket.Parent = char["Right Arm"]
- Socket.Attachment0 = a1
- Socket.Attachment1 = a2
- a1.WorldCFrame = a1.Parent.CFrame * CFrame.new(0,0.5,0)
- a2.WorldCFrame = a2.Parent.CFrame * CFrame.new(1.5,0.5,0)
- end
- function the3()
- local Socket = Instance.new("BallSocketConstraint")
- local a1 = Instance.new("Attachment")
- local a2 = Instance.new("Attachment")
- a1.Parent = char["Left Leg"]
- a2.Parent = char.Torso
- Socket.Parent = char["Left Leg"]
- Socket.Attachment0 = a1
- Socket.Attachment1 = a2
- a1.WorldCFrame = a1.Parent.CFrame * CFrame.new(0,1,0)
- a2.WorldCFrame = a2.Parent.CFrame * CFrame.new(-0.5,-1,0)
- end
- function the4()
- local Socket = Instance.new("BallSocketConstraint")
- local a1 = Instance.new("Attachment")
- local a2 = Instance.new("Attachment")
- a1.Parent = char["Right Leg"]
- a2.Parent = char.Torso
- Socket.Parent = char["Right Leg"]
- Socket.Attachment0 = a1
- Socket.Attachment1 = a2
- a1.WorldCFrame = a1.Parent.CFrame * CFrame.new(0,1,0)
- a2.WorldCFrame = a2.Parent.CFrame * CFrame.new(0.5,-1,0)
- end
- the()
- the2()
- the3()
- the4()
- function s()
- local Socket = Instance.new("BallSocketConstraint")
- local a1 = Instance.new("Attachment")
- local a2 = Instance.new("Attachment")
- a1.Parent = char.Head
- a2.Parent = char.Torso
- Socket.Parent = char.Head
- Socket.Attachment0 = a1
- Socket.Attachment1 = a2
- a1.WorldCFrame = a1.Parent.CFrame * CFrame.new(0,-0.5,0)
- a2.WorldCFrame = a2.Parent.CFrame * CFrame.new(0,1,0)
- end
- s()
- local density = 1
- local friction = 1
- local elasticity = 0
- local frictionWeight = 100000000000
- local elasticityWeight = 10000000000
- local physProperties = PhysicalProperties.new(density, friction, elasticity, frictionWeight, elasticityWeight)
- for i,v in pairs(owner.Character:GetDescendants()) do
- pcall(function()
- v.CustomPhysicalProperties = physProperties
- end)
- end
- for i,v in pairs(owner.Character:GetDescendants()) do
- if v:IsA("Part") then
- local nocollide = Instance.new("NoCollisionConstraint",owner.Character.HumanoidRootPart)
- nocollide.Part0 = v
- nocollide.Part1 = owner.Character.HumanoidRootPart
- end
- end
- on = false
- nocollide2 = Instance.new("NoCollisionConstraint",owner.Character.Torso)
- nocollide2.Part0 = limbcollider
- nocollide2.Part1 = owner.Character.Torso
- nocollide2.Enabled = false
- owner.Character.ChildAdded:Connect(function(v)
- if v:IsA("Tool") then
- on = true
- nocollide2.Enabled = true
- end
- end)
- owner.Character.ChildRemoved:Connect(function(v)
- if v:IsA("Tool") then
- on = false
- nocollide2.Enabled = false
- end
- end)
- e = Instance.new("RemoteEvent",owner.Character)
- NLS([[
- e = script.Parent
- game:GetService("RunService").RenderStepped:Connect(function()
- e:FireServer(workspace.CurrentCamera.CFrame)
- end)
- ]],e)
- e.OnServerEvent:Connect(function(_,camcf)
- bg2.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
- bg2.CFrame = bg2.CFrame:Lerp(camcf.Rotation,0.1)
- if on then
- bg.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
- bg.CFrame = bg.CFrame:Lerp(camcf * CFrame.Angles(math.rad(90),0,0),0.1)
- elseif not on then
- bg.MaxTorque = Vector3.new(0,0,0)
- end
- end)
- while task.wait() do
- if owner.Character.Humanoid.MoveDirection ~= Vector3.new(0,0,0) then
- owner.Character["Left Leg"]:ApplyAngularImpulse(owner.Character.Humanoid.MoveDirection)
- owner.Character["Right Leg"]:ApplyAngularImpulse(owner.Character.Humanoid.MoveDirection)
- end
- end
Add Comment
Please, Sign In to add comment