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.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,8,-8.057)
- Seat.TopSurface = Enum.SurfaceType.Smooth
- Seat.BottomSurface = Enum.SurfaceType.Smooth
- Bumper = Instance.new("Part")
- Bumper.Parent = owner.Character
- Bumper.Size = Vector3.new(7.75,2.25,2.75)
- Weldlol3 = Instance.new("Weld")
- Weldlol3.Parent = Seat
- Weldlol3.Part0 = Seat
- Weldlol3.Part1 = Bumper
- Weldlol3.C1 = Weldlol3.C1 * CFrame.new(0,-1.25,11)
- Bumper2 = Instance.new("Part")
- Bumper2.Parent = owner.Character
- Bumper2.Size = Vector3.new(7.75,2.25,2.5)
- Weldlol31 = Instance.new("Weld")
- Weldlol31.Parent = Seat
- Weldlol31.Part0 = Seat
- Weldlol31.Part1 = Bumper2
- Weldlol31.C1 = Weldlol31.C1 * CFrame.new(0,-1.25,-11)
- Bumper.Transparency = 1
- Bumper2.Transparency = 1
- Mesh = Instance.new("SpecialMesh")
- Mesh.Parent = Seat
- Mesh.MeshId = "http://www.roblox.com/asset/?id=439129429"
- Mesh.TextureId = "http://www.roblox.com/asset/?id=439125379"
- Mesh.Scale = Vector3.new(0.045, 0.045, 0.045)
- Mesh.Offset = Vector3.new(0, 2.5, 0)
- wheel = Instance.new("Part")
- wheel.Parent = Seat
- wheel.Size = Vector3.new(1,3,3)
- steer = Instance.new("Part")
- steer.Parent = Seat
- steer.Size = Vector3.new(1,1,1)
- steer2 = Instance.new("Part")
- steer2.Parent = Seat
- steer2.Size = Vector3.new(1,1,1)
- steer.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(-3.739,1,-7.25)
- steer2.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(3.739,1,-7.25)
- steer.Transparency = 1
- steer.CanCollide = false
- steer2.Transparency = 1
- steer2.CanCollide = false
- 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,3,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
- wheel3 = Instance.new("Part")
- wheel3.Parent = Seat
- wheel3.Size = Vector3.new(1,3,3)
- wheel3.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(-3.739,6.5,5.75)
- wheel3.TopSurface = Enum.SurfaceType.Smooth
- wheel3.BottomSurface = Enum.SurfaceType.Smooth
- wheel4 = Instance.new("Part")
- wheel4.Parent = Seat
- wheel4.Size = Vector3.new(1,3,3)
- wheel4.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(3.739,6.5,5.75)
- 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 attachment0 = Instance.new("Attachment")
- attachment0.Parent = steer
- local attachment1 = Instance.new("Attachment")
- attachment1.Parent = Seat
- alignposition = Instance.new("HingeConstraint")
- alignposition.Parent = Seat
- alignposition.ActuatorType = "Servo"
- alignposition.TargetAngle = 0
- alignposition.Name = "Hinge4"
- alignposition.ServoMaxTorque = 10000000
- alignposition.AngularSpeed = 10000000
- alignposition.Attachment0 = attachment0
- alignposition.Attachment1 = attachment1
- attachment1.WorldCFrame = attachment1.Parent.CFrame * CFrame.new(-3.739,1,-7.25) * CFrame.Angles(0,math.rad(180),math.rad(90))
- local attachment02 = Instance.new("Attachment")
- attachment02.Parent = steer2
- local attachment12 = Instance.new("Attachment")
- attachment12.Parent = Seat
- alignposition2 = Instance.new("HingeConstraint")
- alignposition2.Parent = Seat
- alignposition2.ActuatorType = "Servo"
- alignposition2.TargetAngle = 0
- alignposition2.Name = "Hinge3"
- alignposition2.ServoMaxTorque = 10000000
- alignposition2.AngularSpeed = 10000000
- alignposition2.Attachment0 = attachment02
- alignposition2.Attachment1 = attachment12
- attachment12.WorldCFrame = attachment12.Parent.CFrame * CFrame.new(3.739,1,-7.25) * CFrame.Angles(0,0,math.rad(90))
- task.wait()
- local attachment031 = Instance.new("Attachment")
- attachment031.Parent = wheel
- local attachment131 = Instance.new("Attachment")
- attachment131.Parent = steer
- alignposition31 = Instance.new("HingeConstraint")
- alignposition31.Parent = Seat
- alignposition31.ActuatorType = Enum.ActuatorType.None
- alignposition31.Attachment0 = attachment031
- alignposition31.Attachment1 = attachment131
- attachment131.WorldCFrame = attachment131.Parent.CFrame * CFrame.new(-1,0,0) * CFrame.Angles(0,0,math.rad(-90))
- local attachment0231 = Instance.new("Attachment")
- attachment0231.Parent = wheel2
- local attachment1231 = Instance.new("Attachment")
- attachment1231.Parent = steer2
- alignposition231 = Instance.new("HingeConstraint")
- alignposition231.Parent = Seat
- alignposition231.ActuatorType = Enum.ActuatorType.None
- alignposition231.Attachment0 = attachment0231
- alignposition231.Attachment1 = attachment1231
- attachment1231.WorldCFrame = attachment1231.Parent.CFrame * CFrame.new(-1,0,0) * CFrame.Angles(0,0,math.rad(-90))
- local attachment03 = Instance.new("Attachment")
- attachment03.Parent = wheel3
- local attachment13 = Instance.new("Attachment")
- attachment13.Parent = Seat
- alignposition3 = Instance.new("HingeConstraint")
- alignposition3.Parent = Seat
- 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(-3.739,0,5.75)* CFrame.Angles(0,math.rad(180),0)
- local attachment023 = Instance.new("Attachment")
- attachment023.Parent = wheel4
- local attachment123 = Instance.new("Attachment")
- attachment123.Parent = Seat
- alignposition23 = Instance.new("HingeConstraint")
- alignposition23.Parent = Seat
- alignposition23.ActuatorType = "Motor"
- alignposition23.MotorMaxAcceleration = 10000000
- alignposition23.MotorMaxTorque = 10000000
- alignposition23.Name = "Hinge2"
- alignposition23.Attachment0 = attachment023
- alignposition23.Attachment1 = attachment123
- attachment123.WorldCFrame = attachment123.Parent.CFrame * CFrame.new(3.739,0,5.75)
- local motor1 = alignposition3
- local motor2 = alignposition23
- local steerServo = alignposition
- local steerServo2 = alignposition2
- local maxSpeed = 42.5
- local angleSteer = 27.5
- local function carMove(property)
- if property == "Throttle" then
- alignposition23.AngularVelocity = Seat.Throttle * maxSpeed
- alignposition3.AngularVelocity = Seat.Throttle * -maxSpeed
- elseif property == "Steer" then
- alignposition.TargetAngle = angleSteer * Seat.Steer
- alignposition2.TargetAngle = angleSteer * Seat.Steer
- end
- end
- Seat.Changed:Connect(carMove)
- 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
- wait(0.25)
- Seat.Anchored = false
- function killfunction(part)
- pcall(function()
- if Seat.Throttle == 1 or Seat.Throttle == -1 then
- local Model = part:FindFirstAncestorOfClass("Model")
- if Model then
- local PC = game:GetService("Players"):GetPlayerFromCharacter(Model)
- if PC then
- if PC ~= owner then
- if PC.Character.Humanoid.Health ~= 0 then
- PC.Character.Humanoid.BreakJointsOnDeath = false
- PC.Character.Humanoid.Health = 0
- BAHAHHAHAHA = Instance.new("Sound", PC.Character.Head)
- BAHAHHAHAHA.SoundId = "rbxassetid://6069962045"
- BAHAHHAHAHA.Volume = 1
- BAHAHHAHAHA:Play()
- 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
- end)
- end
- Bumper.Touched:Connect(killfunction)
- Bumper2.Touched:Connect(killfunction)
- Mesh2 = Instance.new("SpecialMesh")
- Mesh2.Parent = wheel
- Mesh2.MeshId = "http://www.roblox.com/asset/?id=439151274"
- Mesh2.TextureId = "http://www.roblox.com/asset/?id=1110514085"
- Mesh2.Scale = Vector3.new(0.045,0.045,0.045)
- Mesh3 = Instance.new("SpecialMesh")
- Mesh3.Parent = wheel2
- Mesh3.MeshId = "http://www.roblox.com/asset/?id=439151274"
- Mesh3.TextureId = "http://www.roblox.com/asset/?id=1110514085"
- Mesh3.Scale = Vector3.new(0.045,0.045,0.045)
- Mesh4 = Instance.new("SpecialMesh")
- Mesh4.Parent = wheel3
- Mesh4.MeshId = "http://www.roblox.com/asset/?id=439151274"
- Mesh4.TextureId = "http://www.roblox.com/asset/?id=1110514085"
- Mesh4.Scale = Vector3.new(0.045,0.045,0.045)
- Mesh5 = Instance.new("SpecialMesh")
- Mesh5.Parent = wheel4
- Mesh5.MeshId = "http://www.roblox.com/asset/?id=439151274"
- Mesh5.TextureId = "http://www.roblox.com/asset/?id=1110514085"
- Mesh5.Scale = Vector3.new(0.045, 0.045, 0.045)
Add Comment
Please, Sign In to add comment