Hugo1234cool

Untitled

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