Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- seat = Instance.new("VehicleSeat", script)
- seat.Size = Vector3.new(3,1,7.5)
- seat.CFrame = CFrame.new(10,10,10)
- seat.Anchored = true
- seat2 = Instance.new("Seat", script)
- seat2.Size = Vector3.new(1.5,1,3)
- seat2.CFrame = CFrame.new(10,10,13.5)
- seat3 = Instance.new("Seat", script)
- seat3.Size = Vector3.new(1.5,1,3)
- seat3.CFrame = CFrame.new(10,10,13.5)
- wheel = Instance.new("Part")
- wheel.Parent = seat
- wheel.Size = Vector3.new(2,4,4)
- wheel.TopSurface = Enum.SurfaceType.Smooth
- wheel.BottomSurface = Enum.SurfaceType.Smooth
- wheel2 = Instance.new("Part")
- wheel2.Parent = seat
- wheel2.Size = Vector3.new(2,4,4)
- wheel2.TopSurface = Enum.SurfaceType.Smooth
- wheel2.BottomSurface = Enum.SurfaceType.Smooth
- wheel3 = Instance.new("Part")
- wheel3.Parent = seat
- wheel3.Size = Vector3.new(2,4,4)
- wheel3.TopSurface = Enum.SurfaceType.Smooth
- wheel3.BottomSurface = Enum.SurfaceType.Smooth
- wheel4 = Instance.new("Part")
- wheel4.Parent = seat
- wheel4.Size = Vector3.new(2,4,4)
- wheel4.TopSurface = Enum.SurfaceType.Smooth
- wheel4.BottomSurface = Enum.SurfaceType.Smooth
- wheel.Shape = Enum.PartType.Cylinder
- wheel2.Shape = Enum.PartType.Cylinder
- wheel3.Shape = Enum.PartType.Cylinder
- wheel4.Shape = Enum.PartType.Cylinder
- local a = Instance.new("Part", seat)
- local a2 = Instance.new("Part", seat)
- a.Transparency = 1
- a2.Transparency = 1
- a.Size = Vector3.new(1,1,1)
- a2.Size = Vector3.new(1,1,1)
- local at0 = Instance.new("Attachment" , a)
- at0.CFrame = CFrame.Angles(0,0,math.rad(-90))
- local at1 = Instance.new("Attachment" , a2)
- at1.CFrame = CFrame.Angles(0,0,math.rad(-90))
- local spring = Instance.new("SpringConstraint" , a)
- spring.Attachment0 = at0
- spring.Attachment1 = at1
- spring.Stiffness = 30000
- spring.FreeLength = 2.2
- spring.Enabled = true
- spring.Visible = true
- spring.Damping = 400
- local prism = Instance.new("PrismaticConstraint" , a)
- prism.Attachment0 = at0
- prism.Attachment1 = at1
- prism.LimitsEnabled = true
- prism.LowerLimit = -2
- prism.UpperLimit = 2
- local a3 = Instance.new("Part", seat)
- local a4 = Instance.new("Part", seat)
- a3.Transparency = 1
- a4.Transparency = 1
- a3.Size = Vector3.new(1,1,1)
- a4.Size = Vector3.new(1,1,1)
- local at2 = Instance.new("Attachment" , a3)
- at2.CFrame = CFrame.Angles(0,0,math.rad(-90))
- local at3 = Instance.new("Attachment" , a4)
- at3.CFrame = CFrame.Angles(0,0,math.rad(-90))
- local spring2 = Instance.new("SpringConstraint" , a3)
- spring2.Attachment0 = at2
- spring2.Attachment1 = at3
- spring2.Stiffness = 30000
- spring2.FreeLength = 2.2
- spring2.Enabled = true
- spring2.Visible = true
- spring2.Damping = 400
- local prism2 = Instance.new("PrismaticConstraint" , a3)
- prism2.Attachment0 = at2
- prism2.Attachment1 = at3
- prism2.LimitsEnabled = true
- prism2.LowerLimit = -2
- prism2.UpperLimit = 2
- local a5 = Instance.new("Part", seat)
- local a6 = Instance.new("Part", seat)
- a5.Transparency = 1
- a6.Transparency = 1
- a5.Size = Vector3.new(1,1,1)
- a6.Size = Vector3.new(1,1,1)
- local blockweld3 = Instance.new("Weld", seat)
- blockweld3.Part0 = a5
- blockweld3.Part1 = seat
- blockweld3.C0 = CFrame.new(-3.5, -2, -5.75)
- local blockweld = Instance.new("Weld", seat)
- blockweld.Part0 = seat2
- blockweld.Part1 = seat
- blockweld.C0 = CFrame.new(-0.75,0,-4)
- local blockweld2 = Instance.new("Weld", seat)
- blockweld2.Part0 = seat3
- blockweld2.Part1 = seat
- blockweld2.C0 = CFrame.new(0.75,0,-4)
- local at4 = Instance.new("Attachment" , a5)
- at4.CFrame = CFrame.Angles(0,0,math.rad(-90))
- local at5 = Instance.new("Attachment" , a6)
- at5.CFrame = CFrame.Angles(0,0,math.rad(-90))
- local spring3 = Instance.new("SpringConstraint" , a5)
- spring3.Attachment0 = at4
- spring3.Attachment1 = at5
- spring3.Stiffness = 30000
- spring3.FreeLength = 2.2
- spring3.Enabled = true
- spring3.Visible = true
- spring3.Damping = 400
- local prism3 = Instance.new("PrismaticConstraint" , a5)
- prism3.Attachment0 = at4
- prism3.Attachment1 = at5
- prism3.LimitsEnabled = true
- prism3.LowerLimit = -2
- prism3.UpperLimit = 2
- local a7 = Instance.new("Part", seat)
- local a8 = Instance.new("Part", seat)
- a7.Transparency = 1
- a8.Transparency = 1
- a7.Size = Vector3.new(1,1,1)
- a8.Size = Vector3.new(1,1,1)
- local blockweld4 = Instance.new("Weld", seat)
- blockweld4.Part0 = a7
- blockweld4.Part1 = seat
- blockweld4.C0 = CFrame.new(3.5, -2, -5.75)
- local at6 = Instance.new("Attachment" , a7)
- at6.CFrame = CFrame.Angles(0,0,math.rad(-90))
- local at7 = Instance.new("Attachment" , a8)
- at7.CFrame = CFrame.Angles(0,0,math.rad(-90))
- local spring4 = Instance.new("SpringConstraint" , a7)
- spring4.Attachment0 = at6
- spring4.Attachment1 = at7
- spring4.Stiffness = 30000
- spring4.FreeLength = 2.2
- spring4.Enabled = true
- spring4.Visible = true
- spring4.Damping = 400
- local prism4 = Instance.new("PrismaticConstraint" , a7)
- prism4.Attachment0 = at6
- prism4.Attachment1 = at7
- prism4.LimitsEnabled = true
- prism4.LowerLimit = -2
- prism4.UpperLimit = 2
- local attachment031 = Instance.new("Attachment")
- attachment031.Parent = wheel
- local attachment131 = Instance.new("Attachment")
- attachment131.Parent = a2
- alignposition31 = Instance.new("HingeConstraint")
- alignposition31.Parent = a2
- alignposition31.ActuatorType = Enum.ActuatorType.None
- alignposition31.Attachment0 = attachment031
- alignposition31.Attachment1 = attachment131
- attachment131.WorldCFrame = attachment131.Parent.CFrame * CFrame.new(0,0,0)
- wheel.CFrame = a2.CFrame
- local attachment0231 = Instance.new("Attachment")
- attachment0231.Parent = wheel2
- local attachment1231 = Instance.new("Attachment")
- attachment1231.Parent = a4
- alignposition231 = Instance.new("HingeConstraint")
- alignposition231.Parent = a4
- alignposition231.ActuatorType = Enum.ActuatorType.None
- alignposition231.Attachment0 = attachment0231
- alignposition231.Attachment1 = attachment1231
- attachment1231.WorldCFrame = attachment1231.Parent.CFrame * CFrame.new(0,0,0)
- wheel2.CFrame = a4.CFrame
- local attachment03 = Instance.new("Attachment")
- attachment03.Parent = wheel3
- local attachment13 = Instance.new("Attachment")
- attachment13.Parent = a6
- alignposition3 = Instance.new("HingeConstraint")
- alignposition3.Parent = a6
- alignposition3.ActuatorType = "Motor"
- alignposition3.MotorMaxAcceleration = 10000000
- alignposition3.MotorMaxTorque = 10000000
- alignposition3.Name = "Hinge1"
- alignposition3.Attachment0 = attachment03
- alignposition3.Attachment1 = attachment13
- attachment13.WorldCFrame = attachment13.Parent.CFrame * CFrame.new(0,0,0)
- wheel3.CFrame = a6.CFrame
- local attachment023 = Instance.new("Attachment")
- attachment023.Parent = wheel4
- local attachment123 = Instance.new("Attachment")
- attachment123.Parent = a8
- alignposition23 = Instance.new("HingeConstraint")
- alignposition23.Parent = a8
- alignposition23.ActuatorType = "Motor"
- alignposition23.MotorMaxAcceleration = 10000000
- alignposition23.MotorMaxTorque = 10000000
- alignposition23.Name = "Hinge2"
- alignposition23.Attachment0 = attachment023
- alignposition23.Attachment1 = attachment123
- wheel4.CFrame = a8.CFrame
- attachment123.WorldCFrame = attachment123.Parent.CFrame * CFrame.new(0,0,0)
- local attachmentlol = Instance.new("Attachment")
- attachmentlol.Parent = seat
- attachmentlol.WorldCFrame = attachmentlol.Parent.CFrame * CFrame.new(3.5, 2, -3.75) * CFrame.Angles(0,0,math.rad(-90))
- local attachmentlol2 = Instance.new("Attachment")
- attachmentlol2.Parent = seat
- attachmentlol2.WorldCFrame = attachmentlol2.Parent.CFrame * CFrame.new(-3.5, 2, -3.75) * CFrame.Angles(0,0,math.rad(-90))
- alignposition = Instance.new("HingeConstraint")
- alignposition.Parent = seat
- alignposition.ActuatorType = "Servo"
- alignposition.TargetAngle = 0
- alignposition.Name = "Hinge4"
- alignposition.ServoMaxTorque = 100000000000
- alignposition.AngularSpeed = 10000000
- alignposition.Attachment0 = attachmentlol
- alignposition.Attachment1 = at0
- alignposition2 = Instance.new("HingeConstraint")
- alignposition2.Parent = seat
- alignposition2.ActuatorType = "Servo"
- alignposition2.TargetAngle = 0
- alignposition2.Name = "Hinge4"
- alignposition2.ServoMaxTorque = 100000000000
- alignposition2.AngularSpeed = 10000000
- alignposition2.Attachment0 = attachmentlol2
- alignposition2.Attachment1 = at2
- a.CanCollide = false
- a2.CanCollide = false
- a3.CanCollide = false
- a4.CanCollide = false
- a5.CanCollide = false
- a6.CanCollide = false
- a7.CanCollide = false
- a8.CanCollide = false
- Mesh = Instance.new("SpecialMesh")
- Mesh.Parent = wheel
- Mesh.MeshId = "http://www.roblox.com/asset/?id=5738250964"
- Mesh.TextureId = "http://www.roblox.com/asset/?id=5738250999"
- Mesh2 = Instance.new("SpecialMesh")
- Mesh2.Parent = wheel2
- Mesh2.MeshId = "http://www.roblox.com/asset/?id=5738250964"
- Mesh2.TextureId = "http://www.roblox.com/asset/?id=5738250999"
- Mesh3 = Instance.new("SpecialMesh")
- Mesh3.Parent = wheel3
- Mesh3.MeshId = "http://www.roblox.com/asset/?id=5738250964"
- Mesh3.TextureId = "http://www.roblox.com/asset/?id=5738250999"
- Mesh4 = Instance.new("SpecialMesh")
- Mesh4.Parent = wheel4
- Mesh4.MeshId = "http://www.roblox.com/asset/?id=5738250964"
- Mesh4.TextureId = "http://www.roblox.com/asset/?id=5738250999"
- speed = 20
- on = false
- local function carMove(property)
- if property == "Throttle" then
- alignposition23.AngularVelocity = seat.Throttle * speed
- alignposition3.AngularVelocity = seat.Throttle * speed
- elseif property == "Steer" then
- alignposition.TargetAngle = 27.5 * seat.Steer
- alignposition2.TargetAngle = 27.5 * seat.Steer
- end
- end
- seat.Changed:Connect(carMove)
- wait(0.1)
- seat:Sit(owner.Character.Humanoid)
- local density = 1
- local friction = 5
- local elasticity = 0
- local frictionWeight = 100000000000
- local elasticityWeight = 0
- local physProperties = PhysicalProperties.new(density, friction, elasticity, frictionWeight, elasticityWeight)
- wheel.CustomPhysicalProperties = physProperties
- wheel2.CustomPhysicalProperties = physProperties
- wheel3.CustomPhysicalProperties = physProperties
- wheel4.CustomPhysicalProperties = physProperties
- wait(1.5)
- seat.Anchored = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement