Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script.Parent = owner.Character
- Seat = Instance.new("VehicleSeat")
- Seat.Parent = script
- Seat.Size = Vector3.new(4,1,10)
- Seat.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,15,-8.057)
- Seat.TopSurface = Enum.SurfaceType.Smooth
- Seat.BottomSurface = Enum.SurfaceType.Smooth
- wheel = Instance.new("Part")
- wheel.Parent = Seat
- wheel.Size = Vector3.new(1,5,3)
- Seat.Anchored = true
- wheel.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(-3.739,6.5,-7.25)
- wheel.TopSurface = Enum.SurfaceType.Smooth
- wheel.BottomSurface = Enum.SurfaceType.Smooth
- wheel2 = Instance.new("Part")
- wheel2.Parent = Seat
- wheel2.Size = Vector3.new(1,5,3)
- wheel2.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(3.739,6.5,-7.25)
- wheel2.TopSurface = Enum.SurfaceType.Smooth
- wheel2.BottomSurface = Enum.SurfaceType.Smooth
- local attachment03 = Instance.new("Attachment")
- attachment03.Parent = wheel
- local attachment13 = Instance.new("Attachment")
- attachment13.Parent = Seat
- alignposition3 = Instance.new("HingeConstraint")
- alignposition3.Parent = Seat
- alignposition3.ActuatorType = "Motor"
- alignposition3.MotorMaxAcceleration = 10000000
- alignposition3.MotorMaxTorque = 1000000000
- alignposition3.Name = "Hinge1"
- alignposition3.Attachment0 = attachment03
- alignposition3.Attachment1 = attachment13
- attachment13.WorldCFrame = attachment13.Parent.CFrame * CFrame.new(-3.739,-5,0)* CFrame.Angles(0,0,0)
- attachment03.WorldCFrame = attachment03.Parent.CFrame * CFrame.new(3.739,0,0)* CFrame.Angles(0,0,0)
- local attachment023 = Instance.new("Attachment")
- attachment023.Parent = wheel2
- local attachment123 = Instance.new("Attachment")
- attachment123.Parent = Seat
- alignposition23 = Instance.new("HingeConstraint")
- alignposition23.Parent = Seat
- alignposition23.ActuatorType = "Motor"
- alignposition23.MotorMaxAcceleration = 10000000
- alignposition23.MotorMaxTorque = 1000000000
- alignposition23.Name = "Hinge2"
- alignposition23.Attachment0 = attachment023
- alignposition23.Attachment1 = attachment123
- attachment123.WorldCFrame = attachment123.Parent.CFrame * CFrame.new(3.739,-5,0)
- attachment023.WorldCFrame = attachment023.Parent.CFrame * CFrame.new(-3.739,0,0)
- wheel3 = Instance.new("Part")
- wheel3.Parent = Seat
- wheel3.Size = Vector3.new(1,5,3)
- wheel3.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(-3.739,6.5,-7.25)
- wheel3.TopSurface = Enum.SurfaceType.Smooth
- wheel3.BottomSurface = Enum.SurfaceType.Smooth
- wheel4 = Instance.new("Part")
- wheel4.Parent = Seat
- wheel4.Size = Vector3.new(1,5,3)
- wheel4.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(3.739,6.5,-7.25)
- wheel4.TopSurface = Enum.SurfaceType.Smooth
- wheel4.BottomSurface = Enum.SurfaceType.Smooth
- local attachment031 = Instance.new("Attachment")
- attachment031.Parent = wheel3
- local attachment131 = Instance.new("Attachment")
- attachment131.Parent = wheel
- alignposition31 = Instance.new("HingeConstraint")
- alignposition31.Parent = Seat
- alignposition31.ActuatorType = "Motor"
- alignposition31.MotorMaxAcceleration = 10000000
- alignposition31.MotorMaxTorque = 1000000000
- alignposition31.Attachment0 = attachment031
- alignposition31.Attachment1 = attachment131
- attachment131.WorldCFrame = attachment131.Parent.CFrame * CFrame.new(0,-8,0)* CFrame.Angles(0,0,0)
- attachment031.WorldCFrame = attachment031.Parent.CFrame * CFrame.new(0,4,0)* CFrame.Angles(0,0,0)
- local attachment0231 = Instance.new("Attachment")
- attachment0231.Parent = wheel4
- local attachment1231 = Instance.new("Attachment")
- attachment1231.Parent = wheel2
- alignposition231 = Instance.new("HingeConstraint")
- alignposition231.Parent = Seat
- alignposition231.ActuatorType = "Motor"
- alignposition231.MotorMaxAcceleration = 10000000
- alignposition231.MotorMaxTorque = 1000000000
- alignposition231.Attachment0 = attachment0231
- alignposition231.Attachment1 = attachment1231
- attachment1231.WorldCFrame = attachment1231.Parent.CFrame * CFrame.new(0,-8,0)
- attachment0231.WorldCFrame = attachment0231.Parent.CFrame * CFrame.new(0,4,0)
- local function carMove(property)
- if property == "Throttle" then
- if Seat.Throttle == 1 then
- alignposition23.AngularVelocity = 1.75
- alignposition3.AngularVelocity = -1.25
- alignposition231.AngularVelocity = -1.25
- alignposition31.AngularVelocity = 1.25
- elseif Seat.Throttle == -1 then
- alignposition23.AngularVelocity = -1.25
- alignposition3.AngularVelocity = 1.75
- alignposition231.AngularVelocity = 1.25
- alignposition31.AngularVelocity = -1.25
- elseif Seat.Throttle == 0 then
- alignposition23.AngularVelocity = 0
- alignposition3.AngularVelocity = 0
- alignposition231.AngularVelocity = 0
- alignposition31.AngularVelocity = 0
- end
- end
- end
- Seat.Changed:Connect(carMove)
- local hatweld = Instance.new("NoCollisionConstraint", wheel)
- hatweld.Part0 = wheel
- hatweld.Part1 = wheel3
- local hatweld2 = Instance.new("NoCollisionConstraint", wheel2)
- hatweld2.Part0 = wheel2
- hatweld2.Part1 = wheel4
- wait(0.5)
- local xzGyro = Instance.new("BodyGyro")
- xzGyro.MaxTorque = Vector3.new(10000000000,0,10000000000)
- xzGyro.P = 1000000000
- xzGyro.D = 100000
- xzGyro.Parent = Seat
- Seat.Anchored = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement