Advertisement
samuelrichter66

Honker boi

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