lotushomerun

Untitled

Aug 18th, 2017
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 59.21 KB | None | 0 0
  1. Health = 5500
  2. MaxHealth = 5500
  3. ToughnessMinorDamage = 400
  4. ToughnessMajorDamage = 600
  5.  
  6. DriftAcceleration = -0.001
  7. DriftSteerDifficulty = 0.025
  8. DriftSteerPower = 25
  9.  
  10. Acceleration = 0.003
  11. TopSpeed = 186
  12. Deceleration = 0.0075
  13. BrakePower = 0.01
  14.  
  15. SteerDifficulty = 0.025
  16. SteerPower = 20
  17.  
  18. TireFriction = 0.5
  19. TireElasticity = 1
  20.  
  21. MasterColor = BrickColor.random()
  22. Wrecked = false
  23.  
  24. Vehicle = Instance.new("Model")
  25. Vehicle.Name = "Car"
  26. Vehicle.Parent = Workspace
  27.  
  28. Base = Instance.new("Part")
  29. Base.Name = "VehicleBase"
  30. Base.BrickColor = MasterColor
  31. Base.TopSurface = "Smooth"
  32. Base.BottomSurface = "Smooth"
  33. Base.FormFactor = "Custom"
  34. Base.Size = Vector3.new(8, 1, 17)
  35. Base.Friction = 1
  36. Base.Elasticity = 0
  37. Base.Parent = Vehicle
  38. Thrust = Instance.new("BodyVelocity")
  39. Thrust.P = 100
  40. Thrust.maxForce = Vector3.new(math.huge, 0, math.huge)
  41. Thrust.velocity = Vector3.new()
  42. Thrust.Parent = Base
  43. Steer = Instance.new("BodyGyro")
  44. Steer.maxTorque = Vector3.new(0, math.huge, 0)
  45. Steer.cframe = CFrame.new()
  46. Steer.P = 7500
  47. Steer.Parent = Base
  48. Instance.new("BodyForce", Base).force = Vector3.new(0, -2000, 0)
  49.  
  50. Seat = Instance.new("VehicleSeat")
  51. Seat.CanCollide = false
  52. Seat.MaxSpeed = 0
  53. Seat.Torque = 0
  54. Seat.HeadsUpDisplay = false
  55. Seat.BrickColor = BrickColor.new("Black")
  56. Seat.TopSurface = "Smooth"
  57. Seat.BottomSurface = "Smooth"
  58. Seat.Size = Vector3.new(2, 1, 2)
  59. Seat.Parent = Vehicle
  60. Weld = Instance.new("Weld")
  61. Weld.Name = "Weld"
  62. Weld.Parent = Seat
  63. Weld.Part0 = Base
  64. Weld.Part1 = Seat
  65. Weld.C0 = CFrame.new(-2.5, 0.375, 0.25)
  66.  
  67. Part = Instance.new("Part")
  68. Part.Name = "Front Left Seat Back"
  69. Part.BrickColor = BrickColor.new("Black")
  70. Part.TopSurface = "Smooth"
  71. Part.BottomSurface = "Smooth"
  72. Part.FormFactor = "Custom"
  73. Part.Size = Vector3.new(2, 3, 1)
  74. Part.Parent = Vehicle
  75. Mesh = Instance.new("SpecialMesh")
  76. Mesh.MeshType = "Brick"
  77. Mesh.Scale = Vector3.new(1, 1, 1)
  78. Mesh.Parent = Part
  79. Weld = Instance.new("Weld")
  80. Weld.Parent = Part
  81. Weld.Part0 = Base
  82. Weld.Part1 = Part
  83. Weld.C0 = CFrame.new(-2.5, 1.5, 1.25)
  84.  
  85. Part = Instance.new("Part")
  86. Part.Name = "Front Left Seat Headrest 1"
  87. Part.BrickColor = BrickColor.new("Black")
  88. Part.TopSurface = "Smooth"
  89. Part.BottomSurface = "Smooth"
  90. Part.FormFactor = "Custom"
  91. Part.Size = Vector3.new(2, 1, 1)
  92. Part.Parent = Vehicle
  93. Mesh = Instance.new("SpecialMesh")
  94. Mesh.MeshType = "Brick"
  95. Mesh.Scale = Vector3.new(0.5, 0.5, 0.5)
  96. Mesh.Parent = Part
  97. Weld = Instance.new("Weld")
  98. Weld.Parent = Part
  99. Weld.Part0 = Base
  100. Weld.Part1 = Part
  101. Weld.C0 = CFrame.new(-2.5, 3, 1.25)
  102.  
  103. Part = Instance.new("Part")
  104. Part.Name = "Front Left Seat Headrest 2"
  105. Part.BrickColor = BrickColor.new("Black")
  106. Part.TopSurface = "Smooth"
  107. Part.BottomSurface = "Smooth"
  108. Part.FormFactor = "Custom"
  109. Part.Size = Vector3.new(2, 1, 1)
  110. Part.Parent = Vehicle
  111. Mesh = Instance.new("SpecialMesh")
  112. Mesh.MeshType = "Brick"
  113. Mesh.Scale = Vector3.new(0.9, 1.1, 1)
  114. Mesh.Parent = Part
  115. Weld = Instance.new("Weld")
  116. Weld.Parent = Part
  117. Weld.Part0 = Base
  118. Weld.Part1 = Part
  119. Weld.C0 = CFrame.new(-2.5, 3.8, 1.25)
  120.  
  121. Seat2 = Instance.new("VehicleSeat")
  122. Seat2.Name = "VehicleSeat2"
  123. Seat2.CanCollide = false
  124. Seat2.MaxSpeed = 0
  125. Seat2.Torque = 0
  126. Seat2.HeadsUpDisplay = false
  127. Seat2.BrickColor = BrickColor.new("Black")
  128. Seat2.TopSurface = "Smooth"
  129. Seat2.BottomSurface = "Smooth"
  130. Seat2.Size = Vector3.new(2, 1, 2)
  131. Seat2.Parent = Vehicle
  132. Weld = Instance.new("Weld")
  133. Weld.Parent = Seat2
  134. Weld.Part0 = Base
  135. Weld.Part1 = Seat2
  136. Weld.C0 = CFrame.new(2.5, 0.375, 0.5)
  137.  
  138. Part = Instance.new("Part")
  139. Part.Name = "Front Right Seat Back"
  140. Part.BrickColor = BrickColor.new("Black")
  141. Part.TopSurface = "Smooth"
  142. Part.BottomSurface = "Smooth"
  143. Part.FormFactor = "Custom"
  144. Part.Size = Vector3.new(2, 3, 1)
  145. Part.Parent = Vehicle
  146. Mesh = Instance.new("SpecialMesh")
  147. Mesh.MeshType = "Brick"
  148. Mesh.Scale = Vector3.new(1, 1, 1)
  149. Mesh.Parent = Part
  150. Weld = Instance.new("Weld")
  151. Weld.Parent = Part
  152. Weld.Part0 = Base
  153. Weld.Part1 = Part
  154. Weld.C0 = CFrame.new(2.5, 1.5, 1.25)
  155.  
  156. Part = Instance.new("Part")
  157. Part.Name = "Front Right Seat Headrest 1"
  158. Part.BrickColor = BrickColor.new("Black")
  159. Part.TopSurface = "Smooth"
  160. Part.BottomSurface = "Smooth"
  161. Part.FormFactor = "Custom"
  162. Part.Size = Vector3.new(2, 1, 1)
  163. Part.Parent = Vehicle
  164. Mesh = Instance.new("SpecialMesh")
  165. Mesh.MeshType = "Brick"
  166. Mesh.Scale = Vector3.new(0.5, 0.5, 0.5)
  167. Mesh.Parent = Part
  168. Weld = Instance.new("Weld")
  169. Weld.Parent = Part
  170. Weld.Part0 = Base
  171. Weld.Part1 = Part
  172. Weld.C0 = CFrame.new(2.5, 3, 1.25)
  173.  
  174. Part = Instance.new("Part")
  175. Part.Name = "Front Right Seat Headrest 2"
  176. Part.BrickColor = BrickColor.new("Black")
  177. Part.TopSurface = "Smooth"
  178. Part.BottomSurface = "Smooth"
  179. Part.FormFactor = "Custom"
  180. Part.Size = Vector3.new(2, 1, 1)
  181. Part.Parent = Vehicle
  182. Mesh = Instance.new("SpecialMesh")
  183. Mesh.MeshType = "Brick"
  184. Mesh.Scale = Vector3.new(0.9, 1.1, 1)
  185. Mesh.Parent = Part
  186. Weld = Instance.new("Weld")
  187. Weld.Parent = Part
  188. Weld.Part0 = Base
  189. Weld.Part1 = Part
  190. Weld.C0 = CFrame.new(2.5, 3.8, 1.25)
  191.  
  192. Part = Instance.new("Part")
  193. Part.Name = "Front Right Bumper"
  194. Part.BrickColor = MasterColor
  195. Part.TopSurface = "Smooth"
  196. Part.BottomSurface = "Smooth"
  197. Part.FormFactor = "Custom"
  198. Part.Size = Vector3.new(2, 1, 3)
  199. Part.Parent = Vehicle
  200. Mesh = Instance.new("SpecialMesh")
  201. Mesh.MeshType = "Brick"
  202. Mesh.Scale = Vector3.new(1, 1, 0.95)
  203. Mesh.Parent = Part
  204. Weld = Instance.new("Weld")
  205. Weld.Parent = Part
  206. Weld.Part0 = Base
  207. Weld.Part1 = Part
  208. Weld.C0 = CFrame.new(5, 0, -7.075)
  209.  
  210. Part = Instance.new("Part")
  211. Part.Name = "Front Left Bumper"
  212. Part.BrickColor = MasterColor
  213. Part.TopSurface = "Smooth"
  214. Part.BottomSurface = "Smooth"
  215. Part.FormFactor = "Custom"
  216. Part.Size = Vector3.new(2, 1, 3)
  217. Part.Parent = Vehicle
  218. Mesh = Instance.new("SpecialMesh")
  219. Mesh.MeshType = "Brick"
  220. Mesh.Scale = Vector3.new(1, 1, 0.95)
  221. Mesh.Parent = Part
  222. Weld = Instance.new("Weld")
  223. Weld.Parent = Part
  224. Weld.Part0 = Base
  225. Weld.Part1 = Part
  226. Weld.C0 = CFrame.new(-5, 0, -7.075)
  227.  
  228. Part = Instance.new("Part")
  229. Part.Name = "Right Skirt 1"
  230. Part.BrickColor = MasterColor
  231. Part.TopSurface = "Smooth"
  232. Part.BottomSurface = "Smooth"
  233. Part.FormFactor = "Custom"
  234. Part.Size = Vector3.new(1, 1, 9)
  235. Part.Parent = Vehicle
  236. Mesh = Instance.new("SpecialMesh")
  237. Mesh.MeshType = "Brick"
  238. Mesh.Scale = Vector3.new(1, 1, 0.975)
  239. Mesh.Parent = Part
  240. Weld = Instance.new("Weld")
  241. Weld.Parent = Part
  242. Weld.Part0 = Base
  243. Weld.Part1 = Part
  244. Weld.C0 = CFrame.new(4.5, 0, 2)
  245.  
  246. Part = Instance.new("Part")
  247. Part.Name = "Right Skirt 2"
  248. Part.BrickColor = MasterColor
  249. Part.TopSurface = "Smooth"
  250. Part.BottomSurface = "Smooth"
  251. Part.FormFactor = "Custom"
  252. Part.Size = Vector3.new(1, 1, 9)
  253. Part.Parent = Vehicle
  254. Mesh = Instance.new("SpecialMesh")
  255. Mesh.MeshType = "Brick"
  256. Mesh.Scale = Vector3.new(1, 0.5, 0.975)
  257. Mesh.Parent = Part
  258. Weld = Instance.new("Weld")
  259. Weld.Parent = Part
  260. Weld.Part0 = Base
  261. Weld.Part1 = Part
  262. Weld.C0 = CFrame.new(5.5, -0.25, 2)
  263.  
  264. Part = Instance.new("Part")
  265. Part.Name = "Left Skirt 1"
  266. Part.BrickColor = MasterColor
  267. Part.TopSurface = "Smooth"
  268. Part.BottomSurface = "Smooth"
  269. Part.FormFactor = "Custom"
  270. Part.Size = Vector3.new(1, 1, 9)
  271. Part.Parent = Vehicle
  272. Mesh = Instance.new("SpecialMesh")
  273. Mesh.MeshType = "Brick"
  274. Mesh.Scale = Vector3.new(1, 1, 0.975)
  275. Mesh.Parent = Part
  276. Weld = Instance.new("Weld")
  277. Weld.Parent = Part
  278. Weld.Part0 = Base
  279. Weld.Part1 = Part
  280. Weld.C0 = CFrame.new(-4.5, 0, 2)
  281.  
  282. Part = Instance.new("Part")
  283. Part.Name = "Left Skirt 2"
  284. Part.BrickColor = MasterColor
  285. Part.TopSurface = "Smooth"
  286. Part.BottomSurface = "Smooth"
  287. Part.FormFactor = "Custom"
  288. Part.Size = Vector3.new(1, 1, 9)
  289. Part.Parent = Vehicle
  290. Mesh = Instance.new("SpecialMesh")
  291. Mesh.MeshType = "Brick"
  292. Mesh.Scale = Vector3.new(1, 0.5, 0.975)
  293. Mesh.Parent = Part
  294. Weld = Instance.new("Weld")
  295. Weld.Parent = Part
  296. Weld.Part0 = Base
  297. Weld.Part1 = Part
  298. Weld.C0 = CFrame.new(-5.5, -0.25, 2)
  299.  
  300. Part = Instance.new("Part")
  301. Part.Name = "VehicleEngine"
  302. Part.BrickColor = MasterColor
  303. Part.TopSurface = "Smooth"
  304. Part.BottomSurface = "Smooth"
  305. Part.FormFactor = "Custom"
  306. Part.Size = Vector3.new(12, 1, 3)
  307. Part.Parent = Vehicle
  308. Weld = Instance.new("Weld")
  309. Weld.Parent = Part
  310. Weld.Part0 = Base
  311. Weld.Part1 = Part
  312. Weld.C0 = CFrame.new(0, 1, -7)
  313. coroutine.wrap(function(Part2)
  314. while true do
  315. if Driver ~= nil and Part2:FindFirstChild("Drive") == nil and Part2:FindFirstChild("Start") == nil and Health > 0 then
  316. local Sound1 = Instance.new("Sound")
  317. Sound1.Name = "Start"
  318. Sound1.SoundId = "http://www.roblox.com/Asset/?id=144396704"
  319. Sound1.Volume = 1
  320. Sound1.Pitch = 1
  321. Sound1.Parent = Part2
  322. Sound1:Play()
  323. wait(1)
  324. local Sound2 = Instance.new("Sound")
  325. Sound2.Name = "Drive"
  326. Sound2.SoundId = "http://www.roblox.com/Asset/?id=2766576"
  327. Sound2.Volume = 1
  328. Sound2.Pitch = 0
  329. Sound2.Looped = true
  330. Sound2.Parent = Part2
  331. Sound2:Play()
  332. while Driver ~= nil and Vehicle.Parent ~= nil and Health > 0 do
  333. Sound2.Pitch = 0.05 + (math.abs(ThrottlePercent) * 0.2)
  334. wait()
  335. end
  336. coroutine.wrap(function()
  337. for i = Sound1.Pitch, 0, -0.075 do
  338. Sound1.Pitch = i
  339. wait()
  340. end
  341. end)()
  342. for i = Sound2.Pitch, 0, -0.01 do
  343. Sound2.Pitch = i
  344. wait()
  345. end
  346. Sound1:Stop()
  347. Sound2:Stop()
  348. wait(0.25)
  349. Sound1:Remove()
  350. Sound2:Remove()
  351. end
  352. wait()
  353. end
  354. end)(Part)
  355.  
  356. Part = Instance.new("Part")
  357. Part.Name = "Grill"
  358. Part.BrickColor = BrickColor.new("Medium stone grey")
  359. Part.Reflectance = 0.2
  360. Part.TopSurface = "Smooth"
  361. Part.BottomSurface = "Smooth"
  362. Part.FormFactor = "Custom"
  363. Part.Size = Vector3.new(4, 1, 2)
  364. Part.Parent = Vehicle
  365. Weld = Instance.new("Weld")
  366. Weld.Parent = Part
  367. Weld.Part0 = Base
  368. Weld.Part1 = Part
  369. Weld.C0 = CFrame.new(0, 2, -7.5)
  370.  
  371. Part = Instance.new("Part")
  372. Part.Name = "Right Headlight"
  373. Part.BrickColor = BrickColor.new("Institutional white")
  374. Part.Transparency = 0.5
  375. Part.TopSurface = "Smooth"
  376. Part.BottomSurface = "Smooth"
  377. Part.FormFactor = "Custom"
  378. Part.Size = Vector3.new(3, 1, 2)
  379. Part.Parent = Vehicle
  380. Weld = Instance.new("Weld")
  381. Weld.Parent = Part
  382. Weld.Part0 = Base
  383. Weld.Part1 = Part
  384. Weld.C0 = CFrame.new(3.5, 2, -7.5)
  385.  
  386. Part = Instance.new("Part")
  387. Part.Name = "Right Front Turn Signal"
  388. Part.BrickColor = BrickColor.new("New Yeller")
  389. Part.Transparency = 0.5
  390. Part.TopSurface = "Smooth"
  391. Part.BottomSurface = "Smooth"
  392. Part.FormFactor = "Custom"
  393. Part.Size = Vector3.new(1, 1, 2)
  394. Part.Parent = Vehicle
  395. Weld = Instance.new("Weld")
  396. Weld.Parent = Part
  397. Weld.Part0 = Base
  398. Weld.Part1 = Part
  399. Weld.C0 = CFrame.new(5.5, 2, -7.5)
  400.  
  401. Part = Instance.new("Part")
  402. Part.Name = "Left Headlight"
  403. Part.BrickColor = BrickColor.new("Institutional white")
  404. Part.Transparency = 0.5
  405. Part.TopSurface = "Smooth"
  406. Part.BottomSurface = "Smooth"
  407. Part.FormFactor = "Custom"
  408. Part.Size = Vector3.new(3, 1, 2)
  409. Part.Parent = Vehicle
  410. Weld = Instance.new("Weld")
  411. Weld.Parent = Part
  412. Weld.Part0 = Base
  413. Weld.Part1 = Part
  414. Weld.C0 = CFrame.new(-3.5, 2, -7.5)
  415.  
  416. Part = Instance.new("Part")
  417. Part.Name = "Left Front Turn Signal"
  418. Part.BrickColor = BrickColor.new("New Yeller")
  419. Part.Transparency = 0.5
  420. Part.TopSurface = "Smooth"
  421. Part.BottomSurface = "Smooth"
  422. Part.FormFactor = "Custom"
  423. Part.Size = Vector3.new(1, 1, 2)
  424. Part.Parent = Vehicle
  425. Weld = Instance.new("Weld")
  426. Weld.Parent = Part
  427. Weld.Part0 = Base
  428. Weld.Part1 = Part
  429. Weld.C0 = CFrame.new(-5.5, 2, -7.5)
  430.  
  431. Part = Instance.new("Part")
  432. Part.Name = "Headlight Back"
  433. Part.BrickColor = MasterColor
  434. Part.TopSurface = "Smooth"
  435. Part.BottomSurface = "Smooth"
  436. Part.FormFactor = "Custom"
  437. Part.Size = Vector3.new(12, 1, 4)
  438. Part.Parent = Vehicle
  439. Weld = Instance.new("Weld")
  440. Weld.Parent = Part
  441. Weld.Part0 = Base
  442. Weld.Part1 = Part
  443. Weld.C0 = CFrame.new(0, 2, -4.5)
  444.  
  445. Part = Instance.new("WedgePart")
  446. Part.Name = "Hood"
  447. Part.BrickColor = MasterColor
  448. Part.TopSurface = "Smooth"
  449. Part.BottomSurface = "Smooth"
  450. Part.FormFactor = "Custom"
  451. Part.Size = Vector3.new(12, 1, 6)
  452. Part.Parent = Vehicle
  453. Weld = Instance.new("Weld")
  454. Weld.Parent = Part
  455. Weld.Part0 = Base
  456. Weld.Part1 = Part
  457. Weld.C0 = CFrame.new(0, 3, -5.5)
  458.  
  459. Part = Instance.new("WedgePart")
  460. Part.Name = "Front Well 1"
  461. Part.BrickColor = MasterColor
  462. Part.TopSurface = "Smooth"
  463. Part.BottomSurface = "Smooth"
  464. Part.FormFactor = "Custom"
  465. Part.Size = Vector3.new(12, 1, 1)
  466. Part.Parent = Vehicle
  467. Mesh = Instance.new("SpecialMesh")
  468. Mesh.MeshType = "Wedge"
  469. Mesh.Scale = Vector3.new(1, 0.5, 0.5)
  470. Mesh.Parent = Part
  471. Weld = Instance.new("Weld")
  472. Weld.Parent = Part
  473. Weld.Part0 = Base
  474. Weld.Part1 = Part
  475. Weld.C0 = CFrame.new(0, 1.25, -5.25) * CFrame.fromEulerAnglesXYZ(math.rad(180), 0, 0)
  476.  
  477. Part = Instance.new("WedgePart")
  478. Part.Name = "Front Well 2"
  479. Part.BrickColor = MasterColor
  480. Part.TopSurface = "Smooth"
  481. Part.BottomSurface = "Smooth"
  482. Part.FormFactor = "Custom"
  483. Part.Size = Vector3.new(12, 1, 1)
  484. Part.Parent = Vehicle
  485. Mesh = Instance.new("SpecialMesh")
  486. Mesh.MeshType = "Wedge"
  487. Mesh.Scale = Vector3.new(1, 0.5, 0.5)
  488. Mesh.Parent = Part
  489. Weld = Instance.new("Weld")
  490. Weld.Parent = Part
  491. Weld.Part0 = Base
  492. Weld.Part1 = Part
  493. Weld.C0 = CFrame.new(0, 1.25, -2.75) * CFrame.fromEulerAnglesXYZ(math.rad(180), math.rad(180), 0)
  494.  
  495. Part = Instance.new("Part")
  496. Part.Name = "Front Well 3"
  497. Part.BrickColor = BrickColor.new("Black")
  498. Part.TopSurface = "Smooth"
  499. Part.BottomSurface = "Smooth"
  500. Part.FormFactor = "Custom"
  501. Part.Size = Vector3.new(8, 1, 3)
  502. Part.Parent = Vehicle
  503. Weld = Instance.new("Weld")
  504. Weld.Parent = Part
  505. Weld.Part0 = Base
  506. Weld.Part1 = Part
  507. Weld.C0 = CFrame.new(0, 1, -4)
  508.  
  509. Part = Instance.new("Part")
  510. Part.Name = "Front Left Roof Support"
  511. Part.BrickColor = MasterColor
  512. Part.TopSurface = "Smooth"
  513. Part.BottomSurface = "Smooth"
  514. Part.FormFactor = "Custom"
  515. Part.Size = Vector3.new(1, 5, 1)
  516. Part.CanCollide = false
  517. Part.Parent = Vehicle
  518. Weld = Instance.new("Weld")
  519. Weld.Parent = Part
  520. Weld.Part0 = Base
  521. Weld.Part1 = Part
  522. Weld.C0 = CFrame.new(-5.5, 4.75, -1.75) * CFrame.fromEulerAnglesXYZ(math.rad(25), 0, 0)
  523.  
  524. Part = Instance.new("Part")
  525. Part.Name = "Front Right Roof Support"
  526. Part.BrickColor = MasterColor
  527. Part.TopSurface = "Smooth"
  528. Part.BottomSurface = "Smooth"
  529. Part.FormFactor = "Custom"
  530. Part.Size = Vector3.new(1, 5, 1)
  531. Part.CanCollide = false
  532. Part.Parent = Vehicle
  533. Weld = Instance.new("Weld")
  534. Weld.Parent = Part
  535. Weld.Part0 = Base
  536. Weld.Part1 = Part
  537. Weld.C0 = CFrame.new(5.5, 4.75, -1.75) * CFrame.fromEulerAnglesXYZ(math.rad(25), 0, 0)
  538.  
  539. Part = Instance.new("Part")
  540. Part.Name = "Front Window"
  541. Part.BrickColor = BrickColor.new("Institutional white")
  542. Part.Transparency = 0.75
  543. Part.TopSurface = "Smooth"
  544. Part.BottomSurface = "Smooth"
  545. Part.FormFactor = "Custom"
  546. Part.Size = Vector3.new(10, 5, 1)
  547. Part.Parent = Vehicle
  548. Weld = Instance.new("Weld")
  549. Weld.Parent = Part
  550. Weld.Part0 = Base
  551. Weld.Part1 = Part
  552. Weld.C0 = CFrame.new(0, 4.75, -1.75) * CFrame.fromEulerAnglesXYZ(math.rad(25), 0, 0)
  553.  
  554. Part = Instance.new("Part")
  555. Part.Name = "Roof"
  556. Part.BrickColor = MasterColor
  557. Part.TopSurface = "Smooth"
  558. Part.BottomSurface = "Smooth"
  559. Part.FormFactor = "Custom"
  560. Part.Size = Vector3.new(12, 1, 4)
  561. Part.Parent = Vehicle
  562. Weld = Instance.new("Weld")
  563. Weld.Parent = Part
  564. Weld.Part0 = Base
  565. Weld.Part1 = Part
  566. Weld.C0 = CFrame.new(0, 6.729, 0.855)
  567.  
  568. Part = Instance.new("Part")
  569. Part.Name = "Dashboard Back"
  570. Part.BrickColor = MasterColor
  571. Part.TopSurface = "Smooth"
  572. Part.BottomSurface = "Smooth"
  573. Part.FormFactor = "Custom"
  574. Part.Size = Vector3.new(12, 4, 1)
  575. Part.Parent = Vehicle
  576. Mesh = Instance.new("SpecialMesh")
  577. Mesh.MeshType = "Brick"
  578. Mesh.Scale = Vector3.new(1, 1, 0.5)
  579. Mesh.Parent = Part
  580. Weld = Instance.new("Weld")
  581. Weld.Parent = Part
  582. Weld.Part0 = Base
  583. Weld.Part1 = Part
  584. Weld.C0 = CFrame.new(0, 1.5, -2.25)
  585.  
  586. Part = Instance.new("Part")
  587. Part.Name = "Steeringwheel"
  588. Part.BrickColor = BrickColor.new("Black")
  589. Part.TopSurface = "Smooth"
  590. Part.BottomSurface = "Smooth"
  591. Part.FormFactor = "Custom"
  592. Part.Size = Vector3.new(2, 2, 1)
  593. Part.CanCollide = false
  594. Part.Parent = Vehicle
  595. Mesh = Instance.new("SpecialMesh")
  596. Mesh.MeshType = "Sphere"
  597. Mesh.Scale = Vector3.new(1.25, 1.25, 0.5)
  598. Mesh.Parent = Part
  599. Weld = Instance.new("Weld")
  600. Weld.Parent = Part
  601. Weld.Part0 = Base
  602. Weld.Part1 = Part
  603. Weld.C0 = CFrame.new(-2.5, 3, -1.5)
  604.  
  605. Part = Instance.new("Part")
  606. Part.Name = "Steering Column"
  607. Part.BrickColor = BrickColor.new("Black")
  608. Part.TopSurface = "Smooth"
  609. Part.BottomSurface = "Smooth"
  610. Part.FormFactor = "Custom"
  611. Part.Size = Vector3.new(1, 1, 1)
  612. Part.CanCollide = false
  613. Part.Parent = Vehicle
  614. Weld = Instance.new("Weld")
  615. Weld.Parent = Part
  616. Weld.Part0 = Base
  617. Weld.Part1 = Part
  618. Weld.C0 = CFrame.new(-2.5, 2.95, -1.9)
  619.  
  620. Part = Instance.new("Part")
  621. Part.Name = "Left Turn Signal Button"
  622. Part.BrickColor = BrickColor.new("Bright green")
  623. Part.TopSurface = "Smooth"
  624. Part.BottomSurface = "Smooth"
  625. Part.FormFactor = "Custom"
  626. Part.Size = Vector3.new(0.5, 0.5, 0.5)
  627. Part.CanCollide = false
  628. Part.Parent = Vehicle
  629. Instance.new("CylinderMesh", Part)
  630. Weld = Instance.new("Weld")
  631. Weld.Parent = Part
  632. Weld.Part0 = Base
  633. Weld.Part1 = Part
  634. Weld.C0 = CFrame.new(-0.5, 2.5, -1.8) * CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
  635. local Open = Instance.new("ClickDetector")
  636. Open.Parent = Part
  637. coroutine.wrap(function(Part2, Weld2)
  638. local SignalOn = false
  639. Open.MouseClick:connect(function()
  640. SignalOn = not SignalOn
  641. Part2.BrickColor = SignalOn == true and BrickColor.new("Institutional white") or BrickColor.new("Bright green")
  642. coroutine.wrap(function()
  643. if SignalOn == true then
  644. for i = 0, 0.1, 0.01 do
  645. Weld2.C1 = CFrame.new(0, i, 0)
  646. wait()
  647. end
  648. Weld2.C1 = CFrame.new(0, 0.1, 0)
  649. else
  650. for i = 0.1, 0, -0.01 do
  651. Weld2.C1 = CFrame.new(0, i, 0)
  652. wait()
  653. end
  654. Weld2.C1 = CFrame.new(0, 0, 0)
  655. end
  656. end)()
  657. end)
  658. local i = false
  659. coroutine.wrap(function()
  660. while true do
  661. i = not i
  662. wait(0.5)
  663. end
  664. end)()
  665. while true do
  666. if Vehicle:FindFirstChild("Left Front Turn Signal") ~= nil then
  667. if Vehicle["Left Front Turn Signal"]:FindFirstChild("Weld") == nil or SignalOn == false or i == false then
  668. Vehicle["Left Front Turn Signal"].Transparency = 0.5
  669. else
  670. Vehicle["Left Front Turn Signal"].Transparency = 0
  671. end
  672. end
  673. if Vehicle:FindFirstChild("Left Rear Turn Signal") ~= nil then
  674. if Vehicle["Left Rear Turn Signal"]:FindFirstChild("Weld") == nil or SignalOn == false or i == false then
  675. Vehicle["Left Rear Turn Signal"].Transparency = 0.5
  676. else
  677. Vehicle["Left Rear Turn Signal"].Transparency = 0
  678. end
  679. end
  680. wait()
  681. end
  682. end)(Part, Weld)
  683.  
  684. Part = Instance.new("Part")
  685. Part.Name = "Headlights Button"
  686. Part.BrickColor = BrickColor.new("New Yeller")
  687. Part.TopSurface = "Smooth"
  688. Part.BottomSurface = "Smooth"
  689. Part.FormFactor = "Custom"
  690. Part.Size = Vector3.new(0.5, 0.5, 0.5)
  691. Part.CanCollide = false
  692. Part.Parent = Vehicle
  693. Instance.new("CylinderMesh", Part)
  694. Weld = Instance.new("Weld")
  695. Weld.Parent = Part
  696. Weld.Part0 = Base
  697. Weld.Part1 = Part
  698. Weld.C0 = CFrame.new(0, 2.5, -1.8) * CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
  699. local Open = Instance.new("ClickDetector")
  700. Open.Parent = Part
  701. coroutine.wrap(function(Part2, Weld2)
  702. local HeadlightsOn = false
  703. Open.MouseClick:connect(function()
  704. HeadlightsOn = not HeadlightsOn
  705. Part2.BrickColor = HeadlightsOn == true and BrickColor.new("Institutional white") or BrickColor.new("New Yeller")
  706. coroutine.wrap(function()
  707. if HeadlightsOn == true then
  708. for i = 0, 0.1, 0.01 do
  709. Weld2.C1 = CFrame.new(0, i, 0)
  710. wait()
  711. end
  712. Weld2.C1 = CFrame.new(0, 0.1, 0)
  713. else
  714. for i = 0.1, 0, -0.01 do
  715. Weld2.C1 = CFrame.new(0, i, 0)
  716. wait()
  717. end
  718. Weld2.C1 = CFrame.new(0, 0, 0)
  719. end
  720. end)()
  721. end)
  722. while true do
  723. if Vehicle:FindFirstChild("Left Headlight") ~= nil then
  724. if Vehicle["Left Headlight"]:FindFirstChild("Weld") == nil or HeadlightsOn == false then
  725. Vehicle["Left Headlight"].Transparency = 0.5
  726. else
  727. Vehicle["Left Headlight"].Transparency = 0
  728. end
  729. end
  730. if Vehicle:FindFirstChild("Right Headlight") ~= nil then
  731. if Vehicle["Right Headlight"]:FindFirstChild("Weld") == nil or HeadlightsOn == false then
  732. Vehicle["Right Headlight"].Transparency = 0.5
  733. else
  734. Vehicle["Right Headlight"].Transparency = 0
  735. end
  736. end
  737. wait()
  738. end
  739. end)(Part, Weld)
  740.  
  741. Part = Instance.new("Part")
  742. Part.Name = "Right Turn Signal Button"
  743. Part.BrickColor = BrickColor.new("Bright green")
  744. Part.TopSurface = "Smooth"
  745. Part.BottomSurface = "Smooth"
  746. Part.FormFactor = "Custom"
  747. Part.Size = Vector3.new(0.5, 0.5, 0.5)
  748. Part.CanCollide = false
  749. Part.Parent = Vehicle
  750. Instance.new("CylinderMesh", Part)
  751. Weld = Instance.new("Weld")
  752. Weld.Parent = Part
  753. Weld.Part0 = Base
  754. Weld.Part1 = Part
  755. Weld.C0 = CFrame.new(0.5, 2.5, -1.8) * CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
  756. local Open = Instance.new("ClickDetector")
  757. Open.Parent = Part
  758. coroutine.wrap(function(Part2, Weld2)
  759. local SignalOn = false
  760. Open.MouseClick:connect(function()
  761. SignalOn = not SignalOn
  762. Part2.BrickColor = SignalOn == true and BrickColor.new("Institutional white") or BrickColor.new("Bright green")
  763. coroutine.wrap(function()
  764. if SignalOn == true then
  765. for i = 0, 0.1, 0.01 do
  766. Weld2.C1 = CFrame.new(0, i, 0)
  767. wait()
  768. end
  769. Weld2.C1 = CFrame.new(0, 0.1, 0)
  770. else
  771. for i = 0.1, 0, -0.01 do
  772. Weld2.C1 = CFrame.new(0, i, 0)
  773. wait()
  774. end
  775. Weld2.C1 = CFrame.new(0, 0, 0)
  776. end
  777. end)()
  778. end)
  779. local i = false
  780. coroutine.wrap(function()
  781. while true do
  782. i = not i
  783. wait(0.5)
  784. end
  785. end)()
  786. while true do
  787. if Vehicle:FindFirstChild("Right Front Turn Signal") ~= nil then
  788. if Vehicle["Right Front Turn Signal"]:FindFirstChild("Weld") == nil or SignalOn == false or i == false then
  789. Vehicle["Right Front Turn Signal"].Transparency = 0.5
  790. else
  791. Vehicle["Right Front Turn Signal"].Transparency = 0
  792. end
  793. if Vehicle:FindFirstChild("Right Rear Turn Signal") ~= nil then
  794. if Vehicle["Right Rear Turn Signal"]:FindFirstChild("Weld") == nil or SignalOn == false or i == false then
  795. Vehicle["Right Rear Turn Signal"].Transparency = 0.5
  796. else
  797. Vehicle["Right Rear Turn Signal"].Transparency = 0
  798. end
  799. end
  800. end
  801. wait()
  802. end
  803. end)(Part, Weld)
  804.  
  805. Part = Instance.new("Part")
  806. Part.Name = "Front Left Door"
  807. Part.BrickColor = MasterColor
  808. Part.TopSurface = "Smooth"
  809. Part.BottomSurface = "Smooth"
  810. Part.FormFactor = "Custom"
  811. Part.Size = Vector3.new(1, 3, 4)
  812. Part.Parent = Vehicle
  813. Weld = Instance.new("Weld")
  814. Weld.Parent = Part
  815. Weld.Part0 = Base
  816. Weld.Part1 = Part
  817. Weld.C0 = CFrame.new(-6, 1.5, -2)
  818. Weld.C1 = CFrame.new(-0.5, 0, -2)
  819. local Open = Instance.new("ClickDetector")
  820. Open.Parent = Part
  821. coroutine.wrap(function(Weld2)
  822. local IsOpen = false
  823. local CanOpen = true
  824. Open.MouseClick:connect(function()
  825. if IsOpen == false and CanOpen == true then
  826. CanOpen = false
  827. IsOpen = true
  828. for i = 0, 1, 0.1 do
  829. Weld2.C1 = CFrame.new(Weld2.C1.p) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 * i), 0)
  830. wait()
  831. end
  832. CanOpen = true
  833. elseif IsOpen == true and CanOpen == true then
  834. CanOpen = false
  835. IsOpen = false
  836. for i = 1, 0, -0.1 do
  837. Weld2.C1 = CFrame.new(Weld2.C1.p) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 * i), 0)
  838. wait()
  839. end
  840. CanOpen = true
  841. end
  842. end)
  843. end)(Weld)
  844.  
  845. Part = Instance.new("Part")
  846. Part.Name = "Front Right Door"
  847. Part.BrickColor = MasterColor
  848. Part.TopSurface = "Smooth"
  849. Part.BottomSurface = "Smooth"
  850. Part.FormFactor = "Custom"
  851. Part.Size = Vector3.new(1, 3, 4)
  852. Part.Parent = Vehicle
  853. Weld = Instance.new("Weld")
  854. Weld.Parent = Part
  855. Weld.Part0 = Base
  856. Weld.Part1 = Part
  857. Weld.C0 = CFrame.new(6, 1.5, -2)
  858. Weld.C1 = CFrame.new(0.5, 0, -2)
  859. local Open = Instance.new("ClickDetector")
  860. Open.Parent = Part
  861. coroutine.wrap(function(Weld2)
  862. local IsOpen = false
  863. local CanOpen = true
  864. Open.MouseClick:connect(function()
  865. if IsOpen == false and CanOpen == true then
  866. CanOpen = false
  867. IsOpen = true
  868. for i = 0, 1, 0.1 do
  869. Weld2.C1 = CFrame.new(Weld2.C1.p) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 * i), 0)
  870. wait()
  871. end
  872. CanOpen = true
  873. elseif IsOpen == true and CanOpen == true then
  874. CanOpen = false
  875. IsOpen = false
  876. for i = 1, 0, -0.1 do
  877. Weld2.C1 = CFrame.new(Weld2.C1.p) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 * i), 0)
  878. wait()
  879. end
  880. CanOpen = true
  881. end
  882. end)
  883. end)(Weld)
  884.  
  885. Part = Instance.new("Part")
  886. Part.Name = "Rear Right Bumper"
  887. Part.BrickColor = MasterColor
  888. Part.TopSurface = "Smooth"
  889. Part.BottomSurface = "Smooth"
  890. Part.FormFactor = "Custom"
  891. Part.Size = Vector3.new(2, 1, 2)
  892. Part.Parent = Vehicle
  893. Mesh = Instance.new("SpecialMesh")
  894. Mesh.MeshType = "Brick"
  895. Mesh.Scale = Vector3.new(1, 1, 0.95)
  896. Mesh.Parent = Part
  897. Weld = Instance.new("Weld")
  898. Weld.Parent = Part
  899. Weld.Part0 = Base
  900. Weld.Part1 = Part
  901. Weld.C0 = CFrame.new(5, 0, 10.55)
  902.  
  903. Part = Instance.new("Part")
  904. Part.Name = "Rear Left Bumper"
  905. Part.BrickColor = MasterColor
  906. Part.TopSurface = "Smooth"
  907. Part.BottomSurface = "Smooth"
  908. Part.FormFactor = "Custom"
  909. Part.Size = Vector3.new(2, 1, 2)
  910. Part.Parent = Vehicle
  911. Mesh = Instance.new("SpecialMesh")
  912. Mesh.MeshType = "Brick"
  913. Mesh.Scale = Vector3.new(1, 1, 0.95)
  914. Mesh.Parent = Part
  915. Weld = Instance.new("Weld")
  916. Weld.Parent = Part
  917. Weld.Part0 = Base
  918. Weld.Part1 = Part
  919. Weld.C0 = CFrame.new(-5, 0, 10.55)
  920.  
  921. Part = Instance.new("Part")
  922. Part.Name = "Rear Center Bumper"
  923. Part.BrickColor = MasterColor
  924. Part.TopSurface = "Smooth"
  925. Part.BottomSurface = "Smooth"
  926. Part.FormFactor = "Custom"
  927. Part.Size = Vector3.new(8, 1, 3)
  928. Part.Parent = Vehicle
  929. Weld = Instance.new("Weld")
  930. Weld.Parent = Part
  931. Weld.Part0 = Base
  932. Weld.Part1 = Part
  933. Weld.C0 = CFrame.new(0, 0, 10)
  934.  
  935. Part = Instance.new("Part")
  936. Part.Name = "Rear Left Roof Support"
  937. Part.BrickColor = MasterColor
  938. Part.TopSurface = "Smooth"
  939. Part.BottomSurface = "Smooth"
  940. Part.FormFactor = "Custom"
  941. Part.Size = Vector3.new(2, 3, 1)
  942. Part.Parent = Vehicle
  943. Weld = Instance.new("Weld")
  944. Weld.Parent = Part
  945. Weld.Part0 = Base
  946. Weld.Part1 = Part
  947. Weld.C0 = CFrame.new(-5, 4.729, 2.355)
  948.  
  949. Part = Instance.new("Part")
  950. Part.Name = "Rear Right Roof Support"
  951. Part.BrickColor = MasterColor
  952. Part.TopSurface = "Smooth"
  953. Part.BottomSurface = "Smooth"
  954. Part.FormFactor = "Custom"
  955. Part.Size = Vector3.new(2, 4, 1)
  956. Part.Parent = Vehicle
  957. Weld = Instance.new("Weld")
  958. Weld.Parent = Part
  959. Weld.Part0 = Base
  960. Weld.Part1 = Part
  961. Weld.C0 = CFrame.new(5, 4.729, 2.355)
  962.  
  963. Part = Instance.new("Part")
  964. Part.Name = "Rear Window"
  965. Part.BrickColor = BrickColor.new("Institutional white")
  966. Part.Transparency = 0.75
  967. Part.TopSurface = "Smooth"
  968. Part.BottomSurface = "Smooth"
  969. Part.FormFactor = "Custom"
  970. Part.Size = Vector3.new(8, 3, 1)
  971. Part.Parent = Vehicle
  972. Weld = Instance.new("Weld")
  973. Weld.Parent = Part
  974. Weld.Part0 = Base
  975. Weld.Part1 = Part
  976. Weld.C0 = CFrame.new(0, 4.729, 2.355)
  977.  
  978. Part = Instance.new("Part")
  979. Part.Name = "Center"
  980. Part.BrickColor = MasterColor
  981. Part.TopSurface = "Smooth"
  982. Part.BottomSurface = "Smooth"
  983. Part.FormFactor = "Custom"
  984. Part.Size = Vector3.new(12, 3.25, 1)
  985. Part.Parent = Vehicle
  986. Weld = Instance.new("Weld")
  987. Weld.Parent = Part
  988. Weld.Part0 = Base
  989. Weld.Part1 = Part
  990. Weld.C0 = CFrame.new(0, 1.625, 2.355)
  991.  
  992. Part = Instance.new("Part")
  993. Part.Name = "Left Rear Wall"
  994. Part.BrickColor = MasterColor
  995. Part.TopSurface = "Smooth"
  996. Part.BottomSurface = "Smooth"
  997. Part.FormFactor = "Custom"
  998. Part.Size = Vector3.new(1, 4, 4)
  999. Part.Parent = Vehicle
  1000. Weld = Instance.new("Weld")
  1001. Weld.Parent = Part
  1002. Weld.Part0 = Base
  1003. Weld.Part1 = Part
  1004. Weld.C0 = CFrame.new(-5.5, 2, 4.5)
  1005.  
  1006. Part = Instance.new("Part")
  1007. Part.Name = "Right Rear Wall"
  1008. Part.BrickColor = MasterColor
  1009. Part.TopSurface = "Smooth"
  1010. Part.BottomSurface = "Smooth"
  1011. Part.FormFactor = "Custom"
  1012. Part.Size = Vector3.new(1, 4, 4)
  1013. Part.Parent = Vehicle
  1014. Weld = Instance.new("Weld")
  1015. Weld.Parent = Part
  1016. Weld.Part0 = Base
  1017. Weld.Part1 = Part
  1018. Weld.C0 = CFrame.new(5.5, 2, 4.5)
  1019.  
  1020. Part = Instance.new("Part")
  1021. Part.Name = "Rear Left Well 1"
  1022. Part.BrickColor = MasterColor
  1023. Part.TopSurface = "Smooth"
  1024. Part.BottomSurface = "Smooth"
  1025. Part.FormFactor = "Custom"
  1026. Part.Size = Vector3.new(1, 2, 3)
  1027. Part.Parent = Vehicle
  1028. Mesh = Instance.new("SpecialMesh")
  1029. Mesh.MeshType = "Brick"
  1030. Mesh.Scale = Vector3.new(1, 1.25, 1)
  1031. Mesh.Parent = Part
  1032. Weld = Instance.new("Weld")
  1033. Weld.Parent = Part
  1034. Weld.Part0 = Base
  1035. Weld.Part1 = Part
  1036. Weld.C0 = CFrame.new(-5.5, 2.75, 8)
  1037.  
  1038. Part = Instance.new("Part")
  1039. Part.Name = "Rear Left Well 2"
  1040. Part.BrickColor = MasterColor
  1041. Part.TopSurface = "Smooth"
  1042. Part.BottomSurface = "Smooth"
  1043. Part.FormFactor = "Custom"
  1044. Part.Size = Vector3.new(1, 4, 2)
  1045. Part.Parent = Vehicle
  1046. Mesh = Instance.new("SpecialMesh")
  1047. Mesh.MeshType = "Brick"
  1048. Mesh.Scale = Vector3.new(1, 0.875, 1)
  1049. Mesh.Parent = Part
  1050. Weld = Instance.new("Weld")
  1051. Weld.Parent = Part
  1052. Weld.Part0 = Base
  1053. Weld.Part1 = Part
  1054. Weld.C0 = CFrame.new(-5.5, 2.25, 10.5)
  1055.  
  1056. Part = Instance.new("Part")
  1057. Part.Name = "Rear Right Well 1"
  1058. Part.BrickColor = MasterColor
  1059. Part.TopSurface = "Smooth"
  1060. Part.BottomSurface = "Smooth"
  1061. Part.FormFactor = "Custom"
  1062. Part.Size = Vector3.new(1, 2, 3)
  1063. Part.Parent = Vehicle
  1064. Mesh = Instance.new("SpecialMesh")
  1065. Mesh.MeshType = "Brick"
  1066. Mesh.Scale = Vector3.new(1, 1.25, 1)
  1067. Mesh.Parent = Part
  1068. Weld = Instance.new("Weld")
  1069. Weld.Parent = Part
  1070. Weld.Part0 = Base
  1071. Weld.Part1 = Part
  1072. Weld.C0 = CFrame.new(5.5, 2.75, 8)
  1073.  
  1074. Part = Instance.new("Part")
  1075. Part.Name = "Rear Right Well 2"
  1076. Part.BrickColor = MasterColor
  1077. Part.TopSurface = "Smooth"
  1078. Part.BottomSurface = "Smooth"
  1079. Part.FormFactor = "Custom"
  1080. Part.Size = Vector3.new(1, 4, 2)
  1081. Part.Parent = Vehicle
  1082. Mesh = Instance.new("SpecialMesh")
  1083. Mesh.MeshType = "Brick"
  1084. Mesh.Scale = Vector3.new(1, 0.875, 1)
  1085. Mesh.Parent = Part
  1086. Weld = Instance.new("Weld")
  1087. Weld.Parent = Part
  1088. Weld.Part0 = Base
  1089. Weld.Part1 = Part
  1090. Weld.C0 = CFrame.new(5.5, 2.25, 10.5)
  1091.  
  1092. Part = Instance.new("WedgePart")
  1093. Part.Name = "Rear Left Well 3"
  1094. Part.BrickColor = MasterColor
  1095. Part.TopSurface = "Smooth"
  1096. Part.BottomSurface = "Smooth"
  1097. Part.FormFactor = "Custom"
  1098. Part.Size = Vector3.new(1, 1, 1)
  1099. Part.Parent = Vehicle
  1100. Mesh = Instance.new("SpecialMesh")
  1101. Mesh.MeshType = "Wedge"
  1102. Mesh.Scale = Vector3.new(1, 0.5, 0.5)
  1103. Mesh.Parent = Part
  1104. Weld = Instance.new("Weld")
  1105. Weld.Parent = Part
  1106. Weld.Part0 = Base
  1107. Weld.Part1 = Part
  1108. Weld.C0 = CFrame.new(-5.5, 1.25, 6.75) * CFrame.fromEulerAnglesXYZ(math.rad(180), 0, 0)
  1109.  
  1110. Part = Instance.new("WedgePart")
  1111. Part.Name = "Rear Right Well 3"
  1112. Part.BrickColor = MasterColor
  1113. Part.TopSurface = "Smooth"
  1114. Part.BottomSurface = "Smooth"
  1115. Part.FormFactor = "Custom"
  1116. Part.Size = Vector3.new(1, 1, 1)
  1117. Part.Parent = Vehicle
  1118. Mesh = Instance.new("SpecialMesh")
  1119. Mesh.MeshType = "Wedge"
  1120. Mesh.Scale = Vector3.new(1, 0.5, 0.5)
  1121. Mesh.Parent = Part
  1122. Weld = Instance.new("Weld")
  1123. Weld.Parent = Part
  1124. Weld.Part0 = Base
  1125. Weld.Part1 = Part
  1126. Weld.C0 = CFrame.new(5.5, 1.25, 6.75) * CFrame.fromEulerAnglesXYZ(math.rad(180), 0, 0)
  1127.  
  1128. Part = Instance.new("WedgePart")
  1129. Part.Name = "Rear Left Well 4"
  1130. Part.BrickColor = MasterColor
  1131. Part.TopSurface = "Smooth"
  1132. Part.BottomSurface = "Smooth"
  1133. Part.FormFactor = "Custom"
  1134. Part.Size = Vector3.new(1, 1, 1)
  1135. Part.Parent = Vehicle
  1136. Mesh = Instance.new("SpecialMesh")
  1137. Mesh.MeshType = "Wedge"
  1138. Mesh.Scale = Vector3.new(1, 0.5, 0.5)
  1139. Mesh.Parent = Part
  1140. Weld = Instance.new("Weld")
  1141. Weld.Parent = Part
  1142. Weld.Part0 = Base
  1143. Weld.Part1 = Part
  1144. Weld.C0 = CFrame.new(-5.5, 1.25, 9.25) * CFrame.fromEulerAnglesXYZ(math.rad(180), math.rad(180), 0)
  1145.  
  1146. Part = Instance.new("WedgePart")
  1147. Part.Name = "Rear Right Well 4"
  1148. Part.BrickColor = MasterColor
  1149. Part.TopSurface = "Smooth"
  1150. Part.BottomSurface = "Smooth"
  1151. Part.FormFactor = "Custom"
  1152. Part.Size = Vector3.new(1, 1, 1)
  1153. Part.Parent = Vehicle
  1154. Mesh = Instance.new("SpecialMesh")
  1155. Mesh.MeshType = "Wedge"
  1156. Mesh.Scale = Vector3.new(1, 0.5, 0.5)
  1157. Mesh.Parent = Part
  1158. Weld = Instance.new("Weld")
  1159. Weld.Parent = Part
  1160. Weld.Part0 = Base
  1161. Weld.Part1 = Part
  1162. Weld.C0 = CFrame.new(5.5, 1.25, 9.25) * CFrame.fromEulerAnglesXYZ(math.rad(180), math.rad(180), 0)
  1163.  
  1164. Part = Instance.new("Part")
  1165. Part.Name = "Rear Left Well 5"
  1166. Part.BrickColor = MasterColor
  1167. Part.TopSurface = "Smooth"
  1168. Part.BottomSurface = "Smooth"
  1169. Part.FormFactor = "Custom"
  1170. Part.Size = Vector3.new(1, 1, 3)
  1171. Part.Parent = Vehicle
  1172. Mesh = Instance.new("SpecialMesh")
  1173. Mesh.MeshType = "Brick"
  1174. Mesh.Scale = Vector3.new(1.01, 1.01, 1.2)
  1175. Mesh.Parent = Part
  1176. Weld = Instance.new("Weld")
  1177. Weld.Parent = Part
  1178. Weld.Part0 = Base
  1179. Weld.Part1 = Part
  1180. Weld.C0 = CFrame.new(-4.5, 1, 8)
  1181.  
  1182. Part = Instance.new("Part")
  1183. Part.Name = "Rear Right Well 5"
  1184. Part.BrickColor = MasterColor
  1185. Part.TopSurface = "Smooth"
  1186. Part.BottomSurface = "Smooth"
  1187. Part.FormFactor = "Custom"
  1188. Part.Size = Vector3.new(1, 1, 3)
  1189. Part.Parent = Vehicle
  1190. Mesh = Instance.new("SpecialMesh")
  1191. Mesh.MeshType = "Brick"
  1192. Mesh.Scale = Vector3.new(1.01, 1.01, 1.2)
  1193. Mesh.Parent = Part
  1194. Weld = Instance.new("Weld")
  1195. Weld.Parent = Part
  1196. Weld.Part0 = Base
  1197. Weld.Part1 = Part
  1198. Weld.C0 = CFrame.new(4.5, 1, 8)
  1199.  
  1200. Part = Instance.new("Part")
  1201. Part.Name = "Trunk"
  1202. Part.BrickColor = MasterColor
  1203. Part.TopSurface = "Smooth"
  1204. Part.BottomSurface = "Smooth"
  1205. Part.FormFactor = "Custom"
  1206. Part.Size = Vector3.new(10, 4, 1)
  1207. Part.Parent = Vehicle
  1208. Mesh = Instance.new("SpecialMesh")
  1209. Mesh.MeshType = "Brick"
  1210. Mesh.Scale = Vector3.new(1, 0.875, 0.5)
  1211. Mesh.Parent = Part
  1212. Weld = Instance.new("Weld")
  1213. Weld.Parent = Part
  1214. Weld.Part0 = Base
  1215. Weld.Part1 = Part
  1216. Weld.C0 = CFrame.new(0, 0.5, 11)
  1217. Weld.C1 = CFrame.new(0, -1.75, -0.25)
  1218. local Open = Instance.new("ClickDetector")
  1219. Open.Parent = Part
  1220. coroutine.wrap(function(Weld2)
  1221. local IsOpen = false
  1222. local CanOpen = true
  1223. Open.MouseClick:connect(function()
  1224. if IsOpen == false and CanOpen == true then
  1225. CanOpen = false
  1226. IsOpen = true
  1227. for i = 0, 1, 0.05 do
  1228. Weld2.C1 = CFrame.new(Weld2.C1.p) * CFrame.fromEulerAnglesXYZ(math.rad(-90 * i), 0, 0)
  1229. wait()
  1230. end
  1231. Weld2.C1 = CFrame.new(Weld2.C1.p) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, 0)
  1232. CanOpen = true
  1233. elseif IsOpen == true and CanOpen == true then
  1234. CanOpen = false
  1235. IsOpen = false
  1236. for i = 1, 0, -0.05 do
  1237. Weld2.C1 = CFrame.new(Weld2.C1.p) * CFrame.fromEulerAnglesXYZ(math.rad(-90 * i), 0, 0)
  1238. wait()
  1239. end
  1240. Weld2.C1 = CFrame.new(Weld2.C1.p)
  1241. CanOpen = true
  1242. end
  1243. end)
  1244. end)(Weld)
  1245.  
  1246. Part = Instance.new("Part")
  1247. Part.Name = "Left Brake Light"
  1248. Part.TopSurface = "Smooth"
  1249. Part.BottomSurface = "Smooth"
  1250. Part.FormFactor = "Custom"
  1251. Part.Size = Vector3.new(2, 1, 1)
  1252. Part.Parent = Vehicle
  1253. Mesh = Instance.new("SpecialMesh")
  1254. Mesh.MeshType = "Brick"
  1255. Mesh.Scale = Vector3.new(1, 1, 0.01)
  1256. Mesh.Parent = Part
  1257. Weld = Instance.new("Weld")
  1258. Weld.Parent = Part
  1259. Weld.Part0 = Vehicle.Trunk
  1260. Weld.Part1 = Part
  1261. Weld.C0 = CFrame.new(-4, 0.25, 0.25)
  1262. coroutine.wrap(function(Part2)
  1263. while true do
  1264. if Part2:FindFirstChild("Weld") == nil or IsBraking == false then
  1265. Part2.Transparency = 0.75
  1266. Part2.BrickColor = BrickColor.new("Dark red")
  1267. else
  1268. Part2.Transparency = 0
  1269. Part2.BrickColor = BrickColor.new("Really red")
  1270. end
  1271. wait()
  1272. end
  1273. end)(Part)
  1274.  
  1275. Part = Instance.new("Part")
  1276. Part.Name = "Left Rear Turn Signal"
  1277. Part.BrickColor = BrickColor.new("New Yeller")
  1278. Part.TopSurface = "Smooth"
  1279. Part.BottomSurface = "Smooth"
  1280. Part.FormFactor = "Custom"
  1281. Part.Size = Vector3.new(1, 1, 1)
  1282. Part.Parent = Vehicle
  1283. Mesh = Instance.new("SpecialMesh")
  1284. Mesh.MeshType = "Brick"
  1285. Mesh.Scale = Vector3.new(0.5, 1.5, 0.01)
  1286. Mesh.Parent = Part
  1287. Weld = Instance.new("Weld")
  1288. Weld.Parent = Part
  1289. Weld.Part0 = Base
  1290. Weld.Part1 = Part
  1291. Weld.C0 = CFrame.new(-5.25, 2.25, 11.5)
  1292.  
  1293. Part = Instance.new("Part")
  1294. Part.Name = "Right Brake Light"
  1295. Part.TopSurface = "Smooth"
  1296. Part.BottomSurface = "Smooth"
  1297. Part.FormFactor = "Custom"
  1298. Part.Size = Vector3.new(2, 1, 1)
  1299. Part.Parent = Vehicle
  1300. Mesh = Instance.new("SpecialMesh")
  1301. Mesh.MeshType = "Brick"
  1302. Mesh.Scale = Vector3.new(1, 1, 0.01)
  1303. Mesh.Parent = Part
  1304. Weld = Instance.new("Weld")
  1305. Weld.Parent = Part
  1306. Weld.Part0 = Vehicle.Trunk
  1307. Weld.Part1 = Part
  1308. Weld.C0 = CFrame.new(4, 0.25, 0.25)
  1309. coroutine.wrap(function(Part2)
  1310. while true do
  1311. if Part2:FindFirstChild("Weld") == nil or IsBraking == false then
  1312. Part2.Transparency = 0.75
  1313. Part2.BrickColor = BrickColor.new("Dark red")
  1314. else
  1315. Part2.Transparency = 0
  1316. Part2.BrickColor = BrickColor.new("Really red")
  1317. end
  1318. wait()
  1319. end
  1320. end)(Part)
  1321.  
  1322. Part = Instance.new("Part")
  1323. Part.Name = "Right Rear Turn Signal"
  1324. Part.BrickColor = BrickColor.new("New Yeller")
  1325. Part.TopSurface = "Smooth"
  1326. Part.BottomSurface = "Smooth"
  1327. Part.FormFactor = "Custom"
  1328. Part.Size = Vector3.new(1, 1, 1)
  1329. Part.Parent = Vehicle
  1330. Mesh = Instance.new("SpecialMesh")
  1331. Mesh.MeshType = "Brick"
  1332. Mesh.Scale = Vector3.new(0.5, 1.5, 0.01)
  1333. Mesh.Parent = Part
  1334. Weld = Instance.new("Weld")
  1335. Weld.Parent = Part
  1336. Weld.Part0 = Base
  1337. Weld.Part1 = Part
  1338. Weld.C0 = CFrame.new(5.25, 2.25, 11.5)
  1339.  
  1340. Part = Instance.new("Part")
  1341. Part.Name = "Left Reverse Light"
  1342. Part.TopSurface = "Smooth"
  1343. Part.BottomSurface = "Smooth"
  1344. Part.FormFactor = "Custom"
  1345. Part.Size = Vector3.new(2, 1, 1)
  1346. Part.Parent = Vehicle
  1347. Mesh = Instance.new("SpecialMesh")
  1348. Mesh.MeshType = "Brick"
  1349. Mesh.Scale = Vector3.new(1, 0.5, 0.01)
  1350. Mesh.Parent = Part
  1351. Weld = Instance.new("Weld")
  1352. Weld.Parent = Part
  1353. Weld.Part0 = Vehicle.Trunk
  1354. Weld.Part1 = Part
  1355. Weld.C0 = CFrame.new(-4, -0.5, 0.25)
  1356. coroutine.wrap(function(Part2)
  1357. wait()
  1358. while true do
  1359. if Part2:FindFirstChild("Weld") == nil or ThrottlePercent >= 0 then
  1360. Part2.Transparency = 0.5
  1361. Part2.BrickColor = BrickColor.new("White")
  1362. else
  1363. Part2.Transparency = 0
  1364. Part2.BrickColor = BrickColor.new("Institutional white")
  1365. end
  1366. wait()
  1367. end
  1368. end)(Part)
  1369.  
  1370. Part = Instance.new("Part")
  1371. Part.Name = "Right Reverse Light"
  1372. Part.TopSurface = "Smooth"
  1373. Part.BottomSurface = "Smooth"
  1374. Part.FormFactor = "Custom"
  1375. Part.Size = Vector3.new(2, 1, 1)
  1376. Part.Parent = Vehicle
  1377. Mesh = Instance.new("SpecialMesh")
  1378. Mesh.MeshType = "Brick"
  1379. Mesh.Scale = Vector3.new(1, 0.5, 0.01)
  1380. Mesh.Parent = Part
  1381. Weld = Instance.new("Weld")
  1382. Weld.Parent = Part
  1383. Weld.Part0 = Vehicle.Trunk
  1384. Weld.Part1 = Part
  1385. Weld.C0 = CFrame.new(4, -0.5, 0.25)
  1386. coroutine.wrap(function(Part2)
  1387. wait()
  1388. while true do
  1389. if Part2:FindFirstChild("Weld") == nil or ThrottlePercent >= 0 then
  1390. Part2.Transparency = 0.5
  1391. Part2.BrickColor = BrickColor.new("White")
  1392. else
  1393. Part2.Transparency = 0
  1394. Part2.BrickColor = BrickColor.new("Institutional white")
  1395. end
  1396. wait()
  1397. end
  1398. end)(Part)
  1399.  
  1400. Part = Instance.new("Part")
  1401. Part.Name = "Rear Right Wheel"
  1402. Part.BrickColor = BrickColor.new("Really black")
  1403. Part.TopSurface = "Smooth"
  1404. Part.BottomSurface = "Smooth"
  1405. Part.FormFactor = "Custom"
  1406. Part.Size = Vector3.new(3, 2, 3)
  1407. Part.Friction = TireFriction
  1408. Part.Elasticity = TireElasticity
  1409. Part.Parent = Vehicle
  1410. Mesh = Instance.new("CylinderMesh")
  1411. Mesh.Parent = Part
  1412. Weld = Instance.new("Weld")
  1413. Weld.Parent = Part
  1414. Weld.Part0 = Base
  1415. Weld.Part1 = Part
  1416. Weld.C0 = CFrame.new(5, 0, 8) * CFrame.fromEulerAnglesXYZ(0, 0, math.rad(90))
  1417.  
  1418. Part = Instance.new("Part")
  1419. Part.Name = "Rear Left Wheel"
  1420. Part.BrickColor = BrickColor.new("Really black")
  1421. Part.TopSurface = "Smooth"
  1422. Part.BottomSurface = "Smooth"
  1423. Part.FormFactor = "Custom"
  1424. Part.Size = Vector3.new(3, 2, 3)
  1425. Part.Friction = TireFriction
  1426. Part.Elasticity = TireElasticity
  1427. Part.Parent = Vehicle
  1428. Mesh = Instance.new("CylinderMesh")
  1429. Mesh.Parent = Part
  1430. Weld = Instance.new("Weld")
  1431. Weld.Parent = Part
  1432. Weld.Part0 = Base
  1433. Weld.Part1 = Part
  1434. Weld.C0 = CFrame.new(-5, 0, 8) * CFrame.fromEulerAnglesXYZ(0, 0, math.rad(90))
  1435.  
  1436. Part = Instance.new("Part")
  1437. Part.Name = "Front Right Wheel"
  1438. Part.BrickColor = BrickColor.new("Really black")
  1439. Part.TopSurface = "Smooth"
  1440. Part.BottomSurface = "Smooth"
  1441. Part.FormFactor = "Custom"
  1442. Part.Size = Vector3.new(3, 2, 3)
  1443. Part.Friction = TireFriction
  1444. Part.Elasticity = TireElasticity
  1445. Part.Parent = Vehicle
  1446. Mesh = Instance.new("CylinderMesh")
  1447. Mesh.Parent = Part
  1448. Weld = Instance.new("Weld")
  1449. Weld.Parent = Part
  1450. Weld.Part0 = Base
  1451. Weld.Part1 = Part
  1452. Weld.C0 = CFrame.new(5, 0, -4) * CFrame.fromEulerAnglesXYZ(0, 0, math.rad(90))
  1453.  
  1454. Part = Instance.new("Part")
  1455. Part.Name = "Front Left Wheel"
  1456. Part.BrickColor = BrickColor.new("Really black")
  1457. Part.TopSurface = "Smooth"
  1458. Part.BottomSurface = "Smooth"
  1459. Part.FormFactor = "Custom"
  1460. Part.Size = Vector3.new(3, 2, 3)
  1461. Part.Friction = TireFriction
  1462. Part.Elasticity = TireElasticity
  1463. Part.Parent = Vehicle
  1464. Mesh = Instance.new("CylinderMesh")
  1465. Mesh.Parent = Part
  1466. Weld = Instance.new("Weld")
  1467. Weld.Parent = Part
  1468. Weld.Part0 = Base
  1469. Weld.Part1 = Part
  1470. Weld.C0 = CFrame.new(-5, 0, -4) * CFrame.fromEulerAnglesXYZ(0, 0, math.rad(90))
  1471.  
  1472. Vehicle:MoveTo((Workspace:FindFirstChild("adamfontenot") == nil and Vector3.new() or Workspace.adamfontenot.Torso.Position) + Vector3.new(9, 3, 0))
  1473. --[[
  1474. Vehicle Support v8
  1475. Variables:
  1476.  
  1477. Health
  1478. MaxHealth
  1479. ToughnessMinorDamage
  1480. ToughnessMajorDamage
  1481.  
  1482. DriftAcceleration
  1483. DriftSteerDifficulty
  1484. DriftSteerPower
  1485.  
  1486. Acceleration
  1487. TopSpeed
  1488. Deceleration
  1489. BrakePower
  1490.  
  1491. SteerDifficulty
  1492. SteerPower
  1493.  
  1494. TireFriction
  1495. TireElasticity
  1496. MasterColor
  1497. Wrecked
  1498.  
  1499. Vehicle (Model)
  1500. Base (Part)
  1501. Thrust (BodyVelocity)
  1502. Steer (BodyGyro)
  1503. Seat (VehicleSeat)
  1504. --]]
  1505.  
  1506.  
  1507. Wheels = {}
  1508. RearTraction = false
  1509. FrontTraction = false
  1510.  
  1511. DriftCheck = 0
  1512. Drifting = false
  1513.  
  1514. ThrottlePercent = 0
  1515. IsBraking = false
  1516.  
  1517. SteerPercent = 0
  1518.  
  1519. if Wrecked == true then Health = math.random(1, MaxHealth) end
  1520.  
  1521. for _, Part in pairs(Vehicle:GetChildren()) do
  1522. if Part:IsA("BasePart") then
  1523. Part.Locked = true
  1524. if Wrecked == true then
  1525. pcall(function() Part.Weld.C1 = Part.Weld.C1 * CFrame.fromEulerAnglesXYZ(math.rad(math.random(-7.5, 7.5)), math.rad(math.random(-7.5, 7.5)), math.rad(math.random(-7.5, 7.5))) end)
  1526. if math.random(1, 5) == 1 then Part.Material = "CorrodedMetal" end
  1527. if math.random(1, 10) == 1 then Part.BrickColor = BrickColor.new("Black") end
  1528. if math.random(1, 50) == 1 then Part.BrickColor = BrickColor.new("Really black") end
  1529. end
  1530. if string.match(Part.Name, "VehicleSeat") == nil and string.match(Part.Name, "VehicleEngine") == nil and string.match(Part.Name, "VehicleBase") == nil and string.match(Part.Name, " Wheel") == nil then
  1531. Part.Touched:connect(function(Hit)
  1532. if Hit.Parent == nil then return end
  1533. if Hit.Parent == Vehicle then return end
  1534. if Hit.CanCollide == false then return end
  1535. if Part:FindFirstChild("Weld") == nil then return end
  1536. if string.match(Hit.Name, "VehicleSeat") or string.match(Hit.Name, "VehicleEngine") or string.match(Hit.Name, "VehicleBase") then return end
  1537. local velocity1 = {
  1538. math.abs(Part.Velocity.x),
  1539. math.abs(Part.Velocity.y),
  1540. math.abs(Part.Velocity.z)
  1541. }
  1542. local rotvelocity1 = {
  1543. math.abs(Part.RotVelocity.x),
  1544. math.abs(Part.RotVelocity.y),
  1545. math.abs(Part.RotVelocity.z)
  1546. }
  1547. local velocity2 = {
  1548. math.abs(Hit.Velocity.x),
  1549. math.abs(Hit.Velocity.y),
  1550. math.abs(Hit.Velocity.z)
  1551. }
  1552. local rotvelocity2 = {
  1553. math.abs(Hit.RotVelocity.x),
  1554. math.abs(Hit.RotVelocity.y),
  1555. math.abs(Hit.RotVelocity.z)
  1556. }
  1557. for i = 1, #velocity1 do
  1558. local Total = math.abs(velocity1[i] - velocity2[i])
  1559. if Total > ToughnessMinorDamage / 2 then
  1560. Health = Health - (Total / 10)
  1561. end
  1562. if Total > ToughnessMinorDamage then
  1563. ThrottlePercent = ThrottlePercent * 0.9
  1564. pcall(function() Part.Weld.C0 = Part.Weld.C0 * CFrame.fromEulerAnglesXYZ(math.rad(math.random(-Total / 10, Total / 10)), math.rad(math.random(-Total / 10, Total / 10)), math.rad(math.random(-Total / 10, Total / 10))) end)
  1565. pcall(function() Part.Weld.C1 = Part.Weld.C1 * CFrame.fromEulerAnglesXYZ(math.rad(math.random(-Total / 10, Total / 10)), math.rad(math.random(-Total / 10, Total / 10)), math.rad(math.random(-Total / 10, Total / 10))) end)
  1566. end
  1567. if Total > ToughnessMajorDamage and Hit:GetMass() > 3 then
  1568. ThrottlePercent = 0
  1569. Part:BreakJoints()
  1570. Part.Velocity = Part.Velocity + math.random(math.random(-Total / 10, Total / 10), math.random(-Total / 10, Total / 10), math.random(-Total / 10, Total / 10))
  1571. Part.RotVelocity = Part.RotVelocity + math.random(math.random(-Total / 25, Total / 25), math.random(-Total / 25, Total / 25), math.random(-Total / 25, Total / 25))
  1572. end
  1573. if Total > math.random(50, 75) then
  1574. if Hit.Parent:FindFirstChild("Humanoid") ~= nil then
  1575. local Tag = Instance.new("ObjectValue", Hit.Parent.Humanoid)
  1576. Tag.Name = "creator"
  1577. Tag.Value = Driver
  1578. coroutine.wrap(function() wait(1) Tag:Remove() end)()
  1579. end
  1580. Hit:BreakJoints()
  1581. end
  1582. end
  1583. for i = 1, #rotvelocity1 do
  1584. local Total = math.abs(velocity1[i] - velocity2[i])
  1585. if Total > ToughnessMinorDamage / 4 and not string.match(Part.Name, " Wheel") then
  1586. Health = Health - (Total / 10)
  1587. end
  1588. if Total > ToughnessMinorDamage / 2 and not string.match(Part.Name, " Wheel") then
  1589. ThrottlePercent = ThrottlePercent * 0.9
  1590. pcall(function() Part.Weld.C0 = Part.Weld.C0 * CFrame.fromEulerAnglesXYZ(math.rad(math.random(-Total / 10, Total / 10)), math.rad(math.random(-Total / 10, Total / 10)), math.rad(math.random(-Total / 10, Total / 10))) end)
  1591. pcall(function() Part.Weld.C1 = Part.Weld.C1 * CFrame.fromEulerAnglesXYZ(math.rad(math.random(-Total / 10, Total / 10)), math.rad(math.random(-Total / 10, Total / 10)), math.rad(math.random(-Total / 10, Total / 10))) end)
  1592. end
  1593. if Total > ToughnessMajorDamage / 2 and Hit:GetMass() > 3 then
  1594. ThrottlePercent = ThrottlePercent * 0.75
  1595. Part:BreakJoints()
  1596. Part.Velocity = Part.Velocity + Vector3.new(math.random(-Total / 10, Total / 10), math.random(-Total / 10, Total / 10), math.random(-Total / 10, Total / 10))
  1597. Part.RotVelocity = Part.RotVelocity + Vector3.new(math.random(-Total / 25, Total / 25), math.random(-Total / 25, Total / 25), math.random(-Total / 25, Total / 25))
  1598. end
  1599. if Total > math.random(50, 75) then
  1600. if Hit.Parent:FindFirstChild("Humanoid") ~= nil then
  1601. local Tag = Instance.new("ObjectValue", Hit.Parent.Humanoid)
  1602. Tag.Name = "creator"
  1603. Tag.Value = Driver
  1604. coroutine.wrap(function() wait(1) Tag:Remove() end)()
  1605. end
  1606. Hit:BreakJoints()
  1607. end
  1608. end
  1609. end)
  1610. end
  1611. if string.match(Part.Name, " Wheel") then
  1612. table.insert(Wheels, Part)
  1613. end
  1614. Part.ChildRemoved:connect(function(Object)
  1615. if Object.Name == "Weld" then
  1616. Health = Health - 25
  1617. end
  1618. end)
  1619. end
  1620. end
  1621.  
  1622.  
  1623. while true do
  1624. RearTraction = false
  1625. FrontTraction = false
  1626. for _, Part in pairs(Wheels) do
  1627. local Hit = Workspace:FindPartOnRay(Ray.new(Part.Position, (Part.Position - (Part.CFrame * CFrame.fromEulerAnglesXYZ(0, 0, math.rad(90)) * CFrame.new(0, -1, 0)).p).unit * ((Part.Size.x / 2) + 0.5)), Vehicle)
  1628. if Hit ~= nil and Part:FindFirstChild("Weld") ~= nil then
  1629. if string.match(Part.Name, "Rear") then
  1630. RearTraction = true
  1631. else
  1632. FrontTraction = true
  1633. end
  1634. end
  1635. end
  1636. if Vehicle:FindFirstChild("VehicleEngine") ~= nil then
  1637. if Vehicle.VehicleEngine:FindFirstChild("Weld") == nil then
  1638. Health = 0
  1639. end
  1640. if pcall(function() return EffectHolder.Parent end) == false then
  1641. EffectHolder = Instance.new("Part")
  1642. EffectHolder.Name = ""
  1643. EffectHolder.CanCollide = false
  1644. EffectHolder.Anchored = true
  1645. EffectHolder.FormFactor = "Custom"
  1646. EffectHolder.Size = Vector3.new(1, 1, 1)
  1647. EffectHolder.TopSurface = 0
  1648. EffectHolder.BottomSurface = 0
  1649. EffectHolder.Transparency = 1
  1650. EffectHolder.Parent = Vehicle
  1651. end
  1652. EffectHolder.CFrame = CFrame.new(Vehicle.VehicleEngine.Position)
  1653. for _, Part in pairs(EffectHolder:GetChildren()) do
  1654. pcall(function() Part.Enabled = false end)
  1655. end
  1656. if Health <= 0 then
  1657. if EffectHolder:FindFirstChild("Smoke 0") == nil then
  1658. local Smoke = Instance.new("Smoke")
  1659. Smoke.Name = "Smoke 0"
  1660. Smoke.Color = Color3.new(0.05, 0.05, 0.05)
  1661. Smoke.RiseVelocity = 12.5
  1662. Smoke.Size = 12.5
  1663. Smoke.Parent = EffectHolder
  1664. end
  1665. if EffectHolder:FindFirstChild("Fire 0") == nil then
  1666. local Fire = Instance.new("Fire")
  1667. Fire.Name = "Fire 0"
  1668. Fire.Heat = 10
  1669. Fire.Size = 20
  1670. Fire.Parent = EffectHolder
  1671. end
  1672. EffectHolder["Smoke 0"].Enabled = true
  1673. EffectHolder["Fire 0"].Enabled = true
  1674. elseif Health < MaxHealth * 0.15 then
  1675. if EffectHolder:FindFirstChild("Smoke 1") == nil then
  1676. local Smoke = Instance.new("Smoke")
  1677. Smoke.Name = "Smoke 1"
  1678. Smoke.Color = Color3.new(0.25, 0.25, 0.25)
  1679. Smoke.RiseVelocity = 10
  1680. Smoke.Size = 10
  1681. Smoke.Parent = EffectHolder
  1682. end
  1683. if EffectHolder:FindFirstChild("Fire 1") == nil then
  1684. local Fire = Instance.new("Fire")
  1685. Fire.Name = "Fire 1"
  1686. Fire.Heat = 5
  1687. Fire.Size = 10
  1688. Fire.Parent = EffectHolder
  1689. end
  1690. EffectHolder["Smoke 1"].Enabled = true
  1691. EffectHolder["Fire 1"].Enabled = true
  1692. elseif Health < MaxHealth * 0.2 then
  1693. if EffectHolder:FindFirstChild("Smoke 2") == nil then
  1694. local Smoke = Instance.new("Smoke")
  1695. Smoke.Name = "Smoke 2"
  1696. Smoke.Color = Color3.new(0.5, 0.5, 0.5)
  1697. Smoke.RiseVelocity = 9
  1698. Smoke.Size = 7.5
  1699. Smoke.Parent = EffectHolder
  1700. end
  1701. EffectHolder["Smoke 2"].Enabled = true
  1702. elseif Health < MaxHealth * 0.3 then
  1703. if EffectHolder:FindFirstChild("Smoke 3") == nil then
  1704. local Smoke = Instance.new("Smoke")
  1705. Smoke.Name = "Smoke 3"
  1706. Smoke.Color = Color3.new(0.75, 0.75, 0.75)
  1707. Smoke.RiseVelocity = 7.5
  1708. Smoke.Size = 5
  1709. Smoke.Parent = EffectHolder
  1710. end
  1711. EffectHolder["Smoke 3"].Enabled = true
  1712. elseif Health < MaxHealth * 0.4 then
  1713. if EffectHolder:FindFirstChild("Smoke 4") == nil then
  1714. local Smoke = Instance.new("Smoke")
  1715. Smoke.Name = "Smoke 4"
  1716. Smoke.Color = Color3.new(1, 1, 1)
  1717. Smoke.RiseVelocity = 5
  1718. Smoke.Size = 3
  1719. Smoke.Parent = EffectHolder
  1720. end
  1721. EffectHolder["Smoke 4"].Enabled = true
  1722. end
  1723. else
  1724. Health = 0
  1725. if EffectHolder ~= nil then
  1726. EffectHolder:Remove()
  1727. EffectHolder = nil
  1728. end
  1729. end
  1730. if ThrottlePercent < 0.2 then
  1731. Drifting = false
  1732. DriftCheck = 0
  1733. end
  1734. if Seat.Throttle == 1 then
  1735. if ThrottlePercent > 0.2 and tick() - DriftCheck < 0.5 and Drifting == false then
  1736. coroutine.wrap(function()
  1737. DriftCheck = 0
  1738. Drifting = true
  1739. local OldAcceleration = Acceleration
  1740. local OldSteerDifficulty = SteerDifficulty
  1741. local OldSteerPower = SteerPower
  1742. Acceleration = DriftAcceleration
  1743. SteerDifficulty = DriftSteerDifficulty
  1744. SteerPower = DriftSteerPower
  1745. local EffectHolder1 = Instance.new("Part")
  1746. EffectHolder1.Name = ""
  1747. EffectHolder1.CanCollide = false
  1748. EffectHolder1.Anchored = true
  1749. EffectHolder1.FormFactor = "Custom"
  1750. EffectHolder1.Size = Vector3.new(1, 1, 1)
  1751. EffectHolder1.TopSurface = 0
  1752. EffectHolder1.BottomSurface = 0
  1753. EffectHolder1.Transparency = 1
  1754. EffectHolder1.Parent = Vehicle
  1755. local Smoke = Instance.new("Smoke")
  1756. Smoke.Color = Color3.new(0.9, 0.9, 0.9)
  1757. Smoke.RiseVelocity = 15
  1758. Smoke.Size = 10
  1759. Smoke.Parent = EffectHolder1
  1760. local EffectHolder2 = Instance.new("Part")
  1761. EffectHolder2.Name = ""
  1762. EffectHolder2.CanCollide = false
  1763. EffectHolder2.Anchored = true
  1764. EffectHolder2.FormFactor = "Custom"
  1765. EffectHolder2.Size = Vector3.new(1, 1, 1)
  1766. EffectHolder2.TopSurface = 0
  1767. EffectHolder2.BottomSurface = 0
  1768. EffectHolder2.Transparency = 1
  1769. EffectHolder2.Parent = Vehicle
  1770. local Smoke = Instance.new("Smoke")
  1771. Smoke.Color = Color3.new(0.9, 0.9, 0.9)
  1772. Smoke.RiseVelocity = 15
  1773. Smoke.Size = 10
  1774. Smoke.Parent = EffectHolder2
  1775. while Drifting == true do
  1776. if pcall(function() return Vehicle["Rear Left Wheel"].Weld end) == true then
  1777. EffectHolder1.CFrame = Vehicle["Rear Left Wheel"].CFrame * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, 0)
  1778. else
  1779. EffectHolder1.Smoke.Enabled = false
  1780. end
  1781. if pcall(function() return Vehicle["Rear Right Wheel"].Weld end) == true then
  1782. EffectHolder2.CFrame = Vehicle["Rear Right Wheel"].CFrame * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, 0)
  1783. else
  1784. EffectHolder2.Smoke.Enabled = false
  1785. end
  1786. wait()
  1787. end
  1788. Acceleration = OldAcceleration
  1789. SteerDifficulty = OldSteerDifficulty
  1790. SteerPower = OldSteerPower
  1791. EffectHolder1.Smoke.Enabled = false
  1792. EffectHolder2.Smoke.Enabled = false
  1793. wait(7.5)
  1794. EffectHolder1:Remove()
  1795. EffectHolder2:Remove()
  1796. end)()
  1797. coroutine.wrap(function()
  1798. while Drifting == true do
  1799. if pcall(function() return Vehicle["Rear Left Wheel"].Weld end) == true then
  1800. local DriftSound = Instance.new("Sound")
  1801. DriftSound.SoundId = "http://www.roblox.com/Asset/?id=31245495"
  1802. DriftSound.Volume = 1
  1803. DriftSound.Pitch = math.random(90, 120) / 100
  1804. DriftSound.Parent = Vehicle["Rear Left Wheel"]
  1805. DriftSound:Play()
  1806. end
  1807. wait(math.random(35, 60) / 100)
  1808. end
  1809. end)()
  1810. coroutine.wrap(function()
  1811. while Drifting == true do
  1812. if pcall(function() return Vehicle["Rear Right Wheel"].Weld end) == true then
  1813. local DriftSound = Instance.new("Sound")
  1814. DriftSound.SoundId = "http://www.roblox.com/Asset/?id=31245495"
  1815. DriftSound.Volume = 1
  1816. DriftSound.Pitch = math.random(90, 120) / 100
  1817. DriftSound.Parent = Vehicle["Rear Right Wheel"]
  1818. DriftSound:Play()
  1819. end
  1820. wait(math.random(35, 60) / 100)
  1821. end
  1822. end)()
  1823. coroutine.wrap(function()
  1824. while Drifting == true do
  1825. if pcall(function() return Vehicle["Rear Wheel"].Weld end) == true then
  1826. local DriftSound = Instance.new("Sound")
  1827. DriftSound.SoundId = "http://www.roblox.com/Asset/?id=31245495"
  1828. DriftSound.Volume = 1
  1829. DriftSound.Pitch = math.random(90, 120) / 100
  1830. DriftSound.Parent = Vehicle["Rear Wheel"]
  1831. DriftSound:Play()
  1832. end
  1833. wait(math.random(35, 60) / 100)
  1834. end
  1835. end)()
  1836. end
  1837. if ThrottlePercent < 0 then
  1838. ThrottlePercent = ThrottlePercent + BrakePower
  1839. IsBraking = true
  1840. else
  1841. ThrottlePercent = ThrottlePercent + Acceleration
  1842. IsBraking = false
  1843. end
  1844. elseif Seat.Throttle == -1 then
  1845. Drifting = false
  1846. if ThrottlePercent > 0.1 then
  1847. ThrottlePercent = ThrottlePercent - BrakePower
  1848. IsBraking = true
  1849. DriftCheck = tick()
  1850. else
  1851. ThrottlePercent = ThrottlePercent - Acceleration
  1852. end
  1853. else
  1854. if ThrottlePercent < 0 then
  1855. ThrottlePercent = ThrottlePercent + Deceleration
  1856. elseif ThrottlePercent > 0 then
  1857. ThrottlePercent = ThrottlePercent - Deceleration
  1858. end
  1859. if ThrottlePercent > -Deceleration * 1.1 and ThrottlePercent < Deceleration * 1.1 then
  1860. ThrottlePercent = 0
  1861. end
  1862. end
  1863. if ThrottlePercent > 1 then ThrottlePercent = 1 end
  1864. if ThrottlePercent < -1 then ThrottlePercent = -1 end
  1865. if ThrottlePercent ~= 0 and RearTraction == true and (pcall(function() return Vehicle["Rear Left Wheel"].Weld end) == true or pcall(function() return Vehicle["Rear Right Wheel"].Weld end) == true or pcall(function() return Vehicle["Rear Wheel"].Weld end) == true) and Health > 0 then
  1866. Thrust.maxForce = Vector3.new(math.huge, 0, math.huge)
  1867. Thrust.velocity = Base.CFrame.lookVector * (TopSpeed * ThrottlePercent)
  1868. else
  1869. Thrust.maxForce = Vector3.new()
  1870. end
  1871. if Seat.Steer == 1 then
  1872. SteerPercent = SteerPercent - (SteerDifficulty * (1 - (math.abs(ThrottlePercent) / 10)))
  1873. elseif Seat.Steer == -1 then
  1874. SteerPercent = SteerPercent + (SteerDifficulty * (1 - (math.abs(ThrottlePercent) / 10)))
  1875. else
  1876. if SteerPercent < 0 then
  1877. SteerPercent = SteerPercent + SteerDifficulty
  1878. elseif SteerPercent > 0 then
  1879. SteerPercent = SteerPercent - SteerDifficulty
  1880. end
  1881. if SteerPercent > -SteerDifficulty * 1.1 and SteerPercent < SteerDifficulty * 1.1 then
  1882. SteerPercent = 0
  1883. Drifting = false
  1884. end
  1885. end
  1886. if SteerPercent > 1 then SteerPercent = 1 end
  1887. if SteerPercent < -1 then SteerPercent = -1 end
  1888. if SteerPercent ~= 0 and RearTraction == true and FrontTraction == true and (pcall(function() return Vehicle["Rear Left Wheel"].Weld end) == true or pcall(function() return Vehicle["Rear Right Wheel"].Weld end) == true) and (pcall(function() return Vehicle["Front Left Wheel"].Weld end) == true or pcall(function() return Vehicle["Front Right Wheel"].Weld end) == true) and Health > 0 then
  1889. Steer.maxTorque = Vector3.new(0, math.huge, 0)
  1890. Steer.cframe = (Base.CFrame - Base.Position) * CFrame.fromEulerAnglesXYZ(0, math.rad((SteerPercent * SteerPower) * ((ThrottlePercent * 10) > 1 and 1 or (ThrottlePercent * 10))), 0)
  1891. ThrottlePercent = ThrottlePercent - ((Acceleration * 0.95) * (1 - math.abs(SteerPercent)))
  1892. ThrottlePercent = ThrottlePercent - (Acceleration * (SteerPercent / 2))
  1893. else
  1894. Steer.maxTorque = Vector3.new()
  1895. Steer.cframe = CFrame.new()
  1896. end
  1897. local SteerAngle = SteerPercent * (SteerPower * 1.5)
  1898. if SteerAngle > 80 then SteerAngle = 80 end
  1899. if SteerAngle < -80 then SteerAngle = -80 end
  1900. for _, Part in pairs(Wheels) do
  1901. if string.match(Part.Name, "Front ") then
  1902. pcall(function()
  1903. Part.Weld.C0 = CFrame.new(Part.Weld.C0.p) * CFrame.fromEulerAnglesXYZ(0, math.rad(SteerAngle), math.rad(90))
  1904. end)
  1905. end
  1906. end
  1907. if Seat:FindFirstChild("SeatWeld") ~= nil and Driver == nil then
  1908. local Part1 = Seat.SeatWeld.Part1
  1909. if Part1 ~= nil then
  1910. Driver = game:GetService("Players"):GetPlayerFromCharacter(Part1.Parent)
  1911. if Driver ~= nil then
  1912. local PlayerGui = Driver:FindFirstChild("PlayerGui")
  1913. if PlayerGui == nil then return end
  1914. local DriverGui = Instance.new("ScreenGui", PlayerGui)
  1915. DriverGui.Name = "DriverGui"
  1916. local Frame = Instance.new("Frame")
  1917. Frame.Name = "Content"
  1918. Frame.Size = UDim2.new(1, 0, 0, 100)
  1919. Frame.Position = UDim2.new(0, 0, 1, -100)
  1920. Frame.BorderSizePixel = 1
  1921. Frame.BorderColor3 = Color3.new(0, 0, 0)
  1922. Frame.BackgroundColor3 = Color3.new(0.15, 0.15, 0.15)
  1923. Frame.Parent = DriverGui
  1924. local TextLabel = Instance.new("TextLabel")
  1925. TextLabel.Name = "SpeedText1"
  1926. TextLabel.Size = UDim2.new(0, 85, 0, 15)
  1927. TextLabel.Position = UDim2.new(0, 15, 0, 7.5)
  1928. TextLabel.BorderSizePixel = 0
  1929. TextLabel.BackgroundTransparency = 1
  1930. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  1931. TextLabel.Text = "Speed"
  1932. TextLabel.TextXAlignment = "Left"
  1933. TextLabel.FontSize = "Size12"
  1934. TextLabel.Parent = DriverGui.Content
  1935. local TextLabel = Instance.new("TextLabel")
  1936. TextLabel.Name = "SpeedText2"
  1937. TextLabel.Size = UDim2.new(0, 85, 0, 15)
  1938. TextLabel.Position = UDim2.new(0, 15, 0, 7.5 + 15)
  1939. TextLabel.BorderSizePixel = 0
  1940. TextLabel.BackgroundTransparency = 1
  1941. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  1942. TextLabel.Text = "Bricks/sec."
  1943. TextLabel.TextXAlignment = "Left"
  1944. TextLabel.FontSize = "Size12"
  1945. TextLabel.Parent = DriverGui.Content
  1946. for i = 0, 1, 0.1 do
  1947. local TextLabel = Instance.new("TextLabel")
  1948. TextLabel.Name = "SpeedTextInc" ..i
  1949. TextLabel.Size = UDim2.new(0, 0, 0, 15)
  1950. TextLabel.Position = UDim2.new(0, 92 + (i * 200), 0, 37.5)
  1951. TextLabel.BorderSizePixel = 1
  1952. TextLabel.BackgroundTransparency = 0
  1953. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  1954. TextLabel.Text = math.floor(TopSpeed * i)
  1955. TextLabel.TextXAlignment = "Left"
  1956. TextLabel.Parent = DriverGui.Content
  1957. end
  1958. local Frame = Instance.new("Frame")
  1959. Frame.Name = "SpeedBack"
  1960. Frame.Size = UDim2.new(0, 200, 0, 30)
  1961. Frame.Position = UDim2.new(0, 100, 0, 7.5)
  1962. Frame.BorderSizePixel = 1
  1963. Frame.BorderColor3 = Color3.new(0, 0, 0)
  1964. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  1965. Frame.Parent = DriverGui.Content
  1966. local Frame = Instance.new("Frame")
  1967. Frame.Name = "SpeedFront"
  1968. Frame.BorderSizePixel = 1
  1969. Frame.BorderColor3 = Color3.new(0, 0, 0)
  1970. Frame.BackgroundColor3 = Color3.new(0, 0, 0.9)
  1971. Frame.Parent = DriverGui.Content
  1972. coroutine.wrap(function()
  1973. while DriverGui.Parent ~= nil do
  1974. DriverGui.Content.SpeedFront.Size = DriverGui.Content.SpeedBack.Size - UDim2.new(0, DriverGui.Content.SpeedBack.Size.X.Offset * (1 - math.abs(ThrottlePercent)), 0, 0)
  1975. DriverGui.Content.SpeedFront.Position = DriverGui.Content.SpeedBack.Position
  1976. wait()
  1977. end
  1978. end)()
  1979. local TextLabel = Instance.new("TextLabel")
  1980. TextLabel.Name = "DamageText"
  1981. TextLabel.Size = UDim2.new(0, 85, 0, 30)
  1982. TextLabel.Position = UDim2.new(0, 215, 0, 57.5)
  1983. TextLabel.BorderSizePixel = 0
  1984. TextLabel.BackgroundTransparency = 1
  1985. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  1986. TextLabel.Text = "Damage"
  1987. TextLabel.TextXAlignment = "Left"
  1988. TextLabel.FontSize = "Size12"
  1989. TextLabel.Parent = DriverGui.Content
  1990. local Frame = Instance.new("Frame")
  1991. Frame.Name = "DamageBack"
  1992. Frame.Size = UDim2.new(0, 250, 0, 30)
  1993. Frame.Position = UDim2.new(0, 300, 0, 57.5)
  1994. Frame.BorderSizePixel = 1
  1995. Frame.BorderColor3 = Color3.new(0, 0, 0)
  1996. Frame.BackgroundColor3 = Color3.new(0, 0.5, 0)
  1997. Frame.Parent = DriverGui.Content
  1998. local Frame = Instance.new("Frame")
  1999. Frame.Name = "DamageFront"
  2000. Frame.BorderSizePixel = 1
  2001. Frame.BorderColor3 = Color3.new(0, 0, 0)
  2002. Frame.BackgroundColor3 = Color3.new(0.9, 0, 0)
  2003. Frame.Parent = DriverGui.Content
  2004. coroutine.wrap(function()
  2005. local i = math.pi * 1.5
  2006. while DriverGui.Parent ~= nil do
  2007. DriverGui.Content.DamageFront.Size = DriverGui.Content.DamageBack.Size - UDim2.new(0, DriverGui.Content.DamageBack.Size.X.Offset * (1 - ((MaxHealth - Health) / MaxHealth)), 0, 0)
  2008. DriverGui.Content.DamageFront.Position = DriverGui.Content.DamageBack.Position
  2009. if Health < MaxHealth * 0.15 then
  2010. i = i + 0.4
  2011. elseif Health < MaxHealth * 0.2 then
  2012. i = i + 0.25
  2013. elseif Health < MaxHealth * 0.3 then
  2014. i = i + 0.1
  2015. elseif Health < MaxHealth * 0.4 then
  2016. i = i + 0.075
  2017. end
  2018. DriverGui.Content.DamageFront.BackgroundColor3 = Color3.new(1 - ((math.sin(i) + 1) / 2), 0, 0)
  2019. DriverGui.Content.DamageBack.BackgroundColor3 = Color3.new(0, 0.5 - (((math.sin(i) + 1) / 2) * 0.5), 0)
  2020. wait()
  2021. end
  2022. end)()
  2023. end
  2024. end
  2025. elseif Seat:FindFirstChild("SeatWeld") == nil and Driver ~= nil then
  2026. if Driver:FindFirstChild("PlayerGui") ~= nil then
  2027. if Driver.PlayerGui:FindFirstChild("DriverGui") ~= nil then
  2028. Driver.PlayerGui.DriverGui:Remove()
  2029. end
  2030. end
  2031. Driver = nil
  2032. end
  2033. if Health <= 0 then
  2034. Health = 0
  2035. ThrottlePercent = 0
  2036. if Vehicle:FindFirstChild("VehicleEngine") ~= nil then
  2037. if math.random(1, 1000) == 1 or Vehicle.VehicleEngine:FindFirstChild("Weld") == nil then
  2038. local Explosion = Instance.new("Explosion")
  2039. Explosion.BlastPressure = 5000 * ToughnessMajorDamage
  2040. Explosion.BlastRadius = ToughnessMajorDamage / 10
  2041. Explosion.Position = Vehicle.VehicleEngine.Position
  2042. Explosion.Parent = Workspace
  2043. Vehicle.VehicleEngine.Name = "Exploded VehicleEngine"
  2044. end
  2045. end
  2046. end
  2047. wait()
  2048. end
Add Comment
Please, Sign In to add comment