Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Seat = Instance.new("VehicleSeat")
- Seat.Parent = owner.Character
- Seat.Size = Vector3.new(4,1,10)
- Seat.Position = Vector3.new(10.278,6.5,-8.057)
- Seat.Anchored = true
- Seat.TurnSpeed = 2
- Seat.MaxSpeed = 65
- Seat.TopSurface = Enum.SurfaceType.Smooth
- Seat.BottomSurface = Enum.SurfaceType.Smooth
- wait(0.0001)
- Seat:Sit(owner.Character.Humanoid)
- wait(0.25)
- wheel = Instance.new("Part")
- wheel2 = Instance.new("Part")
- wheel3 = Instance.new("Part")
- wheel4 = Instance.new("Part")
- wheel.RightSurface = Enum.SurfaceType.Hinge
- wheel.Parent = Seat
- wheel2.RightSurface = Enum.SurfaceType.Hinge
- wheel2.Parent = Seat
- wheel3.LeftSurface = Enum.SurfaceType.Hinge
- wheel3.Parent = Seat
- wheel4.LeftSurface = Enum.SurfaceType.Hinge
- wheel4.Parent = Seat
- wheel.Anchored = true
- wheel2.Anchored = true
- wheel3.Anchored = true
- wheel4.Anchored = true
- wheel.Position = Vector3.new(7.278,6.5,-12.057)
- wheel2.Position = Vector3.new(7.278,6.5,-4.057)
- wheel3.Position = Vector3.new(13.278,6.5,-12.057)
- wheel4.Position = Vector3.new(13.278,6.5,-4.057)
- wheel.Shape = Enum.PartType.Cylinder
- wheel2.Shape = Enum.PartType.Cylinder
- wheel3.Shape = Enum.PartType.Cylinder
- wheel4.Shape = Enum.PartType.Cylinder
- wheel.Size = Vector3.new(2, 3, 3)
- wheel2.Size = Vector3.new(2, 3, 3)
- wheel3.Size = Vector3.new(2, 3, 3)
- wheel4.Size = Vector3.new(2, 3, 3)
- wheel:MakeJoints({wheel, Seat})
- wheel2:MakeJoints({wheel2, Seat})
- wheel3:MakeJoints({wheel3, Seat})
- wheel4:MakeJoints({wheel4, Seat})
- wait(0.25)
- Seat.Anchored = false
- wheel.Anchored = false
- wheel2.Anchored = false
- wheel3.Anchored = false
- wheel4.Anchored = false
- local density = 1
- local friction = 1
- local elasticity = 0
- local frictionWeight = 100000000000
- local elasticityWeight = 0
- local physProperties = PhysicalProperties.new(density, friction, elasticity, frictionWeight, elasticityWeight)
- Seat.CustomPhysicalProperties = physProperties
- wheel.CustomPhysicalProperties = physProperties
- wheel2.CustomPhysicalProperties = physProperties
- wheel3.CustomPhysicalProperties = physProperties
- wheel4.CustomPhysicalProperties = physProperties
- function killfunction(part)
- pcall(function()
- local Model = part:FindFirstAncestorOfClass("Model")
- if Model then
- local PC = game:GetService("Players"):GetPlayerFromCharacter(Model)
- if PC then
- if PC ~= owner then
- PC.Character.Humanoid.BreakJointsOnDeath = false
- PC.Character.Humanoid.Health = 0
- local limbcollider = Instance.new("Part", PC.Character: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 = PC.Character:findFirstChild("Right Arm")
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- local limbcollider2 = Instance.new("Part", PC.Character:findFirstChild("Left Arm"))
- limbcollider2.Size = Vector3.new(1.4,1,1)
- limbcollider2.Shape = "Cylinder"
- limbcollider2.Transparency = 1
- limbcollider2.Name = "LimbCollider"
- local limbcolliderweld2 = Instance.new("Weld", limbcollider)
- limbcolliderweld2.Part0 = PC.Character: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", PC.Character:findFirstChild("Right Leg"))
- limbcollider3.Size = Vector3.new(1.3,1,1)
- limbcollider3.Shape = "Cylinder"
- limbcollider3.Transparency = 1
- limbcollider3.Name = "LimbCollider"
- local limbcolliderweld3 = Instance.new("Weld", limbcollider)
- limbcolliderweld3.Part0 = PC.Character:findFirstChild("Right Leg")
- limbcolliderweld3.Part1 = limbcollider3
- limbcolliderweld3.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- local limbcollider4 = Instance.new("Part", PC.Character:findFirstChild("Left Leg"))
- limbcollider4.Size = Vector3.new(1.3,1,1)
- limbcollider4.Shape = "Cylinder"
- limbcollider4.Transparency = 1
- limbcollider4.Name = "LimbCollider"
- local limbcolliderweld4 = Instance.new("Weld", limbcollider)
- limbcolliderweld4.Part0 = PC.Character:findFirstChild("Left Leg")
- limbcolliderweld4.Part1 = limbcollider4
- limbcolliderweld4.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- for i,v in pairs(PC.Character:GetDescendants()) do
- if v:IsA("Motor6D") and v.Parent.Name ~= "HumanoidRootPart" then
- local Socket = Instance.new("BallSocketConstraint")
- local a1 = Instance.new("Attachment")
- local a2 = Instance.new("Attachment")
- a1.Parent = v.Part0
- a2.Parent = v.Part1
- Socket.Parent = v.Parent
- Socket.Attachment0 = a1
- Socket.Attachment1 = a2
- a1.CFrame = v.C0
- a2.CFrame = v.C1
- Socket.LimitsEnabled = true
- Socket.TwistLimitsEnabled = true
- v:Destroy()
- end
- end
- end
- end
- end
- end)
- end
- Seat.Touched:Connect(killfunction)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement