View difference between Paste ID: 4f4hKnAg and 9DCnbmJh
SHOW: | | - or go back to the newest paste.
1-
script.Parent = owner.Character
1+
carmodel = Instance.new("Model", script)
2
carmodel.Name = "Trucc"
3-
Seat.Parent = script
3+
4
Seat.Parent = carmodel
5
Seat.Size = Vector3.new(4,1,10)
6
Seat.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,8,-8.057)
7
Seat.TopSurface = Enum.SurfaceType.Smooth
8
Seat.BottomSurface = Enum.SurfaceType.Smooth
9-
Bumper.Parent = script
9+
carmodel.PrimaryPart = Seat
10
Bumper = Instance.new("Part")
11
Bumper.Parent = carmodel
12
Bumper.Size = Vector3.new(7.75,2.25,1)
13
Weldlol3 = Instance.new("Weld")
14
Weldlol3.Parent = Seat
15-
Weldlol3.C1 = Weldlol3.C1 * CFrame.new(0,-1.25,9.75)
15+
16-
side = Instance.new("Part")
16+
17-
side.Parent = script
17+
Weldlol3.C1 = Weldlol3.C1 * CFrame.new(0,-1.25,9.65)
18-
side.Size = Vector3.new(1.75,0.25,17.15)
18+
19-
Weldside = Instance.new("Weld")
19+
Bumper3.Parent = carmodel
20-
Weldside.Parent = Seat
20+
21-
Weldside.Part0 = Seat
21+
22-
Weldside.Part1 = side
22+
23-
Weldside.C1 = Weldside.C1 * CFrame.new(3.0625,-2.25,0.625)
23+
24-
side2 = Instance.new("Part")
24+
25-
side2.Parent = script
25+
26-
side2.Size = Vector3.new(1.75,0.25,17.15)
26+
Seatlol = Instance.new("Seat")
27-
Weldside2 = Instance.new("Weld")
27+
Seatlol.Parent = carmodel
28-
Weldside2.Parent = Seat
28+
Seatlol.Size = Vector3.new(7,1,2)
29-
Weldside2.Part0 = Seat
29+
seatweld = Instance.new("Weld")
30-
Weldside2.Part1 = side2
30+
seatweld.Parent = Seat
31-
Weldside2.C1 = Weldside2.C1 * CFrame.new(-3.0625,-2.25,0.625)
31+
seatweld.Part0 = Seat
32
seatweld.Part1 = Seatlol
33-
Bumper3.Parent = script
33+
seatweld.C1 = seatweld.C1 * CFrame.new(0,-0.75,1.75) * CFrame.Angles(0,math.rad(180),0)
34
Bumper2 = Instance.new("Part")
35
Bumper2.Parent = carmodel
36
Bumper2.Size = Vector3.new(7.75,2.25,1)
37
Weldlol31 = Instance.new("Weld")
38
Weldlol31.Parent = Seat
39
Weldlol31.Part0 = Seat
40
Weldlol31.Part1 = Bumper2
41-
Bumper2.Parent = script
41+
Weldlol31.C1 = Weldlol31.C1 * CFrame.new(0,-1.25,-10.5)
42
wheel = Instance.new("Part")
43
wheel.Parent = Seat
44
wheel.Size = Vector3.new(1,3,3)
45
steer = Instance.new("Part")
46
steer.Parent = Seat
47-
Weldlol31.C1 = Weldlol31.C1 * CFrame.new(0,-1.25,-8.5)
47+
48-
Bumper4 = Instance.new("Part")
48+
49-
Bumper4.Parent = script
49+
50-
Bumper4.Size = Vector3.new(4,2.25,4.65)
50+
51-
Weldlol33 = Instance.new("Weld")
51+
52-
Weldlol33.Parent = Bumper2
52+
53-
Weldlol33.Part0 = Bumper2
53+
54-
Weldlol33.Part1 = Bumper4
54+
55-
Weldlol33.C1 = Weldlol33.C1 * CFrame.new(0,0,2.5)
55+
56
steer2.CanCollide = false
57
Seat.Anchored = true
58
wheel.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(-3.739,6.5,-7.25)
59
wheel.TopSurface = Enum.SurfaceType.Smooth
60
wheel.BottomSurface = Enum.SurfaceType.Smooth
61
wheel2 = Instance.new("Part")
62
wheel2.Parent = Seat
63
wheel2.Size = Vector3.new(1,3,3)
64
wheel2.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(3.739,6.5,-7.25)
65
wheel2.TopSurface = Enum.SurfaceType.Smooth
66
wheel2.BottomSurface = Enum.SurfaceType.Smooth
67
wheel3 = Instance.new("Part")
68
wheel3.Parent = Seat
69
wheel3.Size = Vector3.new(1,3,3)
70
wheel3.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(-3.739,6.5,5.75)
71-
wheelsus = Instance.new("Part")
71+
72-
wheelsus.Parent = Seat
72+
73-
wheelsus.Size = Vector3.new(1,1,1)
73+
74-
wheelsus2 = Instance.new("Part")
74+
75-
wheelsus2.Parent = Seat
75+
76-
wheelsus2.Size = Vector3.new(1,1,1)
76+
77-
wheelsus.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(-3.739,1,-7.25)
77+
78-
wheelsus2.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(3.739,1,-7.25)
78+
79-
wheelsus.Transparency = 1
79+
80-
wheelsus.CanCollide = false
80+
81-
wheelsus2.Transparency = 1
81+
82-
wheelsus2.CanCollide = false
82+
83
Mesh = Instance.new("SpecialMesh")
84
Mesh.Parent = Seat
85
Mesh.MeshId = "http://www.roblox.com/asset/?id=7408695235"
86
Mesh.TextureId = "http://www.roblox.com/asset/?id=7408695426"
87
Mesh.Scale = Vector3.new(5, 5, 5)
88
Mesh.Offset = Vector3.new(0, 2.75, 0.45)
89
Bumper.Transparency = 1
90
Bumper2.Transparency = 1
91
Bumper3.Transparency = 1
92
  local attachment0 = Instance.new("Attachment")
93
                attachment0.Parent = steer
94
                local attachment1 = Instance.new("Attachment")
95
                attachment1.Parent = Seat
96
                alignposition = Instance.new("HingeConstraint")
97
                alignposition.Parent = Seat
98
alignposition.ActuatorType = "Servo"
99
alignposition.TargetAngle = 0
100
alignposition.Name = "Hinge4"
101
alignposition.ServoMaxTorque = 100000000000
102
alignposition.AngularSpeed = 100000000000
103
                alignposition.Attachment0 = attachment0
104
                alignposition.Attachment1 = attachment1
105
attachment1.WorldCFrame = attachment1.Parent.CFrame * CFrame.new(-3.739,1,-7) * CFrame.Angles(0,math.rad(180),math.rad(90))
106
  local attachment02 = Instance.new("Attachment")
107
                attachment02.Parent = steer2
108
                local attachment12 = Instance.new("Attachment")
109
                attachment12.Parent = Seat
110
                alignposition2 = Instance.new("HingeConstraint")
111
                alignposition2.Parent = Seat
112
alignposition2.ActuatorType = "Servo"
113
alignposition2.TargetAngle = 0
114
alignposition2.Name = "Hinge3"
115
alignposition2.ServoMaxTorque = 100000000000
116
alignposition2.AngularSpeed = 100000000000
117
                alignposition2.Attachment0 = attachment02
118-
alignposition.ServoMaxTorque = 10000000
118+
119-
alignposition.AngularSpeed = 10000000
119+
attachment12.WorldCFrame = attachment12.Parent.CFrame * CFrame.new(3.739,1,-7) * CFrame.Angles(0,0,math.rad(90))
120
task.wait()
121
  local attachment031 = Instance.new("Attachment")
122-
attachment1.WorldCFrame = attachment1.Parent.CFrame * CFrame.new(-3.739,1,-7.25) * CFrame.Angles(0,math.rad(180),math.rad(90))
122+
123
                local attachment131 = Instance.new("Attachment")
124
                attachment131.Parent = steer
125
                alignposition31 = Instance.new("HingeConstraint")
126
                alignposition31.Parent = Seat
127
alignposition31.ActuatorType = Enum.ActuatorType.None
128
                alignposition31.Attachment0 = attachment031
129
                alignposition31.Attachment1 = attachment131
130
attachment131.WorldCFrame = attachment131.Parent.CFrame * CFrame.new(-1.5,0,0) * CFrame.Angles(0,0,math.rad(-90))
131
  local attachment0231 = Instance.new("Attachment")
132-
alignposition2.ServoMaxTorque = 10000000
132+
133-
alignposition2.AngularSpeed = 10000000
133+
134
                attachment1231.Parent = steer2
135
                alignposition231 = Instance.new("HingeConstraint")
136-
attachment12.WorldCFrame = attachment12.Parent.CFrame * CFrame.new(3.739,1,-7.25) * CFrame.Angles(0,0,math.rad(90))
136+
137
alignposition231.ActuatorType = Enum.ActuatorType.None
138
                alignposition231.Attachment0 = attachment0231
139
                alignposition231.Attachment1 = attachment1231
140
attachment1231.WorldCFrame = attachment1231.Parent.CFrame  * CFrame.new(-1.5,0,0) * CFrame.Angles(0,0,math.rad(-90))
141-
                attachment131.Parent = wheelsus
141+
142
                attachment03.Parent = wheel3
143
                local attachment13 = Instance.new("Attachment")
144
                attachment13.Parent = Seat
145
                alignposition3 = Instance.new("HingeConstraint")
146
                alignposition3.Parent = Seat
147
alignposition3.ActuatorType = "Motor"
148
alignposition3.MotorMaxAcceleration = 100000000000
149
alignposition3.MotorMaxTorque = 100000000000
150-
                attachment1231.Parent = wheelsus2
150+
151
                alignposition3.Attachment0 = attachment03
152
                alignposition3.Attachment1 = attachment13
153
attachment13.WorldCFrame = attachment13.Parent.CFrame * CFrame.new(-3.739,-0.5,6.45)* CFrame.Angles(0,math.rad(180),0)
154
  local attachment023 = Instance.new("Attachment")
155
                attachment023.Parent = wheel4
156
                local attachment123 = Instance.new("Attachment")
157
                attachment123.Parent = Seat
158
                alignposition23 = Instance.new("HingeConstraint")
159
                alignposition23.Parent = Seat
160
alignposition23.ActuatorType = "Motor"
161
alignposition23.MotorMaxAcceleration = 100000000000
162
alignposition23.MotorMaxTorque = 100000000000
163-
alignposition3.MotorMaxAcceleration = 10000000
163+
164-
alignposition3.MotorMaxTorque = 10000000
164+
165
                alignposition23.Attachment1 = attachment123
166
attachment123.WorldCFrame = attachment123.Parent.CFrame * CFrame.new(3.739,-0.5,6.45)
167
local motor1 = alignposition3
168-
attachment13.WorldCFrame = attachment13.Parent.CFrame * CFrame.new(-3.739,0,5.75)* CFrame.Angles(0,math.rad(180),0)
168+
169
local steerServo = alignposition
170
local steerServo2 = alignposition2
171
local maxSpeed = 57.5
172
local angleSteer = 27.5
173
local function carMove(property)
174
	if property == "Throttle" then
175
		alignposition23.AngularVelocity = Seat.Throttle * maxSpeed
176-
alignposition23.MotorMaxAcceleration = 10000000
176+
177-
alignposition23.MotorMaxTorque = 10000000
177+
178
		alignposition.TargetAngle = angleSteer * Seat.Steer
179
		alignposition2.TargetAngle = angleSteer * Seat.Steer
180
	end
181-
attachment123.WorldCFrame = attachment123.Parent.CFrame * CFrame.new(3.739,0,5.75)
181+
182
Seat.Changed:Connect(carMove)
183
local density = 1
184
local friction = 1
185
local elasticity = 0
186-
local maxSpeed = 42.5
186+
187
local elasticityWeight = 0
188
local physProperties = PhysicalProperties.new(density, friction, elasticity, frictionWeight, elasticityWeight)
189
Seat.CustomPhysicalProperties = physProperties
190
wheel.CustomPhysicalProperties = physProperties
191
wheel2.CustomPhysicalProperties = physProperties
192
wheel3.CustomPhysicalProperties = physProperties
193
wheel4.CustomPhysicalProperties = physProperties
194
wait(0.25)
195
Seat.Anchored = false
196
Mesh2 = Instance.new("SpecialMesh")
197
Mesh2.Parent = wheel
198
Mesh2.MeshId = "http://www.roblox.com/asset/?id=439151274"
199
Mesh2.TextureId = "http://www.roblox.com/asset/?id=1110514085"
200
Mesh2.Scale = Vector3.new(0.045,0.045,0.045)
201
Mesh3 = Instance.new("SpecialMesh")
202
Mesh3.Parent = wheel2
203
Mesh3.MeshId = "http://www.roblox.com/asset/?id=439151274"
204
Mesh3.TextureId = "http://www.roblox.com/asset/?id=1110514085"
205
Mesh3.Scale = Vector3.new(0.045,0.045,0.045)
206
Mesh4 = Instance.new("SpecialMesh")
207
Mesh4.Parent = wheel3
208
Mesh4.MeshId = "http://www.roblox.com/asset/?id=439151274"
209
Mesh4.TextureId = "http://www.roblox.com/asset/?id=1110514085"
210
Mesh4.Scale = Vector3.new(0.045,0.045,0.045)
211
Mesh5 = Instance.new("SpecialMesh")
212
Mesh5.Parent = wheel4
213
Mesh5.MeshId = "http://www.roblox.com/asset/?id=439151274"
214
Mesh5.TextureId = "http://www.roblox.com/asset/?id=1110514085"
215
Mesh5.Scale = Vector3.new(0.045, 0.045, 0.045)