Advertisement
Guest User

Untitled

a guest
Mar 11th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 137.07 KB | None | 0 0
  1. -- Synapse Decompiler
  2. -- Purchase Here: https://brack4712.xyz/synapse/purchase/
  3.  
  4. local MP = game:GetService("MarketplaceService")
  5. local US = game:GetService("UserInputService")
  6. local Plr = game.Players.LocalPlayer
  7. local PlrGui = Plr:WaitForChild("PlayerGui")
  8. local Scrn = PlrGui:WaitForChild("Screen")
  9. local IntroG = PlrGui:WaitForChild("Intro")
  10. game.ReplicatedStorage:WaitForChild("DealershipGUI"):Clone().Parent = PlrGui
  11. PlrGui.DealershipGUI.Name = "Dealership"
  12. local DealershipGUI = PlrGui.Dealership
  13. local SettingsGUI = PlrGui:WaitForChild("Settings")
  14. local VehicleMenu = PlrGui:WaitForChild("VehicleMenu")
  15. local rE = game.ReplicatedStorage:WaitForChild("rE")
  16. local rF = game.ReplicatedStorage:WaitForChild("rF")
  17. local Cam = game.Workspace.CurrentCamera
  18. local color = Color3.fromRGB(90, 170, 78)
  19. local ButtonHover = false
  20. local MobileUser = false
  21. local PreviousGamepasses = {
  22. 232021112,
  23. 377032235,
  24. 285012955,
  25. 384451107,
  26. 304047750
  27. }
  28. local Gpasses = {
  29. 654740173,
  30. 654742252,
  31. 654744979,
  32. 654747899,
  33. 654750284,
  34. 654760268,
  35. 654762870,
  36. 654763207,
  37. 654763707,
  38. 654766320
  39. }
  40. local MoneyProducts = {
  41. 51345019,
  42. 51345087,
  43. 51345124,
  44. 51345196,
  45. 51345232,
  46. 51345298,
  47. 51345315,
  48. 51345398,
  49. 51345462,
  50. 51345544,
  51. 51345593,
  52. 51345649,
  53. 51345694,
  54. 51345732,
  55. 51345812,
  56. 51345904,
  57. 51345929,
  58. 51345978
  59. }
  60. local Rounder = require(game.ReplicatedStorage:WaitForChild("Rounder"))
  61. local SF = PlrGui:WaitForChild("SoundEffects")
  62. local LStats = Plr:WaitForChild("leaderstats")
  63. local HalfFade = false
  64. local BScrn2Loaded = false
  65. local BScrn = Scrn.BlackScreen
  66. delay(5, function()
  67. repeat
  68. wait()
  69. until Plr.Character:FindFirstChild("Head")
  70. if not BScrn2Loaded or Plr.Character.Head.CollisionGroupId == 0 then
  71. rE.RefreshCharacter:FireServer()
  72. end
  73. end)
  74. local BScrn2 = DealershipGUI:WaitForChild("BlackScreen")
  75. BScrn2Loaded = true
  76. if game.Workspace.CarCollection:FindFirstChild(Plr.Name) then
  77. rE.Delete:FireServer(game.Workspace.CarCollection:FindFirstChild(Plr.Name))
  78. end
  79. function MultiplyValues()
  80. for _, Folder in pairs(game.ReplicatedStorage.VehicleInformation:GetChildren()) do
  81. Folder.Value.Value = Rounder:RoundOff(Folder.StandardValue.Value * (1 + LStats.Tokens.Value / 2))
  82. end
  83. end
  84. if LStats.Tokens.Value > 0 then
  85. MultiplyValues()
  86. end
  87. if workspace:FindFirstChild("Garage") then
  88. workspace.Garage:Destroy()
  89. end
  90. if workspace:FindFirstChild("Dealership") then
  91. workspace.Dealership:Destroy()
  92. end
  93. if Plr:FindFirstChild("MobileUser") then
  94. MobileUser = true
  95. elseif US.AccelerometerEnabled then
  96. rE.CreateInstance:FireServer("MobileUser")
  97. MobileUser = true
  98. end
  99. local VMenuPos1, VMenuPos2
  100. if MobileUser then
  101. US.ModalEnabled = false
  102. VehicleMenu.Menu:Destroy()
  103. VehicleMenu.MobileMenu.Name = "Menu"
  104. VMenuPos2 = UDim2.new(-2.5, 0, 0, -4)
  105. VMenuPos1 = UDim2.new(-2.5, 0, -2, 0)
  106. SettingsGUI.Settings.Background.Description.Visible = false
  107. else
  108. VehicleMenu.MobileMenu:Destroy()
  109. VMenuPos2 = UDim2.new(-3.2, 0, -5.5, 0)
  110. VMenuPos1 = UDim2.new(0, 0, -5.5, 0)
  111. end
  112. game.Lighting.ColorCorrection.Brightness = 0
  113. rE.GamepassItem:FireServer("Invincibility")
  114. game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
  115. Cam.CameraSubject = Plr.Character:WaitForChild("Humanoid")
  116. Cam.CameraType = "Custom"
  117. Plr.CameraMode = "Classic"
  118. Plr.CameraMaxZoomDistance = 250
  119. Scrn.BlackScreen.Text = ""
  120. function BtnClickAnim(Button)
  121. local OriginalUDim
  122. Button.down.Visible = true
  123. Button.ImageTransparency = 1
  124. if Button:FindFirstChild("ImageLabel") then
  125. OriginalUDim = Button.ImageLabel.Position
  126. Button.ImageLabel.Position = OriginalUDim + UDim2.new(0, 0, 0.09, 0)
  127. elseif Button:FindFirstChild("TextLabel") then
  128. OriginalUDim = Button.TextLabel.Position
  129. Button.TextLabel.Position = OriginalUDim + UDim2.new(0, 0, 0.09, 0)
  130. elseif Button:FindFirstChild("LockImage") then
  131. OriginalUDim = Button.LockImage.Position
  132. Button.LockImage.Position = OriginalUDim + UDim2.new(0, 0, 0.09, 0)
  133. end
  134. SF.ButtonClick3D:Play()
  135. wait(0.1)
  136. Button.down.Visible = false
  137. Button.ImageTransparency = 0
  138. if Button:FindFirstChild("ImageLabel") then
  139. Button.ImageLabel.Position = OriginalUDim
  140. elseif Button:FindFirstChild("TextLabel") then
  141. Button.TextLabel.Position = OriginalUDim
  142. elseif Button:FindFirstChild("LockImage") then
  143. Button.LockImage.Position = OriginalUDim
  144. end
  145. end
  146. function BScrnOut()
  147. for T = BScrn.Transparency, 1.05, 0.1 do
  148. BScrn.BackgroundTransparency = T
  149. wait()
  150. end
  151. BScrn.Visible = false
  152. end
  153. function BScrnIn()
  154. BScrn.Visible = true
  155. if not HalfFade then
  156. for T = BScrn.Transparency, -0.05, -0.1 do
  157. BScrn.BackgroundTransparency = T
  158. wait()
  159. end
  160. else
  161. for T = BScrn.Transparency, 0.49, -0.1 do
  162. BScrn.BackgroundTransparency = T
  163. wait()
  164. end
  165. end
  166. wait(0.5)
  167. end
  168. function BScrnOut2()
  169. for T = BScrn2.Transparency, 0.51, 0.1 do
  170. BScrn2.BackgroundTransparency = T
  171. wait()
  172. end
  173. BScrn2.Visible = false
  174. end
  175. function BScrnIn2()
  176. BScrn2.Visible = true
  177. for T = BScrn2.Transparency, 0.49, -0.1 do
  178. BScrn2.BackgroundTransparency = T
  179. wait()
  180. end
  181. end
  182. local PartVal = Plr:WaitForChild("Parts")
  183. local CCovers = game.Workspace:WaitForChild("CrusherCovers")
  184. local L1, L2, L3, L4, MC, VL, PL, EC = false, false, false, false, false, false, false, false
  185. local B1, B2, B3 = false, false, false
  186. if CCovers:FindFirstChild("Line1") then
  187. L1 = CCovers.Line1
  188. end
  189. if CCovers:FindFirstChild("Line2") then
  190. L2 = CCovers.Line2
  191. end
  192. if CCovers:FindFirstChild("Line3") then
  193. L3 = CCovers.Line3
  194. end
  195. if CCovers:FindFirstChild("Line4") then
  196. L4 = CCovers.Line4
  197. end
  198. if CCovers:FindFirstChild("Middle") then
  199. MC = CCovers.Middle
  200. end
  201. if CCovers:FindFirstChild("VipLine") then
  202. VL = CCovers.VipLine
  203. end
  204. if CCovers:FindFirstChild("PremiumLine") then
  205. PL = CCovers.PremiumLine
  206. end
  207. if CCovers:FindFirstChild("EnergyCore") then
  208. EC = CCovers.EnergyCore
  209. end
  210. function HideCovers(Val)
  211. if Val >= 10000 and L1 then
  212. L1:Destroy()
  213. L1 = false
  214. end
  215. if Val >= 25000 and L2 then
  216. L2:Destroy()
  217. L2 = false
  218. end
  219. if Val >= 50000 and MC then
  220. MC:Destroy()
  221. MC = false
  222. end
  223. if Val >= 75000 and L3 then
  224. L3:Destroy()
  225. L3 = false
  226. end
  227. if Val >= 100000 and L4 then
  228. L4:Destroy()
  229. L4 = false
  230. end
  231. end
  232. if VL and (MP:PlayerOwnsAsset(Plr, 654750284) or MP:PlayerOwnsAsset(Plr, 232021112)) then
  233. VL:Destroy()
  234. VL = false
  235. end
  236. if EC and (MP:PlayerOwnsAsset(Plr, 654763207) or MP:PlayerOwnsAsset(Plr, 285012955)) then
  237. EC:Destroy()
  238. EC = false
  239. end
  240. if PL and MP:PlayerOwnsAsset(Plr, 654762870) then
  241. PL:Destroy()
  242. PL = false
  243. end
  244. HideCovers(PartVal.Value)
  245. PartVal.Changed:connect(function(Val)
  246. HideCovers(Val)
  247. if not B1 and Val >= 25000 then
  248. rE.GiveBadge:FireServer(1)
  249. B1 = true
  250. end
  251. if not B2 and Val >= 100000 then
  252. rE.GiveBadge:FireServer(2)
  253. B2 = true
  254. end
  255. if not B3 and Val >= 250000 then
  256. rE.GiveBadge:FireServer(3)
  257. B3 = true
  258. end
  259. end)
  260. local Settings = Plr:WaitForChild("Settings")
  261. local Music = Plr:WaitForChild("MusicValue")
  262. local ChangingMusic = Plr:WaitForChild("ChangingMusic")
  263. local MeltDownActive = workspace.EnergyCore.ControlRoom.MeltDown
  264. local GuisHidden = workspace.EnergyCore.ControlRoom.GuisHidden
  265. Music.Value = 0
  266. ChangingMusic.Value = false
  267. SF.Song1:play()
  268. SF.Song3:play()
  269. Music.Changed:connect(function(val)
  270. if not Settings.MusicDisabled.Value and (not MeltDownActive.Value or val == 0) then
  271. if val == 0 then
  272. for i = 1, 10 do
  273. SF.Song1.Volume = SF.Song1.Volume - 0.05
  274. SF.Song2.Volume = SF.Song2.Volume - 0.04
  275. SF.Song3.Volume = SF.Song3.Volume - 0.03
  276. wait()
  277. end
  278. SF.Song1.Volume = 0
  279. SF.Song2.Volume = 0
  280. SF.Song3.Volume = 0
  281. SF.Song2:stop()
  282. elseif val == 1 then
  283. for i = 1, 10 do
  284. SF.Song1.Volume = SF.Song1.Volume + 0.05
  285. wait()
  286. end
  287. SF.Song1.Volume = 0.5
  288. elseif val == 2 then
  289. SF.Song2:play()
  290. for i = 1, 10 do
  291. SF.Song2.Volume = SF.Song2.Volume + 0.04
  292. wait()
  293. end
  294. SF.Song2.Volume = 0.4
  295. elseif val == 3 then
  296. for i = 1, 10 do
  297. SF.Song3.Volume = SF.Song3.Volume + 0.05
  298. wait()
  299. end
  300. SF.Song3.Volume = 0.3
  301. end
  302. end
  303. end)
  304. Sensors = game.Workspace:WaitForChild("CenterPoints"):WaitForChild("Sensors")
  305. repeat
  306. wait()
  307. until Plr.Character:FindFirstChild("Head")
  308. Plr.Character.Head.Touched:connect(function(part)
  309. if part.Name == "Enable" and part.Parent == Sensors then
  310. if ChangingMusic.Value then
  311. repeat
  312. wait()
  313. until not ChangingMusic.Value
  314. end
  315. if Music.Value == 0 then
  316. ChangingMusic.Value = true
  317. Music.Value = 1
  318. wait(0.3)
  319. ChangingMusic.Value = false
  320. end
  321. elseif part.Name == "Disable" and part.Parent == Sensors then
  322. ChangingMusic.Value = true
  323. Music.Value = 0
  324. wait(0.3)
  325. ChangingMusic.Value = false
  326. end
  327. end)
  328. local NewPlayer = Plr:WaitForChild("NewPlayer")
  329. local SFrame = Scrn:WaitForChild("Gamepasses"):WaitForChild("Background"):WaitForChild("ScrollingFrame")
  330. local CustScroll = DealershipGUI.Customize.Background.ScrollingFrame
  331. local ShowGP = 5
  332. if NewPlayer.Value then
  333. if not MP:PlayerOwnsAsset(Plr, 232021112) then
  334. SFrame:WaitForChild("Vip"):Destroy()
  335. ShowGP = ShowGP - 1
  336. end
  337. if not MP:PlayerOwnsAsset(Plr, 377032235) then
  338. SFrame:WaitForChild("Crowbar"):Destroy()
  339. ShowGP = ShowGP - 1
  340. end
  341. if not MP:PlayerOwnsAsset(Plr, 285012955) then
  342. SFrame:WaitForChild("EnergyCore"):Destroy()
  343. ShowGP = ShowGP - 1
  344. end
  345. if not MP:PlayerOwnsAsset(Plr, 384451107) then
  346. SFrame:WaitForChild("Invincibility"):Destroy()
  347. ShowGP = ShowGP - 1
  348. end
  349. if not MP:PlayerOwnsAsset(Plr, 304047750) then
  350. SFrame:WaitForChild("Admin"):Destroy()
  351. ShowGP = ShowGP - 1
  352. end
  353. end
  354. spawn(function()
  355. if MP:PlayerOwnsAsset(Plr, Gpasses[1]) then
  356. for _, BuyColor in pairs(CustScroll:GetChildren()) do
  357. if BuyColor.Name == "PremiumColor" then
  358. BuyColor.LockImage.Visible = false
  359. end
  360. end
  361. end
  362. if MP:PlayerOwnsAsset(Plr, Gpasses[3]) then
  363. CustScroll.Neon.LockImage.Visible = false
  364. end
  365. if MP:PlayerOwnsAsset(Plr, Gpasses[4]) then
  366. CustScroll.Silver.LockImage.Visible = false
  367. end
  368. if MP:PlayerOwnsAsset(Plr, Gpasses[9]) or MP:PlayerOwnsAsset(Plr, 304047750) then
  369. CustScroll.Gold.LockImage.Visible = false
  370. end
  371. if MP:PlayerOwnsAsset(Plr, Gpasses[10]) then
  372. CustScroll.Platinum.LockImage.Visible = false
  373. end
  374. end)
  375. local DealershipModel = game.ReplicatedStorage:WaitForChild("Dealership"):Clone()
  376. local GarageModel = game.ReplicatedStorage:WaitForChild("Garage"):Clone()
  377. local VList = require(game.ReplicatedStorage:WaitForChild("VehicleOrder"))
  378. local TBar = Scrn:WaitForChild("Topbar")
  379. local Progress = TBar.Holder.Progress
  380. local DTbar = DealershipGUI:WaitForChild("TopBar")
  381. local ScrnStats = TBar:WaitForChild("Holder"):WaitForChild("stats")
  382. local DsStats = DTbar:WaitForChild("Stats"):WaitForChild("Holder"):WaitForChild("stats")
  383. local Menu = TBar:WaitForChild("Holder"):WaitForChild("menu")
  384. local Tutorial = Scrn:WaitForChild("Tutorial"):WaitForChild("BackGround"):WaitForChild("Frame")
  385. local AnimationActive = false
  386. local TPHover = false
  387. ScrnStats.Money.Text = "Money: " .. Rounder:ConvertLong(math.floor(Plr.Money.Value))
  388. ScrnStats.Parts.Text = "Parts: " .. Rounder:FormatNumber(Plr.Parts.Value)
  389. DsStats.Money.Text = "Money: " .. Rounder:ConvertLong(math.floor(Plr.Money.Value))
  390. DsStats.Tokens.Text = "Tokens: " .. LStats.Tokens.Value .. "/3"
  391. local MessagePos1, MessagePos2
  392. local OldMoney = math.floor(Plr.Money.Value)
  393. local OldParts = Plr.Parts.Value
  394. local OldTokens = LStats.Tokens.Value
  395. local Activations1 = 0
  396. local Activations2 = 0
  397. local Activations3 = 0
  398. local IncomeDebounce1 = false
  399. local IncomeDebounce2 = false
  400. local IncomeDebounce3 = false
  401. local B4, B5, B6 = false, false, false
  402. Plr.Money.Changed:connect(function()
  403. ScrnStats.Money.Text = "Money: " .. Rounder:ConvertLong(math.floor(Plr.Money.Value))
  404. DsStats.Money.Text = ScrnStats.Money.Text
  405. if not IncomeDebounce1 then
  406. IncomeDebounce1 = true
  407. local Change = math.floor(Plr.Money.Value) - OldMoney
  408. if Change ~= 0 then
  409. Activations1 = Activations1 + 1
  410. if Change < 0 then
  411. ScrnStats.MoneyIncome.TextColor3 = Color3.fromRGB(212, 50, 50)
  412. DsStats.MoneyIncome.TextColor3 = Color3.fromRGB(212, 50, 50)
  413. ScrnStats.MoneyIncome.TextStrokeColor3 = Color3.fromRGB(70, 0, 0)
  414. DsStats.MoneyIncome.TextStrokeColor3 = Color3.fromRGB(70, 0, 0)
  415. ScrnStats.MoneyIncome.Text = "-" .. Rounder:ConvertLong(Change)
  416. else
  417. ScrnStats.MoneyIncome.TextColor3 = color
  418. DsStats.MoneyIncome.TextColor3 = color
  419. ScrnStats.MoneyIncome.TextStrokeColor3 = Color3.fromRGB(37, 70, 31)
  420. DsStats.MoneyIncome.TextStrokeColor3 = Color3.fromRGB(37, 70, 31)
  421. ScrnStats.MoneyIncome.Text = "+" .. Rounder:ConvertLong(Change)
  422. end
  423. DsStats.MoneyIncome.Text = ScrnStats.MoneyIncome.Text
  424. ScrnStats.MoneyIncome.Visible = true
  425. DsStats.MoneyIncome.Visible = true
  426. ScrnStats.MoneyIncome.Rotation = math.random(150, 250) / 10
  427. DsStats.MoneyIncome.Rotation = math.random(150, 250) / 10
  428. IncomeDebounce1 = false
  429. wait(0.2)
  430. ScrnStats.MoneyIncome.Rotation = 0
  431. DsStats.MoneyIncome.Rotation = 0
  432. wait(5)
  433. Activations1 = Activations1 - 1
  434. if Activations1 == 0 then
  435. IncomeDebounce1 = true
  436. for i = 1, 10 do
  437. ScrnStats.MoneyIncome.TextTransparency = ScrnStats.MoneyIncome.TextTransparency + 0.1
  438. DsStats.MoneyIncome.TextTransparency = DsStats.MoneyIncome.TextTransparency + 0.1
  439. wait()
  440. end
  441. ScrnStats.MoneyIncome.Visible = false
  442. DsStats.MoneyIncome.Visible = false
  443. ScrnStats.MoneyIncome.TextTransparency = 0
  444. DsStats.MoneyIncome.TextTransparency = 0
  445. OldMoney = math.floor(Plr.Money.Value)
  446. IncomeDebounce1 = false
  447. end
  448. else
  449. IncomeDebounce1 = false
  450. end
  451. end
  452. if not B4 and Plr.Money.Value >= 1000000 then
  453. rE.GiveBadge:FireServer(4)
  454. B4 = true
  455. end
  456. if not B5 and Plr.Money.Value >= 1000000000 then
  457. rE.GiveBadge:FireServer(5)
  458. B5 = true
  459. end
  460. if not B6 and Plr.Money.Value >= 1000000000000 then
  461. rE.GiveBadge:FireServer(6)
  462. B6 = true
  463. end
  464. end)
  465. Plr.Parts.Changed:connect(function()
  466. ScrnStats.Parts.Text = "Parts: " .. Rounder:FormatNumber(Plr.Parts.Value)
  467. if not IncomeDebounce2 then
  468. IncomeDebounce2 = true
  469. local Change = Plr.Parts.Value - OldParts
  470. Activations2 = Activations2 + 1
  471. ScrnStats.PartsIncome.Text = "+" .. Rounder:ConvertLong(Change)
  472. ScrnStats.PartsIncome.Visible = true
  473. ScrnStats.PartsIncome.Rotation = math.random(150, 250) / 10
  474. IncomeDebounce2 = false
  475. wait(0.2)
  476. ScrnStats.PartsIncome.Rotation = 0
  477. wait(5)
  478. Activations2 = Activations2 - 1
  479. if Activations2 == 0 then
  480. IncomeDebounce2 = true
  481. for i = 1, 10 do
  482. ScrnStats.PartsIncome.TextTransparency = ScrnStats.PartsIncome.TextTransparency + 0.1
  483. wait()
  484. end
  485. ScrnStats.PartsIncome.Visible = false
  486. ScrnStats.PartsIncome.TextTransparency = 0
  487. OldParts = Plr.Parts.Value
  488. IncomeDebounce2 = false
  489. end
  490. end
  491. end)
  492. LStats.Tokens.Changed:connect(function()
  493. DsStats.Tokens.Text = "Tokens: " .. LStats.Tokens.Value .. "/3"
  494. if not IncomeDebounce3 then
  495. IncomeDebounce3 = true
  496. local Change = LStats.Tokens.Value - OldTokens
  497. Activations3 = Activations3 + 1
  498. DsStats.TokenIncome.Text = "+" .. Rounder:ConvertLong(Change)
  499. DsStats.TokenIncome.Visible = true
  500. DsStats.TokenIncome.Rotation = math.random(150, 250) / 10
  501. IncomeDebounce3 = false
  502. wait(0.2)
  503. DsStats.TokenIncome.Rotation = 0
  504. wait(5)
  505. Activations3 = Activations3 - 1
  506. if Activations3 == 0 then
  507. IncomeDebounce3 = true
  508. for i = 1, 10 do
  509. DsStats.TokenIncome.TextTransparency = DsStats.TokenIncome.TextTransparency + 0.1
  510. wait()
  511. end
  512. DsStats.TokenIncome.Visible = false
  513. DsStats.TokenIncome.TextTransparency = 0
  514. OldTokens = LStats.Tokens.Value
  515. IncomeDebounce3 = false
  516. end
  517. end
  518. end)
  519. function ArrangeGUIs()
  520. Scrn.Topbar.Position = UDim2.new(0.5, -Scrn.Topbar.AbsoluteSize.X / 2, 0, 0)
  521. Scrn.Gamepasses.Position = UDim2.new(0.5, -Scrn.Gamepasses.AbsoluteSize.X / 2, 0, 0)
  522. Scrn.Tutorial.Position = UDim2.new(0.5, -Scrn.Tutorial.AbsoluteSize.X / 2, 0, 0)
  523. Scrn.Message.Position = UDim2.new(0.5, -Scrn.Message.AbsoluteSize.X / 2, Scrn.Message.Position.Y.Scale, Scrn.Message.Position.Y.Offset)
  524. MessagePos1 = UDim2.new(0.5, -Scrn.Message.AbsoluteSize.X / 2, 1, -Scrn.Message.AbsoluteSize.Y)
  525. MessagePos2 = UDim2.new(0.5, -Scrn.Message.AbsoluteSize.X / 2, 0.99, -(Scrn.Message.AbsoluteSize.Y + DealershipGUI.BottomBar.Holder.Spawn.AbsoluteSize.Y))
  526. DealershipGUI.List.Position = UDim2.new(0.5, -DealershipGUI.List.AbsoluteSize.X / 2, 0, 0)
  527. DealershipGUI.BottomBar.Position = UDim2.new(0.5, -DealershipGUI.BottomBar.AbsoluteSize.X / 2, 1, 0)
  528. DealershipGUI.JoinGroup.Position = UDim2.new(0.5, -DealershipGUI.JoinGroup.AbsoluteSize.X / 2, 0, 0)
  529. SettingsGUI.ConfirmQuality.Position = UDim2.new(0.5, -SettingsGUI.ConfirmQuality.AbsoluteSize.X / 2, 0, 0)
  530. SettingsGUI.ConfirmTransfer.Position = UDim2.new(0.5, -SettingsGUI.ConfirmTransfer.AbsoluteSize.X / 2, 0, 0)
  531. SettingsGUI.Settings.Position = UDim2.new(0.5, -SettingsGUI.Settings.AbsoluteSize.X / 2, 0, 0)
  532. if MobileUser then
  533. VehicleMenu.Menu.Position = UDim2.new(0.5, -VehicleMenu.Menu.AbsoluteSize.X / 2, 1, 0)
  534. end
  535. end
  536. ArrangeGUIs()
  537. DealershipGUI.MeasureMent:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
  538. wait(0.1)
  539. ArrangeGUIs()
  540. end)
  541. function OpenTutorial()
  542. if MeltDownActive.Value then
  543. local Folder = Instance.new("Folder", Plr)
  544. Folder.Name = "ResumeTutorial"
  545. else
  546. SF.Swoosh.PlaybackSpeed = 1.3
  547. SF.Swoosh:play()
  548. Tutorial.Parent.Parent.Visible = true
  549. Tutorial.Parent:TweenPosition(UDim2.new(-3.5, 0, 0, (DealershipGUI.MeasureMent.AbsoluteSize.Y - Tutorial.Parent.AbsoluteSize.Y) / 2), "In", "Sine", 0.3, true)
  550. end
  551. end
  552. TBar.Visible = true
  553. if GuisHidden.Value then
  554. TBar.Holder.Position = UDim2.new(-2, 0, -1.79, 0)
  555. TBar.Holder.hide.Visible = false
  556. TBar.Holder.Progress.Visible = false
  557. end
  558. Music.Value = 1
  559. BScrnOut()
  560. if NewPlayer.Value then
  561. NewPlayer.Value = false
  562. local Val1 = Instance.new("BoolValue", Plr)
  563. Val1.Name = "Spin"
  564. local Val2 = Instance.new("BoolValue", Plr)
  565. Val2.Name = "Conveyor"
  566. local Val3 = Instance.new("BoolValue", Plr)
  567. Val3.Name = "Controls"
  568. wait(0.5)
  569. if ShowGP > 0 then
  570. AnimationActive = true
  571. SF.Swoosh.PlaybackSpeed = 1.3
  572. SF.Swoosh:play()
  573. SFrame.Parent.Parent.Visible = true
  574. SFrame.Parent:TweenPosition(UDim2.new(-3.5, 0, 0, (DealershipGUI.MeasureMent.AbsoluteSize.Y - SFrame.Parent.AbsoluteSize.Y) / 2), "In", "Sine", 0.3, false)
  575. wait(0.3)
  576. AnimationActive = false
  577. else
  578. OpenTutorial()
  579. end
  580. end
  581. if Plr:FindFirstChild("ResumeTutorial") then
  582. Plr.ResumeTutorial:Destroy()
  583. OpenTutorial()
  584. end
  585. local RecentlyTeleported = false
  586. Menu.Teleport.MouseButton1Click:connect(function()
  587. BtnClickAnim(Menu.Teleport)
  588. if not RecentlyTeleported and not AnimationActive then
  589. AnimationActive = true
  590. delay(5, function()
  591. RecentlyTeleported = false
  592. if TPHover then
  593. Menu.Teleport.ImageColor3 = Menu.Teleport.HoverColor.Value
  594. Menu.Teleport.down.ImageColor3 = Menu.Teleport.HoverColor.Value
  595. else
  596. Menu.Teleport.ImageColor3 = color
  597. Menu.Teleport.down.ImageColor3 = color
  598. end
  599. end)
  600. local Changing = false
  601. if Music.Value == 3 or Music.Value == 0 then
  602. repeat
  603. wait()
  604. until not ChangingMusic.Value
  605. Music.Value = 0
  606. ChangingMusic.Value = true
  607. Changing = true
  608. end
  609. BScrnIn()
  610. RecentlyTeleported = true
  611. if TPHover then
  612. Menu.Teleport.ImageColor3 = Menu.Teleport.DisabledColorHover.Value
  613. Menu.Teleport.down.ImageColor3 = Menu.Teleport.DisabledColorHover.Value
  614. else
  615. Menu.Teleport.ImageColor3 = Menu.Teleport.DisabledColor.Value
  616. Menu.Teleport.down.ImageColor3 = Menu.Teleport.DisabledColor.Value
  617. end
  618. rE.TeleportPlr:FireServer("LobbySpawn")
  619. if Changing then
  620. Music.Value = 1
  621. end
  622. BScrnOut()
  623. if Changing then
  624. ChangingMusic.Value = false
  625. end
  626. AnimationActive = false
  627. end
  628. end)
  629. Menu.Teleport.MouseEnter:connect(function()
  630. if RecentlyTeleported then
  631. Menu.Teleport.ImageColor3 = Menu.Teleport.DisabledColorHover.Value
  632. Menu.Teleport.down.ImageColor3 = Menu.Teleport.DisabledColorHover.Value
  633. else
  634. Menu.Teleport.ImageColor3 = Menu.Teleport.HoverColor.Value
  635. Menu.Teleport.down.ImageColor3 = Menu.Teleport.HoverColor.Value
  636. end
  637. if not TPHover then
  638. TPHover = true
  639. SF.ButtonHover:Play()
  640. end
  641. Menu.Teleport.MouseLeave:connect(function()
  642. if RecentlyTeleported then
  643. Menu.Teleport.ImageColor3 = Menu.Teleport.DisabledColor.Value
  644. Menu.Teleport.down.ImageColor3 = Menu.Teleport.DisabledColor.Value
  645. else
  646. Menu.Teleport.ImageColor3 = color
  647. Menu.Teleport.down.ImageColor3 = color
  648. end
  649. TPHover = false
  650. end)
  651. end)
  652. local HideFrame = TBar.Holder:WaitForChild("hide")
  653. local TBarHidden = false
  654. local LoadingGamepasses = true
  655. HideFrame:WaitForChild("ClickBox").MouseButton1Click:connect(function()
  656. if not AnimationActive then
  657. AnimationActive = true
  658. SF.ButtonClick2D:play()
  659. if TBarHidden then
  660. TBarHidden = false
  661. HideFrame.up.Visible = true
  662. HideFrame.down.Visible = false
  663. HideFrame.Parent.menu.Visible = true
  664. Progress.Visible = true
  665. HideFrame.Parent:TweenPosition(UDim2.new(-2, 0, 0.1, 0), "In", "Back", 0.3, true)
  666. wait(0.3)
  667. else
  668. TBarHidden = true
  669. HideFrame.up.Visible = false
  670. HideFrame.down.Visible = true
  671. HideFrame.Parent:TweenPosition(UDim2.new(-2, 0, -1.79, 0), "Out", "Back", 0.3, true)
  672. wait(0.2)
  673. HideFrame.Parent.menu.Visible = false
  674. Progress.Visible = false
  675. wait(0.1)
  676. end
  677. AnimationActive = false
  678. end
  679. end)
  680. local BaseUDim = UDim2.new(0, 0, 0.08, 0)
  681. for _, GUI in pairs(SFrame:GetChildren()) do
  682. if GUI:IsA("Frame") then
  683. GUI.Position = BaseUDim
  684. BaseUDim = BaseUDim + UDim2.new(0, 0, 0.16, 0)
  685. end
  686. end
  687. SFrame.Bottom.Position = BaseUDim
  688. SFrame.Parent.Button.MouseButton1Click:connect(function()
  689. BtnClickAnim(SFrame.Parent.Button)
  690. if not AnimationActive then
  691. AnimationActive = true
  692. SF.Swoosh.PlaybackSpeed = 1
  693. SF.Swoosh:play()
  694. SFrame.Parent:TweenPosition(UDim2.new(-3.5, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y), "Out", "Sine", 0.5, false)
  695. wait(0.5)
  696. SFrame.Parent.Parent.Visible = false
  697. ButtonHover = false
  698. AnimationActive = false
  699. wait(0.2)
  700. OpenTutorial()
  701. end
  702. end)
  703. SFrame.Parent.Button.MouseEnter:connect(function()
  704. if not ButtonHover then
  705. ButtonHover = true
  706. SFrame.Parent.Button.ImageColor3 = SFrame.Parent.Button.HoverColor.Value
  707. SFrame.Parent.Button.down.ImageColor3 = SFrame.Parent.Button.HoverColor.Value
  708. SF.ButtonHover:Play()
  709. end
  710. SFrame.Parent.Button.MouseLeave:connect(function()
  711. SFrame.Parent.Button.ImageColor3 = color
  712. SFrame.Parent.Button.down.ImageColor3 = color
  713. ButtonHover = false
  714. end)
  715. end)
  716. spawn(function()
  717. local LockTbl = rF.GiveGamepass:InvokeServer(Gpasses, PreviousGamepasses)
  718. LoadingGamepasses = false
  719. function LockButton(FrameName)
  720. PlrGui.GamepassShop.ScrollingFrame:FindFirstChild(FrameName).TextButton.BackgroundColor3 = PlrGui.GamepassShop.DisabledColor.Value
  721. PlrGui.GamepassShop.ScrollingFrame:FindFirstChild(FrameName).TextButton.AutoButtonColor = false
  722. PlrGui.GamepassShop.ScrollingFrame:FindFirstChild(FrameName).TextButton.Text = "Owned"
  723. end
  724. for _, v in pairs(LockTbl) do
  725. LockButton(v)
  726. end
  727. end)
  728. local P = Plr:WaitForChild("P")
  729. local StatsBack = DTbar.VehicleStats.Background
  730. local ListFrameBack = DealershipGUI.List.Background
  731. local SideBar = DTbar.SideBar
  732. local Holder = DealershipGUI.BottomBar.Holder
  733. local ReqG = Holder.Requirement
  734. local CustBtn = StatsBack.Customize
  735. local CExit = DealershipGUI.CustomizeExit.Exit
  736. local Grey = Holder.Next.ImageColor3
  737. local Blue = CustBtn.ImageColor3
  738. local Message = Scrn.Message
  739. local ShopOpen = false
  740. local ListOpen = false
  741. local Dealing = false
  742. local SpawnDisabled = false
  743. local SpawnDisabled2 = false
  744. local ScrollDebounce = false
  745. local CustomizationChange = false
  746. local CustDisabled = false
  747. local Fading = false
  748. local OpenVM = false
  749. local SettingsIsOpen = false
  750. local DTBarDisabled = false
  751. local VehicleAmount = #game.ReplicatedStorage.VehicleInformation:GetChildren()
  752. local View = 1
  753. local PrevSong = 0
  754. local CurrentCar = {}
  755. local StandardValue, VehicleCopy, CustomDataCache, InUseCar, Seat
  756. function GetCurrentCarValue()
  757. local Value
  758. for I in pairs(CurrentCar) do
  759. Value = I
  760. end
  761. return Value
  762. end
  763. function InfoTable(V)
  764. local t = {
  765. VipOnly = false,
  766. GroupOnly = false,
  767. ImageID = false,
  768. Price = false,
  769. Parts = false,
  770. Value = false
  771. }
  772. if V.VipOnly.Value == true then
  773. t.VipOnly = true
  774. end
  775. if V.GroupOnly.Value == true then
  776. t.GroupOnly = true
  777. end
  778. t.ImageID = V.ImageID.Value
  779. t.Price = V.Price.Value
  780. t.Parts = V.Parts.Value
  781. t.Value = V.Value.Value
  782. V = t
  783. return V
  784. end
  785. if 5 > #ListFrameBack.VehicleList:GetChildren() then
  786. print("run")
  787. local VehicleFrames = {}
  788. local Template = ListFrameBack.VehicleList:WaitForChild("Vehicle"):Clone()
  789. local Template2 = DealershipGUI.TopBar.VehicleBar.Vehicle:Clone()
  790. ListFrameBack.VehicleList.Vehicle:Destroy()
  791. DealershipGUI.TopBar.VehicleBar.Vehicle:Destroy()
  792. for Pos, CarN in pairs(VList) do
  793. local C = InfoTable(game.ReplicatedStorage.VehicleInformation:FindFirstChild(CarN))
  794. if C ~= nil then
  795. local New = Template:Clone()
  796. New.Name = CarN
  797. New.ImageButton.Image = "rbxassetid://" .. C.ImageID
  798. New.Color.P.Text = Rounder:ConvertAccurate(C.Price)
  799. New.Parts.Text = "Parts: " .. C.Parts
  800. New.Value.Text = "Value: " .. Rounder:ConvertAccurate(C.Value)
  801. New.P.Value = Pos
  802. New.LayoutOrder = Pos
  803. New.Parent = ListFrameBack.VehicleList
  804. table.insert(VehicleFrames, New)
  805. local New2 = Template2:Clone()
  806. New2.Name = CarN
  807. New2.ImageButton.Image = "rbxassetid://" .. C.ImageID
  808. New2.Color.P.Text = Rounder:ConvertAccurate(C.Price)
  809. New2.P.Value = Pos
  810. New2.LayoutOrder = Pos
  811. New2.Parent = DealershipGUI.TopBar.VehicleBar
  812. table.insert(VehicleFrames, New2)
  813. if C.VipOnly then
  814. New.Color.BackgroundColor3 = Color3.fromRGB(72, 43, 190)
  815. New2.Color.BackgroundColor3 = Color3.fromRGB(72, 43, 190)
  816. elseif C.GroupOnly then
  817. New.Color.BackgroundColor3 = Color3.fromRGB(37, 114, 190)
  818. New2.Color.BackgroundColor3 = Color3.fromRGB(37, 114, 190)
  819. end
  820. end
  821. end
  822. end
  823. function FillOutStats(V)
  824. local Vehicle = game.ReplicatedStorage.VehicleInformation:FindFirstChild(V)
  825. if Vehicle ~= nil then
  826. StatsBack.name.Text = Vehicle:FindFirstChild("Name").Value
  827. StatsBack.Price.Text = "Price: " .. Rounder:ConvertAccurate(Vehicle.Price.Value)
  828. StatsBack.Creator.Text = "Builder: " .. Vehicle.Creator.Value
  829. if Plr.Settings.SpeedUnit.Value == 1 then
  830. StatsBack.Speed.Text = "Speed: " .. math.floor(Vehicle.Speed.Value * 0.8333333333333334 * 0.6818181818181818) .. " MPH"
  831. else
  832. StatsBack.Speed.Text = "Speed: " .. math.floor(Vehicle.Speed.Value * 0.8333333333333334 * 1.09728) .. " KM/H"
  833. end
  834. StatsBack.Value.Text = "Value: " .. Rounder:ConvertAccurate(Vehicle.Value.Value)
  835. StatsBack.Parts.Text = "Parts: " .. Vehicle.Parts.Value
  836. if Vehicle.VipOnly.Value then
  837. StatsBack.TopBar.BackgroundColor3 = Color3.fromRGB(109, 61, 255)
  838. elseif Vehicle.GroupOnly.Value then
  839. StatsBack.TopBar.BackgroundColor3 = Color3.fromRGB(50, 150, 255)
  840. else
  841. StatsBack.TopBar.BackgroundColor3 = color
  842. end
  843. end
  844. Vehicle = nil
  845. end
  846. function LockDSButtons()
  847. Holder.Spawn.ImageColor3 = Holder.Spawn.DisabledColor.Value
  848. Holder.Spawn.down.ImageColor3 = Holder.Spawn.DisabledColor.Value
  849. SpawnDisabled2 = true
  850. ReqG.Visible = true
  851. CustBtn.ImageColor3 = CustBtn.DisabledColor.Value
  852. CustBtn.down.ImageColor3 = CustBtn.DisabledColor.Value
  853. CustDisabled = true
  854. end
  855. function UpdateRequirements(V)
  856. local Result, Extra = rF.PurchVehicle:InvokeServer(V, false)
  857. if Result == "Owned" then
  858. if not SpawnDisabled then
  859. Holder.Spawn.ImageColor3 = color
  860. Holder.Spawn.down.ImageColor3 = color
  861. end
  862. CustBtn.ImageColor3 = Blue
  863. CustBtn.down.ImageColor3 = Blue
  864. CustDisabled = false
  865. ReqG.Visible = false
  866. SpawnDisabled2 = false
  867. elseif Result == "Low Tokens" then
  868. LockDSButtons()
  869. local N = game.ReplicatedStorage.VehicleInformation:FindFirstChild(GetCurrentCarValue().Name).TokenRequirement.Value
  870. if N == 1 then
  871. ReqG.Text = "Requires " .. N .. " token"
  872. else
  873. ReqG.Text = "Requires " .. N .. " tokens"
  874. end
  875. elseif Result == "Need VIP" then
  876. LockDSButtons()
  877. ReqG.Text = "Requires VIP"
  878. elseif Result == "Group" then
  879. LockDSButtons()
  880. ReqG.Text = "Join the group in the description to unlock this vehicle"
  881. elseif Result == "Low Cash" then
  882. LockDSButtons()
  883. ReqG.Text = "Not enough money"
  884. end
  885. end
  886. function ChangeVehicleProps(Vehicle, Color, Material, Reflectance, Value, DefaultValue, TextColor)
  887. pcall(function()
  888. if Material == "Standard" then
  889. local Folder = game.ReplicatedStorage.VehicleInformation:FindFirstChild(Vehicle.Name)
  890. Material = Folder.StandardMaterial.Value
  891. Reflectance = Folder.StandardReflectance.Value
  892. end
  893. for I, VehiclePart in pairs(Vehicle.Car.Body.Parts.Paint:GetChildren()) do
  894. if VehiclePart:IsA("BasePart") then
  895. VehiclePart.Material = Material
  896. VehiclePart.Reflectance = Reflectance
  897. if Color then
  898. VehiclePart.BrickColor = Color
  899. end
  900. end
  901. end
  902. for I, Model in pairs(Vehicle.Car.Wheels:GetChildren()) do
  903. for I, VehiclePart in pairs(Model:GetChildren()) do
  904. if VehiclePart:IsA("BasePart") and VehiclePart.Name == "Paint" then
  905. VehiclePart.Material = Material
  906. VehiclePart.Reflectance = Reflectance
  907. if Color then
  908. VehiclePart.BrickColor = Color
  909. end
  910. end
  911. end
  912. end
  913. if Value then
  914. Vehicle.Value.Value = Value
  915. Holder.Value.Text = "Value: " .. Rounder:ConvertAccurate(Value)
  916. Holder.Value.TextColor3 = TextColor
  917. Holder.DefaultValue.Text = "Default Value: " .. Rounder:ConvertAccurate(DefaultValue)
  918. if TextColor == Color3.new(1, 1, 1) then
  919. Holder.DefaultValue.TextColor3 = Color3.fromRGB(205, 205, 205)
  920. else
  921. Holder.DefaultValue.TextColor3 = TextColor
  922. end
  923. end
  924. end)
  925. end
  926. local ColorChanged = false
  927. function LoadCustomization(Vehicle)
  928. if game.ReplicatedStorage.VehicleInformation:FindFirstChild(Vehicle.Name) then
  929. local CustomData = rF.LoadSaveCustoms:InvokeServer("Load", nil, Vehicle.Name)
  930. if CustomData then
  931. ColorChanged = true
  932. CustomDataCache = CustomData
  933. local BC, BM = CustomData.BodyColor, CustomData.BodyMaterial
  934. local Folder = game.ReplicatedStorage.VehicleInformation:FindFirstChild(GetCurrentCarValue().Name)
  935. local NormalValue = Folder.StandardValue.Value
  936. StandardValue = Folder.Value.Value
  937. if BM == "Regular" then
  938. ChangeVehicleProps(Vehicle, BrickColor.new(BC), "Standard", "Standard")
  939. elseif BM == "Metal" then
  940. ChangeVehicleProps(Vehicle, BrickColor.new(BC), "Metal", 0)
  941. elseif BM == "Neon" then
  942. ChangeVehicleProps(Vehicle, BrickColor.new(BC), "Neon", 0)
  943. Vehicle.Value.Value = math.ceil(StandardValue + NormalValue * 0.25)
  944. elseif BM == "Silver" then
  945. if BC == "Pearl" then
  946. ColorChanged = false
  947. end
  948. ChangeVehicleProps(Vehicle, BrickColor.new(BC), "SmoothPlastic", 0.45)
  949. Vehicle.Value.Value = math.ceil(StandardValue + NormalValue * 0.5)
  950. elseif BM == "Gold" then
  951. if BC == "Bright yellow" then
  952. ColorChanged = false
  953. end
  954. ChangeVehicleProps(Vehicle, BrickColor.new(BC), "SmoothPlastic", 0.6)
  955. Vehicle.Value.Value = math.ceil(StandardValue + NormalValue * 1)
  956. elseif BM == "Platinum" then
  957. local Reflectance = 0.8
  958. if BC == "Institutional white" then
  959. Reflectance = 1
  960. ColorChanged = false
  961. end
  962. ChangeVehicleProps(Vehicle, BrickColor.new(BC), "SmoothPlastic", 0.8)
  963. Vehicle.Value.Value = math.ceil(StandardValue + NormalValue * 2)
  964. end
  965. elseif not CustomData then
  966. CustomDataCache = nil
  967. end
  968. end
  969. end
  970. function LoadVehicle(AssetID)
  971. return rF.InsertCar:InvokeServer(AssetID)
  972. end
  973. function SpawnPreview()
  974. local status = false
  975. delay(10, function()
  976. if status then
  977. error("SpawnPreview stopped at: " .. status)
  978. end
  979. end)
  980. if P.Value == 0 then
  981. P.Value = 1
  982. end
  983. status = "Clearing old models and Vehiclebar"
  984. if 1 <= #Cam:GetChildren() then
  985. rE.ClearModels:FireServer()
  986. end
  987. CurrentCar = {}
  988. local CarName = VList[P.Value]
  989. DTbar.VehicleBar.UIPageLayout:JumpTo(DTbar.VehicleBar:FindFirstChild(CarName))
  990. status = "Loading preview vehicle"
  991. CurrentCar[LoadVehicle(game.ReplicatedStorage.VehicleInformation:FindFirstChild(CarName).AssetID.Value)] = true
  992. status = "Adjusting car value"
  993. GetCurrentCarValue().Value.Value = game.ReplicatedStorage.VehicleInformation:FindFirstChild(CarName).Value.Value
  994. status = "Loading customization"
  995. LoadCustomization(GetCurrentCarValue())
  996. status = "Filling stats"
  997. FillOutStats(GetCurrentCarValue().Name)
  998. status = "Parenting and primarypart"
  999. if GetCurrentCarValue().PrimaryPart ~= nil then
  1000. GetCurrentCarValue():SetPrimaryPartCFrame(DealershipModel.VehicleSpawn.CFrame)
  1001. else
  1002. rE.RefreshCharacter:FireServer()
  1003. end
  1004. GetCurrentCarValue().Parent = Cam
  1005. status = "Update Requirements"
  1006. UpdateRequirements(GetCurrentCarValue().Name)
  1007. status = false
  1008. end
  1009. function SaveCustomizations()
  1010. if CustomizationChange then
  1011. local PAINT
  1012. for _, v in pairs(GetCurrentCarValue().Car.Body.Parts.Paint:GetChildren()) do
  1013. if v:IsA("BasePart") then
  1014. PAINT = v
  1015. break
  1016. end
  1017. end
  1018. local CustomData = {
  1019. BodyColor = PAINT.BrickColor.Name,
  1020. BodyMaterial = PAINT.Material.Name
  1021. }
  1022. local Folder = game.ReplicatedStorage.VehicleInformation:FindFirstChild(GetCurrentCarValue().Name)
  1023. if PAINT.Material.Name == Folder.StandardMaterial.Value and PAINT.Reflectance > Folder.StandardReflectance.Value - 0.01 and PAINT.Reflectance < Folder.StandardReflectance.Value + 0.01 then
  1024. CustomData.BodyMaterial = "Regular"
  1025. elseif PAINT.Material.Name == "Metal" then
  1026. CustomData.BodyMaterial = "Metal"
  1027. elseif PAINT.Material.Name == "Neon" then
  1028. CustomData.BodyMaterial = "Neon"
  1029. elseif PAINT.Material.Name == "SmoothPlastic" and PAINT.Reflectance > 0.44 and PAINT.Reflectance < 0.46 then
  1030. CustomData.BodyMaterial = "Silver"
  1031. elseif PAINT.Material.Name == "SmoothPlastic" and PAINT.Reflectance > 0.59 and PAINT.Reflectance < 0.61 then
  1032. CustomData.BodyMaterial = "Gold"
  1033. elseif PAINT.Material.Name == "SmoothPlastic" and PAINT.Reflectance > 0.79 and PAINT.Reflectance < 1.01 then
  1034. CustomData.BodyMaterial = "Platinum"
  1035. end
  1036. rF.LoadSaveCustoms:InvokeServer("Save", CustomData, GetCurrentCarValue().Name)
  1037. CustomDataCache = CustomData
  1038. CustomizationChange = false
  1039. CustomData = nil
  1040. PAINT = nil
  1041. end
  1042. end
  1043. function SeatAdded(child)
  1044. if child:IsA("Weld") and child.Part1 and child.Part1.Name == "HumanoidRootPart" and game.Players:GetPlayerFromCharacter(child.Part1.Parent) == Plr then
  1045. if View == 4 then
  1046. wait(0.1)
  1047. Cam.CameraSubject = workspace.Dealership.CameraFocus
  1048. Cam.CFrame = workspace.Dealership.CameraFocus.CFrame
  1049. if PlrGui:FindFirstChild("Interface") then
  1050. PlrGui.Interface.Enabled = false
  1051. end
  1052. elseif View == 5 then
  1053. wait(0.1)
  1054. Cam.CameraSubject = workspace.Garage.CameraFocus
  1055. Cam.CFrame = workspace.Garage.CameraFocus.CFrame
  1056. if PlrGui:FindFirstChild("Interface") then
  1057. PlrGui.Interface.Enabled = false
  1058. end
  1059. end
  1060. end
  1061. end
  1062. function SeatRemoved(child)
  1063. if child:IsA("Weld") and child.Part1 and child.Part1.Name == "HumanoidRootPart" and game.Players:GetPlayerFromCharacter(child.Part1.Parent) == Plr then
  1064. if View == 2 then
  1065. wait(0.1)
  1066. Cam.CameraSubject = Seat
  1067. Cam.CFrame = Seat.CFrame
  1068. elseif View == 4 then
  1069. wait(0.1)
  1070. Cam.CameraSubject = workspace.Dealership.CameraFocus
  1071. Cam.CFrame = workspace.Dealership.CameraFocus.CFrame
  1072. elseif View == 5 then
  1073. wait(0.1)
  1074. Cam.CameraSubject = workspace.Garage.CameraFocus
  1075. Cam.CFrame = workspace.Garage.CameraFocus.CFrame
  1076. end
  1077. end
  1078. end
  1079. function SeatTouched(part)
  1080. if part.Name == "Enable" and part.Parent == Sensors and Seat.Music.Value == 0 then
  1081. Seat.Music.Value = 1
  1082. if PlrGui:FindFirstChild("Interface") then
  1083. PlrGui.Interface.DamageEnabled.Value = true
  1084. end
  1085. elseif part.Name == "Disable" and part.Parent == Sensors and Seat.Music.Value == 1 then
  1086. Seat.Music.Value = 0
  1087. if PlrGui:FindFirstChild("Interface") then
  1088. PlrGui.Interface.DamageEnabled.Value = false
  1089. end
  1090. end
  1091. end
  1092. Menu.Dealership.MouseButton1Click:connect(function()
  1093. Fading = true
  1094. BtnClickAnim(Menu.Dealership)
  1095. repeat
  1096. wait()
  1097. until not ChangingMusic.Value
  1098. PrevSong = Music.Value
  1099. Music.Value = 0
  1100. ChangingMusic.Value = true
  1101. BScrnIn()
  1102. local status = "Parenting preview rooms"
  1103. delay(10, function()
  1104. if status then
  1105. error("Dealership enter loading stopped at: " .. status)
  1106. end
  1107. end)
  1108. DealershipModel.Parent = game.Workspace
  1109. GarageModel.Parent = game.Workspace
  1110. status = "Adjusting GUI's"
  1111. TBar.Visible = false
  1112. Scrn.Tutorial.Visible = false
  1113. Scrn.Gamepasses.Visible = false
  1114. SettingsIsOpen = false
  1115. SettingsGUI.Settings.Background.Position = UDim2.new(-3.5, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y)
  1116. SettingsGUI.Settings.Visible = false
  1117. DealershipGUI.BottomBar.Visible = true
  1118. DealershipGUI.TopBar.Visible = true
  1119. Menu.Dealership.ImageColor3 = color
  1120. game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
  1121. if MobileUser then
  1122. US.ModalEnabled = true
  1123. end
  1124. ButtonHover = false
  1125. status = "Adjusting Camera"
  1126. Cam.CameraType = "Custom"
  1127. Cam.CameraSubject = DealershipModel.CameraFocus
  1128. Cam.CFrame = DealershipModel.CameraFocus.CFrame
  1129. Plr.CameraMode = "Classic"
  1130. Plr.CameraMaxZoomDistance = 25
  1131. View = 4
  1132. status = "Hiding extras"
  1133. if VehicleMenu.Menu.Visible == true then
  1134. VehicleMenu.Menu.Visible = false
  1135. OpenVM = true
  1136. else
  1137. OpenVM = false
  1138. end
  1139. if PlrGui:FindFirstChild("Interface") then
  1140. PlrGui.Interface.Enabled = false
  1141. end
  1142. if MeltDownActive.Value then
  1143. Scrn.Message.Position = MessagePos2
  1144. end
  1145. status = "Spawning Preview"
  1146. SpawnPreview()
  1147. status = "Editing vehiclelist"
  1148. local Owned = rF.GetOwned:InvokeServer()
  1149. for _, vname in pairs(Owned) do
  1150. if game.ReplicatedStorage.VehicleInformation:FindFirstChild(vname).VipOnly.Value == true then
  1151. ListFrameBack.VehicleList:FindFirstChild(vname).Color.BackgroundColor3 = Color3.fromRGB(109, 61, 255)
  1152. DTbar.VehicleBar:FindFirstChild(vname).Color.BackgroundColor3 = Color3.fromRGB(109, 61, 255)
  1153. elseif game.ReplicatedStorage.VehicleInformation:FindFirstChild(vname).GroupOnly.Value == true then
  1154. ListFrameBack.VehicleList:FindFirstChild(vname).Color.BackgroundColor3 = Color3.fromRGB(50, 150, 255)
  1155. DTbar.VehicleBar:FindFirstChild(vname).Color.BackgroundColor3 = Color3.fromRGB(50, 150, 255)
  1156. else
  1157. ListFrameBack.VehicleList:FindFirstChild(vname).Color.BackgroundColor3 = color
  1158. DTbar.VehicleBar:FindFirstChild(vname).Color.BackgroundColor3 = color
  1159. end
  1160. end
  1161. for _, v in pairs(DealershipGUI.List.Background.VehicleList:GetChildren()) do
  1162. local Vehicle = game.ReplicatedStorage.VehicleInformation:FindFirstChild(v.Name)
  1163. if v:IsA("Frame") then
  1164. if Plr.Settings.SpeedUnit.Value == 1 then
  1165. v.Speed.Text = "Speed: " .. math.floor(Vehicle.Speed.Value * 0.8333333333333334 * 0.6818181818181818) .. " MPH"
  1166. else
  1167. v.Speed.Text = "Speed: " .. math.floor(Vehicle.Speed.Value * 0.8333333333333334 * 1.09728) .. " KM/H"
  1168. end
  1169. end
  1170. end
  1171. Music.Value = 2
  1172. Dealing = true
  1173. BScrnOut()
  1174. status = false
  1175. ChangingMusic.Value = false
  1176. Fading = false
  1177. Owned = nil
  1178. end)
  1179. Menu.Dealership.MouseEnter:connect(function()
  1180. if not ButtonHover then
  1181. ButtonHover = true
  1182. Menu.Dealership.ImageColor3 = Menu.Dealership.HoverColor.Value
  1183. Menu.Dealership.down.ImageColor3 = Menu.Dealership.HoverColor.Value
  1184. SF.ButtonHover:Play()
  1185. end
  1186. Menu.Dealership.MouseLeave:connect(function()
  1187. Menu.Dealership.ImageColor3 = color
  1188. Menu.Dealership.down.ImageColor3 = color
  1189. ButtonHover = false
  1190. end)
  1191. end)
  1192. Holder.Next.MouseButton1Click:connect(function()
  1193. if not ScrollDebounce then
  1194. ScrollDebounce = true
  1195. BtnClickAnim(Holder.Next)
  1196. if P.Value < VehicleAmount then
  1197. P.Value = P.Value + 1
  1198. else
  1199. P.Value = 0
  1200. end
  1201. SpawnPreview()
  1202. ScrollDebounce = false
  1203. end
  1204. end)
  1205. Holder.Next.MouseEnter:connect(function()
  1206. if not ButtonHover then
  1207. ButtonHover = true
  1208. Holder.Next.ImageColor3 = Holder.Next.HoverColor.Value
  1209. Holder.Next.down.ImageColor3 = Holder.Next.HoverColor.Value
  1210. SF.ButtonHover:Play()
  1211. end
  1212. Holder.Next.MouseLeave:connect(function()
  1213. Holder.Next.ImageColor3 = Grey
  1214. Holder.Next.down.ImageColor3 = Grey
  1215. ButtonHover = false
  1216. end)
  1217. end)
  1218. Holder.Previous.MouseButton1Click:connect(function()
  1219. if not ScrollDebounce then
  1220. ScrollDebounce = true
  1221. BtnClickAnim(Holder.Previous)
  1222. if P.Value > 1 then
  1223. P.Value = P.Value - 1
  1224. else
  1225. P.Value = VehicleAmount
  1226. end
  1227. SpawnPreview()
  1228. ScrollDebounce = false
  1229. end
  1230. end)
  1231. Holder.Previous.MouseEnter:connect(function()
  1232. if not ButtonHover then
  1233. ButtonHover = true
  1234. Holder.Previous.ImageColor3 = Holder.Previous.HoverColor.Value
  1235. Holder.Previous.down.ImageColor3 = Holder.Previous.HoverColor.Value
  1236. SF.ButtonHover:Play()
  1237. end
  1238. Holder.Previous.MouseLeave:connect(function()
  1239. Holder.Previous.ImageColor3 = Grey
  1240. Holder.Previous.down.ImageColor3 = Grey
  1241. ButtonHover = false
  1242. end)
  1243. end)
  1244. function ButtonClick2D(Button)
  1245. SF.ButtonClick2D:play()
  1246. Button.BackgroundTransparency = 0.99
  1247. Button.BackgroundColor3 = Color3.new(1, 1, 1)
  1248. for i = 1, 3 do
  1249. Button.BackgroundTransparency = Button.BackgroundTransparency - 0.03
  1250. wait()
  1251. end
  1252. if ButtonHover then
  1253. Button.BackgroundTransparency = 0.85
  1254. else
  1255. Button.BackgroundTransparency = 1
  1256. end
  1257. Button.BackgroundColor3 = Color3.new(0, 0, 0)
  1258. end
  1259. local VehicleHover = false
  1260. local ChangeWait = 0
  1261. local VehicleFrames = {}
  1262. for _, v in pairs(ListFrameBack.VehicleList:GetChildren()) do
  1263. if v:IsA("Frame") then
  1264. table.insert(VehicleFrames, v)
  1265. end
  1266. end
  1267. for _, v in pairs(DTbar.VehicleBar:GetChildren()) do
  1268. if v:IsA("Frame") then
  1269. table.insert(VehicleFrames, v)
  1270. end
  1271. end
  1272. for _, v in pairs(VehicleFrames) do
  1273. v.Click.MouseButton1Click:connect(function()
  1274. ButtonClick2D(v.Click)
  1275. if not ScrollDebounce then
  1276. ScrollDebounce = true
  1277. P.Value = v.P.Value
  1278. SpawnPreview()
  1279. ScrollDebounce = false
  1280. end
  1281. end)
  1282. v.Click.MouseEnter:connect(function()
  1283. if not VehicleHover then
  1284. VehicleHover = true
  1285. SF.ButtonHover:play()
  1286. v.Click.BackgroundTransparency = 0.85
  1287. FillOutStats(v.Name)
  1288. end
  1289. end)
  1290. v.Click.MouseLeave:connect(function()
  1291. v.Click.BackgroundTransparency = 1
  1292. VehicleHover = false
  1293. ChangeWait = ChangeWait + 1
  1294. wait(0.5)
  1295. ChangeWait = ChangeWait - 1
  1296. if ChangeWait == 0 and not VehicleHover and not ScrollDebounce then
  1297. FillOutStats(GetCurrentCarValue().Name)
  1298. end
  1299. end)
  1300. end
  1301. local G_Open = false
  1302. Holder.Spawn.MouseButton1Click:connect(function()
  1303. BtnClickAnim(Holder.Spawn)
  1304. if not SpawnDisabled and not ScrollDebounce then
  1305. ScrollDebounce = true
  1306. local Result, Extra = rF.PurchVehicle:InvokeServer(GetCurrentCarValue().Name, false)
  1307. if Result == "Need VIP" then
  1308. MP:PromptPurchase(Plr, Gpasses[5])
  1309. elseif Result == "Group" and not G_Open and not AnimationActive then
  1310. G_Open = true
  1311. AnimationActive = true
  1312. DealershipGUI.JoinGroup.Visible = true
  1313. SF.Swoosh.PlaybackSpeed = 1.3
  1314. SF.Swoosh:play()
  1315. DealershipGUI.JoinGroup.Background:TweenPosition(UDim2.new(-3.5, 0, 0, (DealershipGUI.MeasureMent.AbsoluteSize.Y - DealershipGUI.JoinGroup.Background.AbsoluteSize.Y) / 2), "In", "Sine", 0.3, false)
  1316. wait(0.3)
  1317. AnimationActive = false
  1318. elseif Result == "Owned" then
  1319. Fading = true
  1320. Music.Value = 0
  1321. ChangingMusic.Value = true
  1322. BScrnIn()
  1323. do
  1324. local status = "Saving customizations"
  1325. delay(10, function()
  1326. if status then
  1327. error("Spawn loading stopped at: " .. status)
  1328. end
  1329. end)
  1330. Dealing = false
  1331. SF.Spawn:Play()
  1332. SaveCustomizations()
  1333. status = "Copying vehicle"
  1334. VehicleCopy = Cam:GetChildren()[1]:Clone()
  1335. status = "Spawning event"
  1336. local Parts = rF.SpawnVehicle:InvokeServer(VehicleCopy.Name, CustomDataCache)
  1337. status = "CanCollide false"
  1338. for _, v in pairs(Parts) do
  1339. v.CanCollide = false
  1340. end
  1341. Parts = nil
  1342. status = "Waiting for car"
  1343. InUseCar = game.Workspace.CarCollection:WaitForChild(Plr.Name)
  1344. status = "Assigning seat"
  1345. Seat = InUseCar.Car.Body.VehicleSeat
  1346. status = "Clearing old models"
  1347. if #Cam:GetChildren() >= 1 then
  1348. rE.ClearModels:FireServer()
  1349. end
  1350. CurrentCar = {}
  1351. status = "Adjusting GUI's"
  1352. CExit.Position = UDim2.new(0, 0, -1, 0)
  1353. DealershipGUI.Customize.Background.Position = UDim2.new(-5, 0, 0, 0)
  1354. DealershipGUI.Customize.ColorName.Position = UDim2.new(-5, 0, 8.945, 0)
  1355. StatsBack.Position = UDim2.new(-0.1, 0, 0, 0)
  1356. SideBar.Position = UDim2.new(1, 0, 1.08, 0)
  1357. Holder.Previous.Position = UDim2.new(0, 0, 0, 0)
  1358. Holder.Next.Position = UDim2.new(0.82, 0, 0, 0)
  1359. Holder.Value.Position = UDim2.new(-0.5, 0, 0.25, 0)
  1360. Holder.TokenBonus.Position = UDim2.new(-0.5, 0, 0.25, 0)
  1361. Holder.DefaultValue.Position = UDim2.new(-0.5, 0, 0.25, 0)
  1362. ListFrameBack.Position = UDim2.new(-5.1, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y)
  1363. DealershipGUI.JoinGroup.Background.Position = UDim2.new(-3.5, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y)
  1364. Holder.Spawn.ImageColor3 = color
  1365. DTBarDisabled = false
  1366. ButtonHover = false
  1367. ShopOpen = false
  1368. ListOpen = false
  1369. G_Open = false
  1370. DealershipGUI.CustomizeExit.Visible = false
  1371. DealershipGUI.Customize.Visible = false
  1372. DealershipGUI.TopBar.Visible = false
  1373. DealershipGUI.BottomBar.Visible = false
  1374. DealershipGUI.List.Visible = false
  1375. DealershipGUI.JoinGroup.Visible = false
  1376. TBar.Visible = true
  1377. if MeltDownActive.Value and not MobileUser then
  1378. Scrn.Message.Position = MessagePos1
  1379. end
  1380. game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
  1381. if MobileUser then
  1382. US.ModalEnabled = false
  1383. end
  1384. View = 1
  1385. status = "Music value"
  1386. local val = Instance.new("NumberValue")
  1387. val.Parent = Seat
  1388. val.Name = "Music"
  1389. val.Value = 1
  1390. status = "Seat connections"
  1391. Seat.Touched:connect(SeatTouched)
  1392. Seat.ChildAdded:connect(SeatAdded)
  1393. Seat.ChildRemoved:connect(SeatRemoved)
  1394. status = "Waiting"
  1395. wait(0.5)
  1396. status = "Teleporting player"
  1397. rE.TeleportPlr:FireServer("VehicleSeat")
  1398. status = "Changing Camera"
  1399. Cam.CameraSubject = Plr.Character.Humanoid
  1400. Cam.CameraType = "Custom"
  1401. Plr.CameraMaxZoomDistance = 250
  1402. status = "Vehicle menu"
  1403. VehicleMenu.Menu.Visible = true
  1404. VehicleMenu.Menu.Background.Hide.Hide.Visible = true
  1405. VehicleMenu.Menu.Background.Hide.Show.Visible = false
  1406. VehicleMenu.Menu.Background.Background.Teleport.ImageColor3 = color
  1407. VehicleMenu.Menu.Background.Background.Teleport.down.ImageColor3 = color
  1408. VehicleMenu.Menu.Background.Background.CameraLabel.Text = VehicleMenu.Menu.Background.Background.CameraLabel.DisabledText.Value
  1409. VehicleMenu.Menu.Background.Position = VMenuPos1
  1410. status = "Removing preview rooms"
  1411. GarageModel.Parent = nil
  1412. DealershipModel.Parent = nil
  1413. Music.Value = 1
  1414. BScrnOut()
  1415. status = false
  1416. ChangingMusic.Value = false
  1417. Fading = false
  1418. end
  1419. end
  1420. ScrollDebounce = false
  1421. end
  1422. end)
  1423. Holder.Spawn.MouseEnter:connect(function()
  1424. if not ButtonHover and not SpawnDisabled and not SpawnDisabled2 then
  1425. ButtonHover = true
  1426. Holder.Spawn.ImageColor3 = Holder.Spawn.HoverColor.Value
  1427. Holder.Spawn.down.ImageColor3 = Holder.Spawn.HoverColor.Value
  1428. SF.ButtonHover:Play()
  1429. elseif not ButtonHover then
  1430. ButtonHover = true
  1431. Holder.Spawn.ImageColor3 = Holder.Spawn.DisabledColorHover.Value
  1432. Holder.Spawn.down.ImageColor3 = Holder.Spawn.DisabledColorHover.Value
  1433. SF.ButtonHover:Play()
  1434. end
  1435. Holder.Spawn.MouseLeave:connect(function()
  1436. if not SpawnDisabled and not SpawnDisabled2 then
  1437. Holder.Spawn.ImageColor3 = color
  1438. Holder.Spawn.down.ImageColor3 = color
  1439. ButtonHover = false
  1440. else
  1441. Holder.Spawn.ImageColor3 = Holder.Spawn.DisabledColor.Value
  1442. Holder.Spawn.down.ImageColor3 = Holder.Spawn.DisabledColor.Value
  1443. ButtonHover = false
  1444. end
  1445. end)
  1446. end)
  1447. local SoundDebounce = false
  1448. function AddNotification(VehicleNum)
  1449. local Stats = game.ReplicatedStorage.VehicleInformation:FindFirstChild(VList[VehicleNum])
  1450. local Frame = Scrn.Notification:Clone()
  1451. Frame.Vehicle.ImageButton.Image = "rbxassetid://" .. Stats.ImageID.Value
  1452. if Stats.VipOnly.Value then
  1453. Frame.Vehicle.Color.BackgroundColor3 = Color3.fromRGB(109, 61, 255)
  1454. elseif Stats.GroupOnly.Value then
  1455. Frame.Vehicle.Color.BackgroundColor3 = Color3.fromRGB(50, 150, 255)
  1456. end
  1457. Frame.Parent = Scrn.Notifications
  1458. Frame.Visible = true
  1459. P.Value = VehicleNum
  1460. for _, v in pairs(Scrn.Notifications:GetChildren()) do
  1461. v.Target.Value = v.Target.Value - 2.25
  1462. v.Vehicle:TweenPosition(UDim2.new(-2.25, 0, v.Target.Value, 0), "In", "Sine", 0.3, true)
  1463. end
  1464. if not SoundDebounce then
  1465. SoundDebounce = true
  1466. SF.Notification:play()
  1467. end
  1468. delay(1.5, function()
  1469. SoundDebounce = false
  1470. wait(3)
  1471. Frame.Vehicle:TweenPosition(Frame.Vehicle.Position + UDim2.new(2.25, 0, 0, 0), "Out", "Back", 0.3, false)
  1472. wait(0.3)
  1473. Frame:Destroy()
  1474. end)
  1475. end
  1476. local Debounce = false
  1477. local Waiting = false
  1478. local MoneyChanged = false
  1479. local StartUpFinished = false
  1480. local BestCar = 0
  1481. local Previous = 0
  1482. local Target = 0
  1483. function UpdateProgress()
  1484. if Target then
  1485. local Difference = Target - Previous
  1486. local Money = Plr.Money.Value - Previous
  1487. if Money > 0 then
  1488. Progress.Bar.Size = UDim2.new(math.min(1, Money / Difference), 0, 1, 0)
  1489. else
  1490. Progress.Bar.Size = UDim2.new(0, 0, 1, 0)
  1491. end
  1492. else
  1493. Progress.Bar.Size = UDim2.new(1, 0, 1, 0)
  1494. end
  1495. end
  1496. function GiveUnlockedVehicles()
  1497. for i, v in pairs(VList) do
  1498. local Result, Afforded = rF.PurchVehicle:InvokeServer(v, true)
  1499. if Result == "Low Cash" then
  1500. Target = game.ReplicatedStorage.VehicleInformation:FindFirstChild(VList[i]).Price.Value
  1501. break
  1502. elseif Result == "Low Tokens" then
  1503. Target = false
  1504. break
  1505. end
  1506. end
  1507. if Target == 0 then
  1508. Target = false
  1509. end
  1510. end
  1511. function CheckBestVehicle()
  1512. local Owned = rF.GetOwned:InvokeServer()
  1513. for i, v in pairs(VList) do
  1514. for _, a in pairs(Owned) do
  1515. if a == v then
  1516. BestCar = i
  1517. end
  1518. end
  1519. end
  1520. end
  1521. spawn(function()
  1522. repeat
  1523. wait()
  1524. until not LoadingGamepasses
  1525. GiveUnlockedVehicles()
  1526. CheckBestVehicle()
  1527. Previous = game.ReplicatedStorage.VehicleInformation:FindFirstChild(VList[BestCar]).Price.Value
  1528. if Target then
  1529. Progress.Label.Text = "Next Vehicle: " .. Rounder:ConvertAccurate(Target)
  1530. else
  1531. Progress.Label.Text = "Max"
  1532. end
  1533. UpdateProgress()
  1534. StartUpFinished = true
  1535. end)
  1536. function CheckCar(Car)
  1537. local Result, Afforded = rF.PurchVehicle:InvokeServer(VList[Car], true)
  1538. if Result == "Bought" then
  1539. if Dealing then
  1540. if game.ReplicatedStorage.VehicleInformation:FindFirstChild(VList[Car]).VipOnly.Value == true then
  1541. ListFrameBack.VehicleList:FindFirstChild(VList[Car]).Color.BackgroundColor3 = Color3.fromRGB(109, 61, 255)
  1542. DTbar.VehicleBar:FindFirstChild(VList[Car]).Color.BackgroundColor3 = Color3.fromRGB(109, 61, 255)
  1543. elseif game.ReplicatedStorage.VehicleInformation:FindFirstChild(VList[Car]).GroupOnly.Value == true then
  1544. ListFrameBack.VehicleList:FindFirstChild(VList[Car]).Color.BackgroundColor3 = Color3.fromRGB(50, 150, 255)
  1545. DTbar.VehicleBar:FindFirstChild(VList[Car]).Color.BackgroundColor3 = Color3.fromRGB(50, 150, 255)
  1546. else
  1547. ListFrameBack.VehicleList:FindFirstChild(VList[Car]).Color.BackgroundColor3 = color
  1548. DTbar.VehicleBar:FindFirstChild(VList[Car]).Color.BackgroundColor3 = color
  1549. end
  1550. else
  1551. AddNotification(Car)
  1552. end
  1553. end
  1554. if Afforded == true then
  1555. BestCar = BestCar + 1
  1556. if BestCar < VehicleAmount then
  1557. CheckCar(BestCar + 1)
  1558. else
  1559. Target = false
  1560. Progress.Label.Text = "Max"
  1561. UpdateProgress()
  1562. end
  1563. elseif Target < game.ReplicatedStorage.VehicleInformation:FindFirstChild(VList[Car]).Price.Value then
  1564. if Result == "Low Cash" then
  1565. Previous = Target
  1566. Target = game.ReplicatedStorage.VehicleInformation:FindFirstChild(VList[Car]).Price.Value
  1567. Progress.Label.Text = "Next Vehicle: " .. Rounder:ConvertAccurate(Target)
  1568. UpdateProgress()
  1569. elseif Result ~= "Low Tokens" and Car < VehicleAmount then
  1570. CheckCar(Car + 1)
  1571. else
  1572. Target = false
  1573. Progress.Label.Text = "Max"
  1574. UpdateProgress()
  1575. end
  1576. end
  1577. Result, Afforded = nil, nil
  1578. end
  1579. Plr.Money.Changed:connect(function()
  1580. if not StartUpFinished then
  1581. repeat
  1582. wait(0.1)
  1583. until StartUpFinished == true
  1584. end
  1585. if not Waiting then
  1586. Waiting = true
  1587. MoneyChanged = true
  1588. wait()
  1589. Waiting = false
  1590. UpdateProgress()
  1591. if not Debounce and BestCar < VehicleAmount and Target then
  1592. Debounce = true
  1593. MoneyChanged = false
  1594. CheckCar(BestCar + 1)
  1595. if Dealing and 1 <= #Cam:GetChildren() then
  1596. UpdateRequirements(GetCurrentCarValue().Name)
  1597. end
  1598. wait(5)
  1599. Debounce = false
  1600. wait(5)
  1601. if MoneyChanged and not Debounce and BestCar < VehicleAmount and Target then
  1602. CheckCar(BestCar + 1)
  1603. if Dealing and 1 <= #Cam:GetChildren() then
  1604. UpdateRequirements(GetCurrentCarValue().Name)
  1605. end
  1606. end
  1607. end
  1608. end
  1609. end)
  1610. local ExitColor = SideBar.Exit.ImageColor3
  1611. local ExitDisabled = false
  1612. function ExitDealership(Hidden)
  1613. ShopOpen = false
  1614. ListFrameBack.Parent.Visible = false
  1615. ListFrameBack.Position = UDim2.new(-5.1, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y)
  1616. ListOpen = false
  1617. DealershipGUI.JoinGroup.Visible = false
  1618. DealershipGUI.JoinGroup.Background.Position = UDim2.new(-3.5, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y)
  1619. G_Open = false
  1620. Music.Value = 0
  1621. ChangingMusic.Value = true
  1622. BScrnIn()
  1623. Dealing = false
  1624. Cam.CameraSubject = Plr.Character.Humanoid
  1625. Cam.CameraType = "Custom"
  1626. Plr.CameraMaxZoomDistance = 250
  1627. View = 1
  1628. if 1 <= #Cam:GetChildren() then
  1629. rE.ClearModels:FireServer()
  1630. end
  1631. CurrentCar = {}
  1632. if not Hidden and OpenVM then
  1633. VehicleMenu.Menu.Visible = true
  1634. end
  1635. if PlrGui:FindFirstChild("Interface") then
  1636. PlrGui.Interface.Enabled = true
  1637. end
  1638. if MeltDownActive.Value and not MobileUser then
  1639. Scrn.Message.Position = MessagePos1
  1640. end
  1641. TBar.Visible = true
  1642. DealershipGUI.BottomBar.Visible = false
  1643. DealershipGUI.TopBar.Visible = false
  1644. SideBar.Exit.HoverLabel.Visible = false
  1645. SideBar.Exit.ImageColor3 = ExitColor
  1646. game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
  1647. if MobileUser then
  1648. US.ModalEnabled = false
  1649. end
  1650. ButtonHover = false
  1651. Music.Value = PrevSong
  1652. DealershipModel.Parent = nil
  1653. GarageModel.Parent = nil
  1654. BScrnOut()
  1655. ChangingMusic.Value = false
  1656. end
  1657. SideBar.Exit.MouseButton1Click:connect(function()
  1658. BtnClickAnim(SideBar.Exit)
  1659. if not ExitDisabled then
  1660. Fading = true
  1661. ExitDealership()
  1662. Fading = false
  1663. end
  1664. end)
  1665. SideBar.Exit.MouseEnter:connect(function()
  1666. if not ButtonHover and not ExitDisabled then
  1667. ButtonHover = true
  1668. SideBar.Exit.ImageColor3 = SideBar.Exit.HoverColor.Value
  1669. SideBar.Exit.down.ImageColor3 = SideBar.Exit.HoverColor.Value
  1670. SideBar.Exit.HoverLabel.Visible = true
  1671. SF.ButtonHover:Play()
  1672. elseif not ButtonHover then
  1673. ButtonHover = true
  1674. SideBar.Exit.ImageColor3 = SideBar.Exit.DisabledColorHover.Value
  1675. SideBar.Exit.down.ImageColor3 = SideBar.Exit.DisabledColorHover.Value
  1676. SideBar.Exit.HoverLabel.Visible = true
  1677. SF.ButtonHover:Play()
  1678. end
  1679. SideBar.Exit.MouseLeave:connect(function()
  1680. if not ExitDisabled then
  1681. SideBar.Exit.ImageColor3 = ExitColor
  1682. SideBar.Exit.down.ImageColor3 = ExitColor
  1683. SideBar.Exit.HoverLabel.Visible = false
  1684. ButtonHover = false
  1685. else
  1686. SideBar.Exit.ImageColor3 = SideBar.Exit.DisabledColor.Value
  1687. SideBar.Exit.down.ImageColor3 = SideBar.Exit.DisabledColor.Value
  1688. SideBar.Exit.HoverLabel.Visible = false
  1689. ButtonHover = false
  1690. end
  1691. end)
  1692. end)
  1693. local Title = ListFrameBack.Title
  1694. local SortChoices = {
  1695. Title.Sort.Parts,
  1696. Title.Sort.Speed,
  1697. Title.Sort.Price
  1698. }
  1699. local DirChoices = {
  1700. Title.Direction.Low,
  1701. Title.Direction.High
  1702. }
  1703. local SortOpen = false
  1704. local DirectionOpen = false
  1705. local Direction = 1
  1706. SideBar.List.MouseButton1Click:connect(function()
  1707. BtnClickAnim(SideBar.List)
  1708. if not ListOpen and not AnimationActive then
  1709. ListOpen = true
  1710. AnimationActive = true
  1711. ListFrameBack.Parent.Visible = true
  1712. SF.Swoosh.PlaybackSpeed = 1.3
  1713. SF.Swoosh:play()
  1714. ListFrameBack:TweenPosition(UDim2.new(-5.1, 0, 0, (DealershipGUI.MeasureMent.AbsoluteSize.Y - ListFrameBack.AbsoluteSize.Y) / 2), "In", "Sine", 0.3, false)
  1715. wait(0.3)
  1716. AnimationActive = false
  1717. SideBar.List.ImageColor3 = color
  1718. SideBar.List.down.ImageColor3 = color
  1719. SideBar.List.HoverLabel.Visible = false
  1720. ListHover = false
  1721. elseif not AnimationActive then
  1722. ListOpen = false
  1723. AnimationActive = true
  1724. SF.Swoosh.PlaybackSpeed = 1
  1725. SF.Swoosh:play()
  1726. ListFrameBack:TweenPosition(UDim2.new(-5.1, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y), "Out", "Sine", 0.5, false)
  1727. wait(0.5)
  1728. ListFrameBack.Parent.Visible = false
  1729. AnimationActive = false
  1730. end
  1731. end)
  1732. SideBar.List.MouseEnter:connect(function()
  1733. if not ListHover then
  1734. ListHover = true
  1735. SideBar.List.ImageColor3 = SideBar.List.HoverColor.Value
  1736. SideBar.List.down.ImageColor3 = SideBar.List.HoverColor.Value
  1737. SideBar.List.HoverLabel.Visible = true
  1738. SF.ButtonHover:Play()
  1739. end
  1740. SideBar.List.MouseLeave:connect(function()
  1741. SideBar.List.ImageColor3 = color
  1742. SideBar.List.down.ImageColor3 = color
  1743. SideBar.List.HoverLabel.Visible = false
  1744. ListHover = false
  1745. end)
  1746. end)
  1747. Title.Sort.MouseButton1Click:connect(function()
  1748. SF.ButtonClick2D:play()
  1749. if not SortOpen then
  1750. SortOpen = true
  1751. Title.Sort.BackgroundTransparency = 0.5
  1752. Title.Sort.BackgroundColor3 = Color3.fromRGB(40, 123, 205)
  1753. Title.Sort.BorderSizePixel = 2
  1754. Title.Sort.Arrow.Rotation = 180
  1755. for _, v in pairs(SortChoices) do
  1756. v.Visible = true
  1757. end
  1758. else
  1759. SortOpen = false
  1760. Title.Sort.BackgroundTransparency = 0
  1761. Title.Sort.BackgroundColor3 = Color3.fromRGB(50, 150, 255)
  1762. Title.Sort.BorderSizePixel = 0
  1763. Title.Sort.Arrow.Rotation = 0
  1764. for _, v in pairs(SortChoices) do
  1765. v.Visible = false
  1766. end
  1767. end
  1768. end)
  1769. Title.Sort.MouseEnter:connect(function()
  1770. SF.ButtonHover:play()
  1771. end)
  1772. for _, v in pairs(SortChoices) do
  1773. v.MouseButton1Click:connect(function()
  1774. SF.ButtonClick2D:play()
  1775. if v.Name == "Price" then
  1776. for _, a in pairs(ListFrameBack.VehicleList:GetChildren()) do
  1777. if a:IsA("Frame") then
  1778. a.LayoutOrder = a.P.Value * Direction
  1779. end
  1780. end
  1781. else
  1782. for _, a in pairs(ListFrameBack.VehicleList:GetChildren()) do
  1783. if a:IsA("Frame") then
  1784. a.LayoutOrder = game.ReplicatedStorage.VehicleInformation:FindFirstChild(a.Name):FindFirstChild(v.Name).Value * Direction
  1785. end
  1786. end
  1787. end
  1788. end)
  1789. v.MouseEnter:connect(function()
  1790. SF.ButtonHover:play()
  1791. end)
  1792. end
  1793. Title.Direction.MouseButton1Click:connect(function()
  1794. SF.ButtonClick2D:play()
  1795. if not DirectionOpen then
  1796. DirectionOpen = true
  1797. Title.Direction.BackgroundTransparency = 0.5
  1798. Title.Direction.BackgroundColor3 = Color3.fromRGB(40, 123, 205)
  1799. Title.Direction.BorderSizePixel = 2
  1800. Title.Direction.Arrow.Rotation = 180
  1801. for _, v in pairs(DirChoices) do
  1802. v.Visible = true
  1803. end
  1804. else
  1805. DirectionOpen = false
  1806. Title.Direction.BackgroundTransparency = 0
  1807. Title.Direction.BackgroundColor3 = Color3.fromRGB(50, 150, 255)
  1808. Title.Direction.BorderSizePixel = 0
  1809. Title.Direction.Arrow.Rotation = 0
  1810. for _, v in pairs(DirChoices) do
  1811. v.Visible = false
  1812. end
  1813. end
  1814. end)
  1815. Title.Direction.MouseEnter:connect(function()
  1816. SF.ButtonHover:play()
  1817. end)
  1818. for _, v in pairs(DirChoices) do
  1819. v.MouseButton1Click:connect(function()
  1820. SF.ButtonClick2D:play()
  1821. if Direction ~= v.Val.Value then
  1822. Direction = v.Val.Value
  1823. for _, a in pairs(ListFrameBack.VehicleList:GetChildren()) do
  1824. if a:IsA("Frame") then
  1825. a.LayoutOrder = a.LayoutOrder * -1
  1826. end
  1827. end
  1828. end
  1829. end)
  1830. v.MouseEnter:connect(function()
  1831. SF.ButtonHover:play()
  1832. end)
  1833. end
  1834. ListFrameBack.Hide.MouseButton1Click:connect(function()
  1835. SF.ButtonClick2D:play()
  1836. if not AnimationActive then
  1837. AnimationActive = true
  1838. ListOpen = false
  1839. SF.Swoosh.PlaybackSpeed = 1
  1840. SF.Swoosh:play()
  1841. ListFrameBack:TweenPosition(UDim2.new(-5.1, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y), "Out", "Sine", 0.5, false)
  1842. wait(0.5)
  1843. ListFrameBack.Parent.Visible = false
  1844. AnimationActive = false
  1845. end
  1846. end)
  1847. ListFrameBack.Hide.MouseEnter:connect(function()
  1848. SF.ButtonHover:play()
  1849. end)
  1850. local DHideFrame = DTbar.Stats.Holder.hide
  1851. local DTBarHidden = false
  1852. DHideFrame:WaitForChild("ClickBox").MouseButton1Click:connect(function()
  1853. if not AnimationActive and not DTBarDisabled then
  1854. AnimationActive = true
  1855. SF.ButtonClick2D:play()
  1856. if DTBarHidden then
  1857. DTBarHidden = false
  1858. DHideFrame.up.Visible = true
  1859. DHideFrame.down.Visible = false
  1860. DTbar.VehicleBar.Visible = true
  1861. DTbar:TweenPosition(UDim2.new(0, 0, 0, 0), "In", "Back", 0.3, false)
  1862. wait(0.3)
  1863. else
  1864. DTBarHidden = true
  1865. DHideFrame.up.Visible = false
  1866. DHideFrame.down.Visible = true
  1867. DTbar:TweenPosition(UDim2.new(0, 0, 0, -(DTbar.AbsoluteSize.Y - 4)), "Out", "Back", 0.3, false)
  1868. wait(0.2)
  1869. DTbar.VehicleBar.Visible = false
  1870. wait(0.1)
  1871. end
  1872. AnimationActive = false
  1873. end
  1874. end)
  1875. DTbar:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
  1876. if DTBarHidden then
  1877. DTbar.Position = UDim2.new(0, 0, 0, -(DTbar.AbsoluteSize.Y - 4))
  1878. end
  1879. end)
  1880. DealershipGUI.JoinGroup.Background.Frame.Button.MouseButton1Click:connect(function()
  1881. BtnClickAnim(DealershipGUI.JoinGroup.Background.Frame.Button)
  1882. if not AnimationActive then
  1883. AnimationActive = true
  1884. SF.Swoosh.PlaybackSpeed = 1
  1885. SF.Swoosh:play()
  1886. DealershipGUI.JoinGroup.Background:TweenPosition(UDim2.new(-3.5, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y), "Out", "Sine", 0.5, false)
  1887. wait(0.5)
  1888. DealershipGUI.JoinGroup.Visible = false
  1889. DealershipGUI.JoinGroup.Background.Frame.Button.ImageColor3 = color
  1890. AnimationActive = false
  1891. ButtonHover = false
  1892. G_Open = false
  1893. end
  1894. end)
  1895. DealershipGUI.JoinGroup.Background.Frame.Button.MouseEnter:connect(function()
  1896. if not ButtonHover then
  1897. ButtonHover = true
  1898. DealershipGUI.JoinGroup.Background.Frame.Button.ImageColor3 = DealershipGUI.JoinGroup.Background.Frame.Button.HoverColor.Value
  1899. DealershipGUI.JoinGroup.Background.Frame.Button.down.ImageColor3 = DealershipGUI.JoinGroup.Background.Frame.Button.HoverColor.Value
  1900. SF.ButtonHover:Play()
  1901. end
  1902. DealershipGUI.JoinGroup.Background.Frame.Button.MouseLeave:connect(function()
  1903. DealershipGUI.JoinGroup.Background.Frame.Button.ImageColor3 = color
  1904. DealershipGUI.JoinGroup.Background.Frame.Button.down.ImageColor3 = color
  1905. ButtonHover = false
  1906. end)
  1907. end)
  1908. CustBtn.MouseButton1Click:connect(function()
  1909. if not CustDisabled then
  1910. BtnClickAnim(CustBtn)
  1911. if not AnimationActive and not ScrollDebounce and GetCurrentCarValue() then
  1912. AnimationActive = true
  1913. local Folder = game.ReplicatedStorage.VehicleInformation:FindFirstChild(GetCurrentCarValue().Name)
  1914. local DefaultValue = Folder.StandardValue.Value
  1915. StandardValue = Folder.Value.Value
  1916. SF.Swoosh.PlaybackSpeed = 1
  1917. SF.Swoosh:play()
  1918. StatsBack:TweenPosition(UDim2.new(-4.1, 0, 0, 0), "Out", "Back", 0.5, false)
  1919. ListFrameBack:TweenPosition(UDim2.new(-5.1, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y), "Out", "Sine", 0.5, false)
  1920. ListOpen = false
  1921. Holder.Previous:TweenPosition(UDim2.new(0, 0, 1.2, 0), "Out", "Back", 0.5, false)
  1922. Holder.Next:TweenPosition(UDim2.new(0.82, 0, 1.2, 0), "Out", "Back", 0.5, false)
  1923. SideBar:TweenPosition(UDim2.new(1.25, 0, 1.08, 0), "Out", "Back", 0.5, false)
  1924. DTBarHidden = true
  1925. DTBarDisabled = true
  1926. DHideFrame.up.Visible = false
  1927. DHideFrame.down.Visible = true
  1928. DTbar:TweenPosition(UDim2.new(0, 0, 0, -(DTbar.AbsoluteSize.Y - 4)), "Out", "Back", 0.3, false)
  1929. wait(0.2)
  1930. DTbar.VehicleBar.Visible = false
  1931. wait(0.3)
  1932. ListFrameBack.Parent.Visible = false
  1933. DealershipGUI.CustomizeExit.Visible = true
  1934. DealershipGUI.Customize.Visible = true
  1935. CustBtn.ImageColor3 = Blue
  1936. ButtonHover = false
  1937. local CurrentValue = GetCurrentCarValue().Value.Value
  1938. if CurrentValue > StandardValue then
  1939. Holder.Value.Text = "Value: " .. Rounder:ConvertAccurate(CurrentValue)
  1940. Holder.Value.TextColor3 = color
  1941. Holder.DefaultValue.Text = "Default Value: " .. Rounder:ConvertAccurate(CurrentValue - (StandardValue - DefaultValue))
  1942. Holder.DefaultValue.TextColor3 = color
  1943. else
  1944. Holder.Value.Text = "Value: " .. Rounder:ConvertAccurate(StandardValue)
  1945. Holder.Value.TextColor3 = Color3.new(1, 1, 1)
  1946. Holder.DefaultValue.Text = "Default Value: " .. Rounder:ConvertAccurate(DefaultValue)
  1947. Holder.DefaultValue.TextColor3 = Color3.fromRGB(205, 205, 205)
  1948. end
  1949. Holder.TokenBonus.Text = "Token Bonus: + " .. Rounder:ConvertAccurate(StandardValue - DefaultValue)
  1950. GetCurrentCarValue():SetPrimaryPartCFrame(GarageModel.VehicleSpawn.CFrame)
  1951. Cam.CameraSubject = GarageModel.CameraFocus
  1952. Cam.CFrame = GarageModel.CameraFocus.CFrame
  1953. View = 5
  1954. SF.Swoosh.PlaybackSpeed = 1.2
  1955. SF.Swoosh:play()
  1956. DealershipGUI.CustomizeExit.Exit:TweenPosition(UDim2.new(-1.19, 0, 0.1, 0), "In", "Back", 0.3, false)
  1957. DealershipGUI.Customize.Background:TweenPosition(UDim2.new(0, 0, 0, 0), "In", "Back", 0.3, false)
  1958. DealershipGUI.Customize.ColorName:TweenPosition(UDim2.new(0, 0, 8.945, 0), "In", "Back", 0.3, false)
  1959. Holder.Value:TweenPosition(UDim2.new(-0.5, 0, -0.5, 0), "In", "Back", 0.3, false)
  1960. if 0 < LStats.Tokens.Value then
  1961. Holder.TokenBonus:TweenPosition(UDim2.new(-0.5, 0, -0.8, 0), "In", "Back", 0.3, false)
  1962. Holder.DefaultValue:TweenPosition(UDim2.new(-0.5, 0, -1.1, 0), "In", "Back", 0.3, false)
  1963. end
  1964. wait(0.3)
  1965. AnimationActive = false
  1966. end
  1967. end
  1968. end)
  1969. CustBtn.MouseEnter:connect(function()
  1970. local Color = CustBtn.ImageColor3
  1971. if not ButtonHover and not CustDisabled then
  1972. ButtonHover = true
  1973. CustBtn.ImageColor3 = CustBtn.HoverColor.Value
  1974. CustBtn.down.ImageColor3 = CustBtn.HoverColor.Value
  1975. SF.ButtonHover:Play()
  1976. end
  1977. CustBtn.MouseLeave:connect(function()
  1978. if not CustDisabled then
  1979. CustBtn.ImageColor3 = Color
  1980. CustBtn.down.ImageColor3 = Color
  1981. ButtonHover = false
  1982. end
  1983. end)
  1984. end)
  1985. CExit.MouseButton1Click:connect(function()
  1986. if not AnimationActive then
  1987. AnimationActive = true
  1988. BtnClickAnim(CExit)
  1989. SF.Swoosh.PlaybackSpeed = 1
  1990. SF.Swoosh:play()
  1991. CExit:TweenPosition(UDim2.new(0, 0, -1, 0), "Out", "Back", 0.5, false)
  1992. DealershipGUI.Customize.Background:TweenPosition(UDim2.new(-5, 0, 0, 0), "Out", "Back", 0.5, false)
  1993. DealershipGUI.Customize.ColorName:TweenPosition(UDim2.new(-5, 0, 8.945, 0), "Out", "Back", 0.5, false)
  1994. Holder.Value:TweenPosition(UDim2.new(-0.5, 0, 0.25, 0), "Out", "Back", 0.5, false)
  1995. Holder.TokenBonus:TweenPosition(UDim2.new(-0.5, 0, 0.25, 0), "Out", "Back", 0.5, false)
  1996. Holder.DefaultValue:TweenPosition(UDim2.new(-0.5, 0, 0.25, 0), "Out", "Back", 0.5, false)
  1997. wait(0.5)
  1998. DealershipGUI.CustomizeExit.Visible = false
  1999. DealershipGUI.Customize.Visible = false
  2000. CExit.ImageColor3 = Blue
  2001. CExit.HoverLabel.Visible = false
  2002. ButtonHover = false
  2003. GetCurrentCarValue():SetPrimaryPartCFrame(DealershipModel.VehicleSpawn.CFrame)
  2004. Cam.CameraSubject = DealershipModel.CameraFocus
  2005. Cam.CFrame = DealershipModel.CameraFocus.CFrame
  2006. View = 4
  2007. SF.Swoosh.PlaybackSpeed = 1.2
  2008. SF.Swoosh:play()
  2009. StatsBack:TweenPosition(UDim2.new(-0.1, 0, 0, 0), "In", "Back", 0.3, false)
  2010. SideBar:TweenPosition(UDim2.new(1, 0, 1.08, 0), "In", "Back", 0.3, false)
  2011. Holder.Previous:TweenPosition(UDim2.new(0, 0, 0, 0), "In", "Back", 0.3, false)
  2012. Holder.Next:TweenPosition(UDim2.new(0.82, 0, 0, 0), "In", "Back", 0.3, false)
  2013. SaveCustomizations()
  2014. wait(0.3)
  2015. DTBarDisabled = false
  2016. AnimationActive = false
  2017. end
  2018. end)
  2019. CExit.MouseEnter:connect(function()
  2020. local Color = CExit.ImageColor3
  2021. CExit.ImageColor3 = CExit.HoverColor.Value
  2022. CExit.down.ImageColor3 = CExit.HoverColor.Value
  2023. SF.ButtonHover:Play()
  2024. CExit.HoverLabel.Visible = true
  2025. CExit.MouseLeave:connect(function()
  2026. CExit.ImageColor3 = Color
  2027. CExit.down.ImageColor3 = Color
  2028. CExit.HoverLabel.Visible = false
  2029. end)
  2030. end)
  2031. local PaintPlaying = false
  2032. local MaterialPlaying = false
  2033. for _, ColorButton in pairs(CustScroll:GetChildren()) do
  2034. if ColorButton:IsA("ImageButton") then
  2035. ColorButton.MouseButton1Click:connect(function()
  2036. BtnClickAnim(ColorButton)
  2037. CustomizationChange = true
  2038. local InformationFolder = game.ReplicatedStorage.VehicleInformation:FindFirstChild(GetCurrentCarValue().Name)
  2039. local NormalValue = InformationFolder.StandardValue.Value
  2040. if not ColorButton:FindFirstChild("LockImage") or ColorButton:FindFirstChild("LockImage").Visible == false and InformationFolder then
  2041. local PAINT
  2042. for _, v in pairs(GetCurrentCarValue().Car.Body.Parts.Paint:GetChildren()) do
  2043. if v:IsA("BasePart") then
  2044. PAINT = v
  2045. break
  2046. end
  2047. end
  2048. if ColorButton:FindFirstChild("Name") and not MaterialPlaying then
  2049. MaterialPlaying = true
  2050. SF.Material:play()
  2051. if ColorButton.Name == "Regular" then
  2052. local PartColor = PAINT.BrickColor
  2053. if not ColorChanged then
  2054. PartColor = InformationFolder.BodyColor.Value
  2055. end
  2056. ChangeVehicleProps(GetCurrentCarValue(), PartColor, "Standard", "Standard", StandardValue, NormalValue, Color3.new(1, 1, 1))
  2057. elseif ColorButton.Name == "Metal" then
  2058. local PartColor = PAINT.BrickColor
  2059. if not ColorChanged then
  2060. PartColor = InformationFolder.BodyColor.Value
  2061. end
  2062. ChangeVehicleProps(GetCurrentCarValue(), PartColor, "Metal", 0, StandardValue, NormalValue, Color3.new(1, 1, 1))
  2063. elseif ColorButton.Name == "Neon" then
  2064. local PartColor = PAINT.BrickColor
  2065. if not ColorChanged then
  2066. PartColor = InformationFolder.BodyColor.Value
  2067. end
  2068. ChangeVehicleProps(GetCurrentCarValue(), PartColor, "Neon", 0, math.ceil(StandardValue + NormalValue * 0.25), math.ceil(NormalValue * 1.25), color)
  2069. elseif ColorButton.Name == "Silver" then
  2070. ChangeVehicleProps(GetCurrentCarValue(), BrickColor.new("Pearl"), "SmoothPlastic", 0.45, math.ceil(StandardValue + NormalValue * 0.5), math.ceil(NormalValue * 1.5), color)
  2071. ColorChanged = false
  2072. elseif ColorButton.Name == "Gold" then
  2073. ChangeVehicleProps(GetCurrentCarValue(), BrickColor.new("Bright yellow"), "SmoothPlastic", 0.6, math.ceil(StandardValue + NormalValue * 1), math.ceil(NormalValue * 2), color)
  2074. ColorChanged = false
  2075. elseif ColorButton.Name == "Platinum" then
  2076. ChangeVehicleProps(GetCurrentCarValue(), BrickColor.new("Institutional white"), "SmoothPlastic", 1, math.ceil(StandardValue + NormalValue * 2), math.ceil(NormalValue * 3), color)
  2077. ColorChanged = false
  2078. end
  2079. wait(0.5)
  2080. MaterialPlaying = false
  2081. elseif ColorButton:FindFirstChild("BrickColor") and not PaintPlaying then
  2082. PaintPlaying = true
  2083. ColorChanged = true
  2084. SF.Paint:play()
  2085. local Reflectance = PAINT.Reflectance
  2086. if Reflectance == 1 and ColorButton:FindFirstChild("BrickColor").Value ~= BrickColor.new("Institutional white") then
  2087. Reflectance = 0.8
  2088. elseif Reflectance > 0.79 and Reflectance < 0.81 and ColorButton:FindFirstChild("BrickColor").Value == BrickColor.new("Institutional white") then
  2089. Reflectance = 1
  2090. end
  2091. ChangeVehicleProps(GetCurrentCarValue(), ColorButton:FindFirstChild("BrickColor").Value, PAINT.Material, Reflectance)
  2092. wait(1)
  2093. for i = 0, 10 do
  2094. SF.Paint.Volume = SF.Paint.Volume - 0.15
  2095. wait()
  2096. end
  2097. SF.Paint:stop()
  2098. SF.Paint.Volume = 1.5
  2099. PaintPlaying = false
  2100. end
  2101. elseif ColorButton:FindFirstChild("LockImage").Visible == true then
  2102. if ColorButton.Name == "PremiumColor" then
  2103. MP:PromptPurchase(Plr, Gpasses[1])
  2104. elseif ColorButton.Name == "Neon" then
  2105. MP:PromptPurchase(Plr, Gpasses[3])
  2106. elseif ColorButton.Name == "Silver" then
  2107. MP:PromptPurchase(Plr, Gpasses[4])
  2108. elseif ColorButton.Name == "Gold" then
  2109. MP:PromptPurchase(Plr, Gpasses[9])
  2110. elseif ColorButton.Name == "Platinum" then
  2111. MP:PromptPurchase(Plr, Gpasses[10])
  2112. end
  2113. end
  2114. end)
  2115. ColorButton.MouseEnter:connect(function()
  2116. local Color = ColorButton.ImageColor3
  2117. if not ButtonHover then
  2118. ButtonHover = true
  2119. if ColorButton.Name == "Color" or ColorButton.Name == "PremiumColor" then
  2120. DealershipGUI.Customize.ColorName.Background.TextLabel.Text = ColorButton:FindFirstChild("BrickColor").Value.Name
  2121. else
  2122. DealershipGUI.Customize.ColorName.Background.TextLabel.Text = ColorButton:FindFirstChild("Name").Value
  2123. end
  2124. ColorButton.ImageColor3 = ColorButton.HoverColor.Value
  2125. ColorButton.down.ImageColor3 = ColorButton.HoverColor.Value
  2126. SF.ButtonHover:Play()
  2127. end
  2128. ColorButton.MouseLeave:connect(function()
  2129. ColorButton.ImageColor3 = Color
  2130. ColorButton.down.ImageColor3 = Color
  2131. DealershipGUI.Customize.ColorName.Background.TextLabel.Text = ""
  2132. ButtonHover = false
  2133. end)
  2134. end)
  2135. end
  2136. end
  2137. local Backg = SettingsGUI.Settings.Background
  2138. local DescBg = Backg.Description.Background
  2139. local ConfirmTransFrame = SettingsGUI.ConfirmTransfer.Background.Frame
  2140. local ConfirmQualityFrame = SettingsGUI.ConfirmQuality.Background.Frame
  2141. local SettingsFrame = Backg.ScrollingFrame
  2142. local CancelColor = ConfirmTransFrame.Cancel.ImageColor3
  2143. local CancelColorHover = ConfirmTransFrame.Cancel.HoverColor.Value
  2144. local ConfirmHover = ConfirmTransFrame.Confirm.HoverColor.Value
  2145. local SpawnBtns = {
  2146. SettingsFrame.Row1,
  2147. SettingsFrame.Row2,
  2148. SettingsFrame.Row3,
  2149. SettingsFrame.Row4,
  2150. SettingsFrame.Random
  2151. }
  2152. local MusicHover, QualityHover, SpeedHover, InvinHover, SusHover = false, false, false, false, false
  2153. local TransferEnabled, InvinUnlocked = false, false
  2154. local SpawnPoint = 5
  2155. local ActiveBtn = SettingsFrame.Random
  2156. function UpdateTransBtn(Val)
  2157. if Val <= Plr.Money.Value then
  2158. SettingsFrame.Transfer.ImageColor3 = SettingsFrame.Transfer.ActiveColor.Value
  2159. SettingsFrame.Transfer.down.ImageColor3 = SettingsFrame.Transfer.ActiveColor.Value
  2160. SettingsFrame.Requirement.Visible = false
  2161. TransferEnabled = true
  2162. else
  2163. SettingsFrame.Transfer.ImageColor3 = SettingsFrame.Transfer.LockedColor.Value
  2164. SettingsFrame.Transfer.down.ImageColor3 = SettingsFrame.Transfer.LockedColor.Value
  2165. SettingsFrame.Requirement.Visible = true
  2166. TransferEnabled = false
  2167. end
  2168. end
  2169. function UpdateTransferReqs()
  2170. if LStats.Tokens.Value == 0 then
  2171. SettingsFrame.Requirement.Text = "Requires 10B Money"
  2172. ConfirmTransFrame.Multiplier.Text = "- 1.5x vehicle value multiplier increasing the value of all the vehicles in the game"
  2173. UpdateTransBtn(10000000000)
  2174. elseif LStats.Tokens.Value == 1 then
  2175. SettingsFrame.Requirement.Text = "Requires 50B Money"
  2176. SettingsFrame.CurrentBonus.Text = "Current vehicle value multiplier: 1.5x"
  2177. ConfirmTransFrame.Multiplier.Text = "- 2x vehicle value multiplier"
  2178. ConfirmTransFrame.Multiplier.Size = UDim2.new(0.4, 0, 0.2, 0)
  2179. UpdateTransBtn(50000000000)
  2180. elseif LStats.Tokens.Value == 2 then
  2181. SettingsFrame.Requirement.Text = "Requires 250B Money"
  2182. SettingsFrame.CurrentBonus.Text = "Current vehicle value multiplier: 2x"
  2183. ConfirmTransFrame.Multiplier.Text = "- 2.5x vehicle value multiplier"
  2184. ConfirmTransFrame.Multiplier.Size = UDim2.new(0.4, 0, 0.2, 0)
  2185. UpdateTransBtn(250000000000)
  2186. elseif LStats.Tokens.Value == 3 then
  2187. SettingsFrame.Transfer.ImageColor3 = SettingsFrame.Transfer.LockedColor.Value
  2188. SettingsFrame.Transfer.down.ImageColor3 = SettingsFrame.Transfer.LockedColor.Value
  2189. SettingsFrame.CurrentBonus.Text = "Current vehicle value multiplier: 2.5x"
  2190. SettingsFrame.Requirement.Visible = false
  2191. TransferEnabled = false
  2192. end
  2193. end
  2194. Menu.Settings.MouseButton1Click:connect(function()
  2195. BtnClickAnim(Menu.Settings)
  2196. if not SettingsIsOpen and not AnimationActive then
  2197. AnimationActive = true
  2198. SettingsGUI.Settings.Visible = true
  2199. UpdateTransferReqs()
  2200. SF.Swoosh.PlaybackSpeed = 1.3
  2201. SF.Swoosh:play()
  2202. Backg:TweenPosition(UDim2.new(-3.5, 0, 0, (DealershipGUI.MeasureMent.AbsoluteSize.Y - Backg.AbsoluteSize.Y) / 2), "In", "Sine", 0.3, false)
  2203. wait(0.3)
  2204. SettingsIsOpen = true
  2205. AnimationActive = false
  2206. elseif not AnimationActive and not SettingsGUI.ConfirmTransfer.Visible then
  2207. SettingsIsOpen = false
  2208. AnimationActive = true
  2209. SF.Swoosh.PlaybackSpeed = 1
  2210. SF.Swoosh:play()
  2211. Backg:TweenPosition(UDim2.new(-3.5, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y), "Out", "Sine", 0.5, false)
  2212. wait(0.5)
  2213. SettingsGUI.Settings.Visible = false
  2214. AnimationActive = false
  2215. end
  2216. end)
  2217. Menu.Settings.MouseEnter:connect(function()
  2218. if not ButtonHover then
  2219. ButtonHover = true
  2220. Menu.Settings.ImageColor3 = Menu.Settings.HoverColor.Value
  2221. Menu.Settings.down.ImageColor3 = Menu.Settings.HoverColor.Value
  2222. SF.ButtonHover:Play()
  2223. end
  2224. Menu.Settings.MouseLeave:connect(function()
  2225. Menu.Settings.ImageColor3 = color
  2226. Menu.Settings.down.ImageColor3 = color
  2227. ButtonHover = false
  2228. end)
  2229. end)
  2230. Backg:WaitForChild("Hide").MouseButton1Click:connect(function()
  2231. if not AnimationActive and SettingsIsOpen then
  2232. SettingsIsOpen = false
  2233. AnimationActive = true
  2234. SF.ButtonClick2D:play()
  2235. SF.Swoosh.PlaybackSpeed = 1
  2236. SF.Swoosh:Play()
  2237. Backg:TweenPosition(UDim2.new(-3.5, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y), "Out", "Sine", 0.5, false)
  2238. wait(0.5)
  2239. SettingsGUI.Settings.Visible = false
  2240. AnimationActive = false
  2241. end
  2242. end)
  2243. Backg:WaitForChild("Hide").MouseEnter:connect(function()
  2244. SF.ButtonHover:Play()
  2245. end)
  2246. if MP:PlayerOwnsAsset(Plr, 384451107) or MP:PlayerOwnsAsset(Plr, Gpasses[6]) then
  2247. InvinUnlocked = true
  2248. if Settings.Invincibility.Value then
  2249. SettingsFrame.Invincibility.ImageColor3 = color
  2250. SettingsFrame.Invincibility.down.ImageColor3 = color
  2251. SettingsFrame.Invincibility.TextLabel.Text = "ON"
  2252. rF.ChangeSetting:InvokeServer(1, true)
  2253. end
  2254. end
  2255. if Settings.MusicDisabled.Value then
  2256. SettingsFrame.Music.ImageColor3 = SettingsFrame.Music.DisabledColor.Value
  2257. SettingsFrame.Music.down.ImageColor3 = SettingsFrame.Music.DisabledColor.Value
  2258. SettingsFrame.Music.TextLabel.Text = "OFF"
  2259. end
  2260. if not Settings.SusDisabled.Value then
  2261. SettingsFrame.Suspension.ImageColor3 = color
  2262. SettingsFrame.Suspension.down.ImageColor3 = color
  2263. SettingsFrame.Suspension.TextLabel.Text = "Enabled"
  2264. end
  2265. if Settings.SpeedUnit.Value == 2 then
  2266. SettingsFrame.Speed.ImageColor3 = SettingsFrame.Speed.KPHColor.Value
  2267. SettingsFrame.Speed.down.ImageColor3 = SettingsFrame.Speed.KPHColor.Value
  2268. SettingsFrame.Speed.TextLabel.Text = "KM/H"
  2269. end
  2270. if Settings.Quality.Value == 1 then
  2271. SettingsFrame.Quality.ImageColor3 = SettingsFrame.Quality.LowColor.Value
  2272. SettingsFrame.Quality.down.ImageColor3 = SettingsFrame.Quality.LowColor.Value
  2273. SettingsFrame.Quality.TextLabel.Text = "Lowered"
  2274. end
  2275. SettingsFrame.Music.MouseButton1Click:connect(function()
  2276. BtnClickAnim(SettingsFrame.Music)
  2277. if not Settings.MusicDisabled.Value then
  2278. if MusicHover then
  2279. SettingsFrame.Music.ImageColor3 = SettingsFrame.Music.DisabledColorHover.Value
  2280. SettingsFrame.Music.down.ImageColor3 = SettingsFrame.Music.DisabledColorHover.Value
  2281. else
  2282. SettingsFrame.Music.ImageColor3 = SettingsFrame.Music.DisabledColor.Value
  2283. SettingsFrame.Music.down.ImageColor3 = SettingsFrame.Music.DisabledColor.Value
  2284. end
  2285. local CurrentSong = Music.Value
  2286. Music.Value = 0
  2287. SettingsFrame.Music.TextLabel.Text = "OFF"
  2288. DescBg.Text1.Text = "Enable game music"
  2289. rF.ChangeSetting:InvokeServer(3, true)
  2290. Music.Value = CurrentSong
  2291. else
  2292. if MusicHover then
  2293. SettingsFrame.Music.ImageColor3 = SettingsFrame.Music.EnabledColorHover.Value
  2294. SettingsFrame.Music.down.ImageColor3 = SettingsFrame.Music.EnabledColorHover.Value
  2295. else
  2296. SettingsFrame.Music.ImageColor3 = color
  2297. SettingsFrame.Music.down.ImageColor3 = color
  2298. end
  2299. local CurrentSong = Music.Value
  2300. Music.Value = 4
  2301. SettingsFrame.Music.TextLabel.Text = "ON"
  2302. DescBg.Text1.Text = "Disable game music"
  2303. rF.ChangeSetting:InvokeServer(3, false)
  2304. ChangingMusic.Value = true
  2305. Music.Value = CurrentSong
  2306. wait(0.3)
  2307. ChangingMusic.Value = false
  2308. end
  2309. end)
  2310. SettingsFrame.Music.MouseEnter:connect(function()
  2311. if Settings.MusicDisabled.Value then
  2312. SettingsFrame.Music.ImageColor3 = SettingsFrame.Music.DisabledColorHover.Value
  2313. SettingsFrame.Music.down.ImageColor3 = SettingsFrame.Music.DisabledColorHover.Value
  2314. DescBg.Text1.Text = "Enable game music"
  2315. else
  2316. SettingsFrame.Music.ImageColor3 = SettingsFrame.Music.EnabledColorHover.Value
  2317. SettingsFrame.Music.down.ImageColor3 = SettingsFrame.Music.EnabledColorHover.Value
  2318. DescBg.Text1.Text = "Disable game music"
  2319. end
  2320. DescBg.Text2.Text = ""
  2321. if not MusicHover then
  2322. MusicHover = true
  2323. SF.ButtonHover:Play()
  2324. end
  2325. SettingsFrame.Music.MouseLeave:connect(function()
  2326. if Settings.MusicDisabled.Value then
  2327. SettingsFrame.Music.ImageColor3 = SettingsFrame.Music.DisabledColor.Value
  2328. SettingsFrame.Music.down.ImageColor3 = SettingsFrame.Music.DisabledColor.Value
  2329. else
  2330. SettingsFrame.Music.ImageColor3 = color
  2331. SettingsFrame.Music.down.ImageColor3 = color
  2332. end
  2333. DescBg.Text1.Text = ""
  2334. MusicHover = false
  2335. end)
  2336. end)
  2337. SettingsFrame.Quality.MouseButton1Click:connect(function()
  2338. BtnClickAnim(SettingsFrame.Quality)
  2339. if Settings.Quality.Value == 2 then
  2340. if QualityHover then
  2341. SettingsFrame.Quality.ImageColor3 = SettingsFrame.Quality.LowColorHover.Value
  2342. SettingsFrame.Quality.down.ImageColor3 = SettingsFrame.Quality.LowColorHover.Value
  2343. else
  2344. SettingsFrame.Quality.ImageColor3 = SettingsFrame.Quality.LowColor.Value
  2345. SettingsFrame.Quality.down.ImageColor3 = SettingsFrame.Quality.LowColor.Value
  2346. end
  2347. SettingsFrame.Quality.TextLabel.Text = "Lowered"
  2348. DescBg.Text2.Text = "Lowered quality: Parts will break directly instead of falling off most of the time (Less lag)"
  2349. rF.ChangeSetting:InvokeServer(2, 1)
  2350. elseif not MobileUser then
  2351. if QualityHover then
  2352. SettingsFrame.Quality.ImageColor3 = SettingsFrame.Quality.HighColorHover.Value
  2353. SettingsFrame.Quality.down.ImageColor3 = SettingsFrame.Quality.HighColorHover.Value
  2354. else
  2355. SettingsFrame.Quality.ImageColor3 = color
  2356. SettingsFrame.Quality.down.ImageColor3 = color
  2357. end
  2358. SettingsFrame.Quality.TextLabel.Text = "High"
  2359. DescBg.Text2.Text = "High quality: Many parts will fall off the vehicle instead of getting destroyed instantly (More lag)"
  2360. rF.ChangeSetting:InvokeServer(2, 2)
  2361. else
  2362. AnimationActive = true
  2363. SF.Swoosh.PlaybackSpeed = 1.3
  2364. SF.Swoosh:play()
  2365. SettingsGUI.ConfirmQuality.Visible = true
  2366. SettingsGUI.ConfirmQuality.Background:TweenPosition(UDim2.new(-3.5, 0, 0, (DealershipGUI.MeasureMent.AbsoluteSize.Y - SettingsGUI.ConfirmTransfer.Background.AbsoluteSize.Y) / 2), "In", "Sine", 0.3, false)
  2367. wait(0.3)
  2368. AnimationActive = false
  2369. end
  2370. end)
  2371. SettingsFrame.Quality.MouseEnter:connect(function()
  2372. if Settings.Quality.Value == 1 then
  2373. SettingsFrame.Quality.ImageColor3 = SettingsFrame.Quality.LowColorHover.Value
  2374. SettingsFrame.Quality.down.ImageColor3 = SettingsFrame.Quality.LowColorHover.Value
  2375. DescBg.Text2.Text = "Lowered quality: Parts will break directly instead of falling off most of the time (Less lag)"
  2376. else
  2377. SettingsFrame.Quality.ImageColor3 = SettingsFrame.Quality.HighColorHover.Value
  2378. SettingsFrame.Quality.down.ImageColor3 = SettingsFrame.Quality.HighColorHover.Value
  2379. DescBg.Text2.Text = "High quality: Many parts will fall off the vehicle instead of getting destroyed instantly (More lag)"
  2380. end
  2381. DescBg.Text1.Text = ""
  2382. if not QualityHover then
  2383. QualityHover = true
  2384. SF.ButtonHover:Play()
  2385. end
  2386. SettingsFrame.Quality.MouseLeave:connect(function()
  2387. if Settings.Quality.Value == 1 then
  2388. SettingsFrame.Quality.ImageColor3 = SettingsFrame.Quality.LowColor.Value
  2389. SettingsFrame.Quality.down.ImageColor3 = SettingsFrame.Quality.LowColor.Value
  2390. else
  2391. SettingsFrame.Quality.ImageColor3 = color
  2392. SettingsFrame.Quality.down.ImageColor3 = color
  2393. end
  2394. DescBg.Text2.Text = ""
  2395. QualityHover = false
  2396. end)
  2397. end)
  2398. ConfirmQualityFrame.Confirm.MouseButton1Click:connect(function()
  2399. BtnClickAnim(ConfirmQualityFrame.Confirm)
  2400. if not AnimationActive then
  2401. AnimationActive = true
  2402. SF.Swoosh.PlaybackSpeed = 1
  2403. SF.Swoosh:Play()
  2404. SettingsGUI.ConfirmQuality.Background:TweenPosition(UDim2.new(-3.5, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y), "Out", "Sine", 0.5, false)
  2405. SettingsFrame.Quality.ImageColor3 = color
  2406. SettingsFrame.Quality.down.ImageColor3 = color
  2407. SettingsFrame.Quality.TextLabel.Text = "High"
  2408. rF.ChangeSetting:InvokeServer(2, 2)
  2409. wait(0.5)
  2410. SettingsGUI.ConfirmQuality.Visible = false
  2411. ConfirmQualityFrame.Confirm.ImageColor3 = color
  2412. AnimationActive = false
  2413. end
  2414. end)
  2415. ConfirmQualityFrame.Confirm.MouseEnter:connect(function()
  2416. if not ButtonHover then
  2417. ButtonHover = true
  2418. ConfirmQualityFrame.Confirm.ImageColor3 = ConfirmQualityFrame.Confirm.HoverColor.Value
  2419. ConfirmQualityFrame.Confirm.down.ImageColor3 = ConfirmQualityFrame.Confirm.HoverColor.Value
  2420. SF.ButtonHover:Play()
  2421. end
  2422. ConfirmQualityFrame.Confirm.MouseLeave:connect(function()
  2423. ConfirmQualityFrame.Confirm.ImageColor3 = color
  2424. ConfirmQualityFrame.Confirm.down.ImageColor3 = color
  2425. ButtonHover = false
  2426. end)
  2427. end)
  2428. ConfirmQualityFrame.Cancel.MouseButton1Click:connect(function()
  2429. if not AnimationActive then
  2430. AnimationActive = true
  2431. BtnClickAnim(ConfirmQualityFrame.Cancel)
  2432. SF.Swoosh.PlaybackSpeed = 1
  2433. SF.Swoosh:Play()
  2434. SettingsGUI.ConfirmQuality.Background:TweenPosition(UDim2.new(-3.5, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y), "Out", "Sine", 0.5, false)
  2435. wait(0.5)
  2436. SettingsGUI.ConfirmQuality.Visible = false
  2437. ConfirmQualityFrame.Cancel.ImageColor3 = CancelColor
  2438. AnimationActive = false
  2439. end
  2440. end)
  2441. ConfirmQualityFrame.Cancel.MouseEnter:connect(function()
  2442. if not ButtonHover then
  2443. ButtonHover = true
  2444. ConfirmQualityFrame.Cancel.ImageColor3 = ConfirmQualityFrame.Cancel.HoverColor.Value
  2445. ConfirmQualityFrame.Cancel.down.ImageColor3 = ConfirmQualityFrame.Cancel.HoverColor.Value
  2446. SF.ButtonHover:Play()
  2447. end
  2448. ConfirmQualityFrame.Cancel.MouseLeave:connect(function()
  2449. ConfirmQualityFrame.Cancel.ImageColor3 = CancelColor
  2450. ConfirmQualityFrame.Cancel.down.ImageColor3 = CancelColor
  2451. ButtonHover = false
  2452. end)
  2453. end)
  2454. SettingsFrame.Speed.MouseButton1Click:connect(function()
  2455. BtnClickAnim(SettingsFrame.Speed)
  2456. if Settings.SpeedUnit.Value == 1 then
  2457. if SpeedHover then
  2458. SettingsFrame.Speed.ImageColor3 = SettingsFrame.Speed.KPHColorHover.Value
  2459. SettingsFrame.Speed.down.ImageColor3 = SettingsFrame.Speed.KPHColorHover.Value
  2460. else
  2461. SettingsFrame.Speed.ImageColor3 = SettingsFrame.Speed.KPHColor.Value
  2462. SettingsFrame.Speed.down.ImageColor3 = SettingsFrame.Speed.KPHColor.Value
  2463. end
  2464. SettingsFrame.Speed.TextLabel.Text = "KM/H"
  2465. DescBg.Text1.Text = "Set the speed unit on gauges and stats to MPH"
  2466. rF.ChangeSetting:InvokeServer(4, 2)
  2467. else
  2468. if SpeedHover then
  2469. SettingsFrame.Speed.ImageColor3 = SettingsFrame.Speed.MPHColorHover.Value
  2470. SettingsFrame.Speed.down.ImageColor3 = SettingsFrame.Speed.MPHColorHover.Value
  2471. else
  2472. SettingsFrame.Speed.ImageColor3 = Blue
  2473. SettingsFrame.Speed.down.ImageColor3 = Blue
  2474. end
  2475. SettingsFrame.Speed.TextLabel.Text = "MPH"
  2476. DescBg.Text1.Text = "Set the speed unit on gauges and stats to KM/H"
  2477. rF.ChangeSetting:InvokeServer(4, 1)
  2478. end
  2479. end)
  2480. SettingsFrame.Speed.MouseEnter:connect(function()
  2481. if Settings.SpeedUnit.Value == 2 then
  2482. SettingsFrame.Speed.ImageColor3 = SettingsFrame.Speed.KPHColorHover.Value
  2483. SettingsFrame.Speed.down.ImageColor3 = SettingsFrame.Speed.KPHColorHover.Value
  2484. DescBg.Text1.Text = "Set the speed unit on gauges and stats to MPH"
  2485. else
  2486. SettingsFrame.Speed.ImageColor3 = SettingsFrame.Speed.MPHColorHover.Value
  2487. SettingsFrame.Speed.down.ImageColor3 = SettingsFrame.Speed.MPHColorHover.Value
  2488. DescBg.Text1.Text = "Set the speed unit on gauges and stats to KM/H"
  2489. end
  2490. DescBg.Text2.Text = ""
  2491. if not SpeedHover then
  2492. SpeedHover = true
  2493. SF.ButtonHover:Play()
  2494. end
  2495. SettingsFrame.Speed.MouseLeave:connect(function()
  2496. if Settings.SpeedUnit.Value == 2 then
  2497. SettingsFrame.Speed.ImageColor3 = SettingsFrame.Speed.KPHColor.Value
  2498. SettingsFrame.Speed.down.ImageColor3 = SettingsFrame.Speed.KPHColor.Value
  2499. else
  2500. SettingsFrame.Speed.ImageColor3 = Blue
  2501. SettingsFrame.Speed.down.ImageColor3 = Blue
  2502. end
  2503. DescBg.Text1.Text = ""
  2504. SpeedHover = false
  2505. end)
  2506. end)
  2507. SettingsFrame.Invincibility.MouseButton1Click:connect(function()
  2508. BtnClickAnim(SettingsFrame.Invincibility)
  2509. if InvinUnlocked then
  2510. if not Settings.Invincibility.Value then
  2511. if InvinHover then
  2512. SettingsFrame.Invincibility.ImageColor3 = SettingsFrame.Invincibility.EnabledColorHover.Value
  2513. SettingsFrame.Invincibility.down.ImageColor3 = SettingsFrame.Invincibility.EnabledColorHover.Value
  2514. else
  2515. SettingsFrame.Invincibility.ImageColor3 = color
  2516. SettingsFrame.Invincibility.down.ImageColor3 = color
  2517. end
  2518. rF.ChangeSetting:InvokeServer(1, true)
  2519. rF.ChangeSetting:InvokeServer(5, true)
  2520. SettingsFrame.Invincibility.TextLabel.Text = "ON"
  2521. DescBg.Text1.Text = "Disable character invincibility"
  2522. else
  2523. if InvinHover then
  2524. SettingsFrame.Invincibility.ImageColor3 = SettingsFrame.Invincibility.DisabledColorHover.Value
  2525. SettingsFrame.Invincibility.down.ImageColor3 = SettingsFrame.Invincibility.DisabledColorHover.Value
  2526. else
  2527. SettingsFrame.Invincibility.ImageColor3 = Color3.fromRGB(150, 150, 150)
  2528. SettingsFrame.Invincibility.down.ImageColor3 = Color3.fromRGB(150, 150, 150)
  2529. end
  2530. rF.ChangeSetting:InvokeServer(1, false)
  2531. rF.ChangeSetting:InvokeServer(5, false)
  2532. SettingsFrame.Invincibility.TextLabel.Text = "OFF"
  2533. DescBg.Text1.Text = "Enable character invincibility"
  2534. end
  2535. end
  2536. end)
  2537. SettingsFrame.Invincibility.MouseEnter:connect(function()
  2538. if Settings.Invincibility.Value and InvinUnlocked then
  2539. SettingsFrame.Invincibility.ImageColor3 = SettingsFrame.Invincibility.EnabledColorHover.Value
  2540. SettingsFrame.Invincibility.down.ImageColor3 = SettingsFrame.Invincibility.EnabledColorHover.Value
  2541. DescBg.Text1.Text = "Disable character invincibility"
  2542. else
  2543. SettingsFrame.Invincibility.ImageColor3 = SettingsFrame.Invincibility.DisabledColorHover.Value
  2544. SettingsFrame.Invincibility.down.ImageColor3 = SettingsFrame.Invincibility.DisabledColorHover.Value
  2545. if InvinUnlocked then
  2546. DescBg.Text1.Text = "Enable character invincibility"
  2547. else
  2548. DescBg.Text1.Text = "[Requires Super Human gamepass to enable]"
  2549. end
  2550. end
  2551. DescBg.Text2.Text = ""
  2552. if not InvinHover then
  2553. InvinHover = true
  2554. SF.ButtonHover:Play()
  2555. end
  2556. SettingsFrame.Invincibility.MouseLeave:connect(function()
  2557. if Settings.Invincibility.Value and InvinUnlocked then
  2558. SettingsFrame.Invincibility.ImageColor3 = color
  2559. SettingsFrame.Invincibility.down.ImageColor3 = color
  2560. else
  2561. SettingsFrame.Invincibility.ImageColor3 = Color3.fromRGB(150, 150, 150)
  2562. SettingsFrame.Invincibility.down.ImageColor3 = Color3.fromRGB(150, 150, 150)
  2563. end
  2564. DescBg.Text1.Text = ""
  2565. InvinHover = false
  2566. end)
  2567. end)
  2568. SettingsFrame.Suspension.MouseButton1Click:connect(function()
  2569. BtnClickAnim(SettingsFrame.Suspension)
  2570. if not Settings.SusDisabled.Value then
  2571. if SusHover then
  2572. SettingsFrame.Suspension.ImageColor3 = SettingsFrame.Suspension.DisabledColorHover.Value
  2573. SettingsFrame.Suspension.down.ImageColor3 = SettingsFrame.Suspension.DisabledColorHover.Value
  2574. else
  2575. SettingsFrame.Suspension.ImageColor3 = Color3.fromRGB(150, 150, 150)
  2576. SettingsFrame.Suspension.down.ImageColor3 = Color3.fromRGB(150, 150, 150)
  2577. end
  2578. SettingsFrame.Suspension.TextLabel.Text = "Disabled"
  2579. DescBg.Text2.Text = "Enable vehicle suspension (Slightly increases lag and reduces vehicle stability)"
  2580. rF.ChangeSetting:InvokeServer(7, true)
  2581. else
  2582. if SusHover then
  2583. SettingsFrame.Suspension.ImageColor3 = SettingsFrame.Suspension.EnabledColorHover.Value
  2584. SettingsFrame.Suspension.down.ImageColor3 = SettingsFrame.Suspension.EnabledColorHover.Value
  2585. else
  2586. SettingsFrame.Suspension.ImageColor3 = color
  2587. SettingsFrame.Suspension.down.ImageColor3 = color
  2588. end
  2589. SettingsFrame.Suspension.TextLabel.Text = "Enabled"
  2590. DescBg.Text2.Text = "Disable vehicle suspension (Recommended when only crushing vehicles)"
  2591. rF.ChangeSetting:InvokeServer(7, false)
  2592. end
  2593. end)
  2594. SettingsFrame.Suspension.MouseEnter:connect(function()
  2595. if Settings.SusDisabled.Value then
  2596. SettingsFrame.Suspension.ImageColor3 = SettingsFrame.Suspension.DisabledColorHover.Value
  2597. SettingsFrame.Suspension.down.ImageColor3 = SettingsFrame.Suspension.DisabledColorHover.Value
  2598. DescBg.Text2.Text = "Enable vehicle suspension (Slightly increases lag and reduces vehicle stability)"
  2599. else
  2600. SettingsFrame.Suspension.ImageColor3 = SettingsFrame.Suspension.EnabledColorHover.Value
  2601. SettingsFrame.Suspension.down.ImageColor3 = SettingsFrame.Suspension.EnabledColorHover.Value
  2602. DescBg.Text2.Text = "Disable vehicle suspension (Recommended when only crushing vehicles)"
  2603. end
  2604. DescBg.Text1.Text = ""
  2605. if not SusHover then
  2606. SusHover = true
  2607. SF.ButtonHover:Play()
  2608. end
  2609. SettingsFrame.Suspension.MouseLeave:connect(function()
  2610. if Settings.SusDisabled.Value then
  2611. SettingsFrame.Suspension.ImageColor3 = Color3.fromRGB(150, 150, 150)
  2612. SettingsFrame.Suspension.down.ImageColor3 = Color3.fromRGB(150, 150, 150)
  2613. else
  2614. SettingsFrame.Suspension.ImageColor3 = color
  2615. SettingsFrame.Suspension.down.ImageColor3 = color
  2616. end
  2617. DescBg.Text2.Text = ""
  2618. SusHover = false
  2619. end)
  2620. end)
  2621. for i, v in pairs(SpawnBtns) do
  2622. v.MouseButton1Click:connect(function()
  2623. BtnClickAnim(v)
  2624. if ActiveBtn ~= v then
  2625. v.ImageColor3 = color
  2626. v.down.ImageColor3 = color
  2627. ActiveBtn.ImageColor3 = CancelColor
  2628. ActiveBtn.down.ImageColor3 = CancelColor
  2629. ActiveBtn = v
  2630. rF.ChangeSetting:InvokeServer(6, i)
  2631. end
  2632. end)
  2633. v.MouseEnter:connect(function()
  2634. if ActiveBtn ~= v then
  2635. v.ImageColor3 = CancelColorHover
  2636. v.down.ImageColor3 = CancelColorHover
  2637. else
  2638. v.ImageColor3 = ConfirmHover
  2639. v.down.ImageColor3 = ConfirmHover
  2640. end
  2641. DescBg.Text1.Text = "Change vehicle spawnpoint to " .. v.TextLabel.Text
  2642. DescBg.Text2.Text = ""
  2643. if not ButtonHover then
  2644. ButtonHover = true
  2645. SF.ButtonHover:Play()
  2646. end
  2647. v.MouseLeave:connect(function()
  2648. if ActiveBtn ~= v then
  2649. v.ImageColor3 = CancelColor
  2650. v.down.ImageColor3 = CancelColor
  2651. else
  2652. v.ImageColor3 = color
  2653. v.down.ImageColor3 = color
  2654. end
  2655. DescBg.Text1.Text = ""
  2656. ButtonHover = false
  2657. end)
  2658. end)
  2659. if Settings.Spawnpoint.Value == i and ActiveBtn ~= v then
  2660. v.ImageColor3 = color
  2661. v.down.ImageColor3 = color
  2662. ActiveBtn.ImageColor3 = CancelColor
  2663. ActiveBtn.down.ImageColor3 = CancelColor
  2664. ActiveBtn = v
  2665. end
  2666. end
  2667. SettingsFrame.Transfer.MouseButton1Click:connect(function()
  2668. if TransferEnabled then
  2669. BtnClickAnim(SettingsFrame.Transfer)
  2670. if not AnimationActive then
  2671. AnimationActive = true
  2672. SF.Swoosh.PlaybackSpeed = 1
  2673. SF.Swoosh:play()
  2674. Backg:TweenPosition(UDim2.new(-3.5, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y), "Out", "Sine", 0.5, false)
  2675. wait(0.5)
  2676. SettingsGUI.Settings.Visible = false
  2677. ButtonHover = false
  2678. wait(0.2)
  2679. SF.Swoosh.PlaybackSpeed = 1.3
  2680. SF.Swoosh:play()
  2681. SettingsGUI.ConfirmTransfer.Visible = true
  2682. SettingsGUI.ConfirmTransfer.Background:TweenPosition(UDim2.new(-3.5, 0, 0, (DealershipGUI.MeasureMent.AbsoluteSize.Y - SettingsGUI.ConfirmTransfer.Background.AbsoluteSize.Y) / 2), "In", "Sine", 0.3, false)
  2683. wait(0.3)
  2684. AnimationActive = false
  2685. end
  2686. end
  2687. end)
  2688. SettingsFrame.Transfer.MouseEnter:connect(function()
  2689. local Color = SettingsFrame.Transfer.ActiveColor.Value
  2690. if not ButtonHover and TransferEnabled then
  2691. ButtonHover = true
  2692. SettingsFrame.Transfer.ImageColor3 = SettingsFrame.Transfer.ActiveColorHover.Value
  2693. SettingsFrame.Transfer.down.ImageColor3 = SettingsFrame.Transfer.ActiveColorHover.Value
  2694. SF.ButtonHover:Play()
  2695. end
  2696. SettingsFrame.Transfer.MouseLeave:connect(function()
  2697. if TransferEnabled then
  2698. SettingsFrame.Transfer.ImageColor3 = Color
  2699. SettingsFrame.Transfer.down.ImageColor3 = Color
  2700. ButtonHover = false
  2701. end
  2702. end)
  2703. end)
  2704. ConfirmTransFrame.Confirm.MouseButton1Click:connect(function()
  2705. BtnClickAnim(ConfirmTransFrame.Confirm)
  2706. if not AnimationActive then
  2707. AnimationActive = true
  2708. SF.Swoosh.PlaybackSpeed = 1
  2709. SF.Swoosh:Play()
  2710. SF.Purchase:play()
  2711. SettingsGUI.ConfirmTransfer.Background:TweenPosition(UDim2.new(-3.5, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y), "Out", "Sine", 0.5, false)
  2712. if VehicleMenu.Menu.Visible == true or OpenVM then
  2713. VehicleMenu.Menu.Background:TweenPosition(VMenuPos2, "Out", "Back", 0.3, false)
  2714. delay(0.1, function()
  2715. InUseCar = nil
  2716. Seat = nil
  2717. VehicleCopy = nil
  2718. if not OpenVM then
  2719. Cam.CameraSubject = Plr.Character.Humanoid
  2720. Cam.CameraType = "Custom"
  2721. Plr.CameraMaxZoomDistance = 250
  2722. end
  2723. View = 1
  2724. OpenVM = false
  2725. end)
  2726. end
  2727. delay(0.3, function()
  2728. VehicleMenu.Menu.Visible = false
  2729. end)
  2730. rF.Transfer:InvokeServer()
  2731. CustomDataCache = nil
  2732. for _, v in pairs(VehicleFrames) do
  2733. if game.ReplicatedStorage.VehicleInformation:FindFirstChild(v.Name) and v.Color.P.Text ~= "FREE" then
  2734. if game.ReplicatedStorage.VehicleInformation:FindFirstChild(v.Name).VipOnly.Value == true then
  2735. v.Color.BackgroundColor3 = Color3.fromRGB(72, 43, 190)
  2736. elseif game.ReplicatedStorage.VehicleInformation:FindFirstChild(v.Name).GroupOnly.Value == true then
  2737. v.Color.BackgroundColor3 = Color3.fromRGB(37, 114, 190)
  2738. else
  2739. v.Color.BackgroundColor3 = Color3.fromRGB(63, 120, 55)
  2740. end
  2741. end
  2742. end
  2743. GiveUnlockedVehicles()
  2744. CheckBestVehicle()
  2745. Previous = 0
  2746. Progress.Label.Text = "Next Vehicle: " .. Rounder:ConvertAccurate(Target)
  2747. UpdateProgress()
  2748. MultiplyValues()
  2749. if Dealing then
  2750. UpdateRequirements(GetCurrentCarValue().Name)
  2751. end
  2752. wait(0.5)
  2753. SettingsGUI.ConfirmTransfer.Visible = false
  2754. ConfirmTransFrame.Confirm.ImageColor3 = color
  2755. ButtonHover = false
  2756. AnimationActive = false
  2757. SettingsIsOpen = false
  2758. end
  2759. end)
  2760. ConfirmTransFrame.Confirm.MouseEnter:connect(function()
  2761. if not ButtonHover then
  2762. ButtonHover = true
  2763. ConfirmTransFrame.Confirm.ImageColor3 = ConfirmTransFrame.Confirm.HoverColor.Value
  2764. ConfirmTransFrame.Confirm.down.ImageColor3 = ConfirmTransFrame.Confirm.HoverColor.Value
  2765. SF.ButtonHover:Play()
  2766. end
  2767. ConfirmTransFrame.Confirm.MouseLeave:connect(function()
  2768. ConfirmTransFrame.Confirm.ImageColor3 = color
  2769. ConfirmTransFrame.Confirm.down.ImageColor3 = color
  2770. ButtonHover = false
  2771. end)
  2772. end)
  2773. ConfirmTransFrame.Cancel.MouseButton1Click:connect(function()
  2774. if not AnimationActive then
  2775. AnimationActive = true
  2776. BtnClickAnim(ConfirmTransFrame.Cancel)
  2777. SF.Swoosh.PlaybackSpeed = 1
  2778. SF.Swoosh:Play()
  2779. SettingsGUI.ConfirmTransfer.Background:TweenPosition(UDim2.new(-3.5, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y), "Out", "Sine", 0.5, false)
  2780. wait(0.5)
  2781. SettingsGUI.ConfirmTransfer.Visible = false
  2782. ButtonHover = false
  2783. ConfirmTransFrame.Cancel.ImageColor3 = CancelColor
  2784. SettingsIsOpen = false
  2785. AnimationActive = false
  2786. end
  2787. end)
  2788. ConfirmTransFrame.Cancel.MouseEnter:connect(function()
  2789. if not ButtonHover then
  2790. ButtonHover = true
  2791. ConfirmTransFrame.Cancel.ImageColor3 = ConfirmTransFrame.Cancel.HoverColor.Value
  2792. ConfirmTransFrame.Cancel.down.ImageColor3 = ConfirmTransFrame.Cancel.HoverColor.Value
  2793. SF.ButtonHover:Play()
  2794. end
  2795. ConfirmTransFrame.Cancel.MouseLeave:connect(function()
  2796. ConfirmTransFrame.Cancel.ImageColor3 = CancelColor
  2797. ConfirmTransFrame.Cancel.down.ImageColor3 = CancelColor
  2798. ButtonHover = false
  2799. end)
  2800. end)
  2801. local TutorialActive = false
  2802. local C = {
  2803. "C1",
  2804. "C2",
  2805. "C3",
  2806. "C4",
  2807. "C5",
  2808. "C6",
  2809. "C7",
  2810. "C8",
  2811. "C9",
  2812. "C10",
  2813. "C11",
  2814. "C12"
  2815. }
  2816. for i, v in pairs(C) do
  2817. C[i] = false
  2818. end
  2819. function typetext(text, GUI, IgnoreCommas)
  2820. for n = 0, text:len() do
  2821. if GUI then
  2822. GUI.Text = text:sub(0, n)
  2823. SF.Write:play()
  2824. if text:sub(n, n) == "," and not IgnoreCommas then
  2825. wait(0.2)
  2826. else
  2827. wait()
  2828. end
  2829. end
  2830. end
  2831. end
  2832. Tutorial.No.MouseButton1Click:connect(function()
  2833. BtnClickAnim(Tutorial.No)
  2834. if not AnimationActive then
  2835. SF.Swoosh.PlaybackSpeed = 1
  2836. SF.Swoosh:play()
  2837. Tutorial.Parent:TweenPosition(UDim2.new(-3.5, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y), "Out", "Sine", 0.5, false)
  2838. wait(0.5)
  2839. Tutorial.Parent.Parent.Visible = false
  2840. AnimationActive = false
  2841. ButtonHover = false
  2842. end
  2843. end)
  2844. Tutorial.No.MouseEnter:connect(function()
  2845. local Color = Tutorial.No.ImageColor3
  2846. if not ButtonHover then
  2847. ButtonHover = true
  2848. Tutorial.No.ImageColor3 = Tutorial.No.HoverColor.Value
  2849. Tutorial.No.down.ImageColor3 = Tutorial.No.HoverColor.Value
  2850. SF.ButtonHover:Play()
  2851. end
  2852. Tutorial.No.MouseLeave:connect(function()
  2853. Tutorial.No.ImageColor3 = Color
  2854. Tutorial.No.down.ImageColor3 = Color
  2855. ButtonHover = false
  2856. end)
  2857. end)
  2858. Tutorial.Yes.MouseButton1Click:connect(function()
  2859. BtnClickAnim(Tutorial.Yes)
  2860. local StandardPos = MessagePos1
  2861. if MobileUser then
  2862. StandardPos = MessagePos2
  2863. end
  2864. if not AnimationActive and not MeltDownActive.Value then
  2865. TutorialActive = true
  2866. SF.Swoosh.PlaybackSpeed = 1
  2867. SF.Swoosh:play()
  2868. Tutorial.Parent:TweenPosition(UDim2.new(-3.5, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y), "Out", "Sine", 0.5, false)
  2869. wait(0.5)
  2870. Tutorial.Parent.Parent.Visible = false
  2871. BScrn.ZIndex = 8
  2872. HalfFade = true
  2873. BScrnIn()
  2874. HalfFade = false
  2875. wait(0.5)
  2876. Message.Visible = true
  2877. Message:TweenPosition(StandardPos, "In", "Back", 0.3, false)
  2878. wait(0.3)
  2879. AnimationActive = false
  2880. ButtonHover = false
  2881. typetext("To start earning money, you're going to need a car", Message.Text)
  2882. Message.Clk.Visible = true
  2883. Message.Click.Visible = true
  2884. Message.Clk.MouseButton1Click:connect(function()
  2885. if not C[1] and not MeltDownActive.Value then
  2886. C[1] = true
  2887. Message.Clk.Visible = false
  2888. Message.Click.Visible = false
  2889. typetext("Press the dealership button and you can check out the available vehicles", Message.Text)
  2890. if TBarHidden then
  2891. TBarHidden = false
  2892. HideFrame.up.Visible = true
  2893. HideFrame.down.Visible = false
  2894. HideFrame.Parent.menu.Visible = true
  2895. Progress.Visible = true
  2896. HideFrame.Parent:TweenPosition(UDim2.new(-2, 0, 0.1, 0), "In", "Back", 0.3, true)
  2897. end
  2898. Menu.Dealership.ZIndex = 9
  2899. Menu.Dealership.down.ZIndex = 9
  2900. Menu.Dealership.TextLabel.ZIndex = 10
  2901. end
  2902. Menu.Dealership.MouseButton1Click:connect(function()
  2903. if not C[2] and not MeltDownActive.Value then
  2904. C[2] = true
  2905. BScrn.ZIndex = 10
  2906. Menu.Dealership.ZIndex = 1
  2907. Menu.Dealership.down.ZIndex = 1
  2908. Menu.Dealership.TextLabel.ZIndex = 2
  2909. Message.Text.Text = ""
  2910. Message.Position = UDim2.new(0.5, -Message.AbsoluteSize.X / 2, 1, 0)
  2911. ExitDisabled = true
  2912. SideBar.Exit.ImageColor3 = SideBar.Exit.DisabledColor.Value
  2913. SideBar.Exit.HoverLabel.Text = "Unavailable"
  2914. SpawnDisabled = true
  2915. Holder.Spawn.ImageColor3 = Holder.Spawn.DisabledColor.Value
  2916. repeat
  2917. wait()
  2918. until not Fading
  2919. Message:TweenPosition(MessagePos2, "In", "Back", 0.5, false)
  2920. wait(0.7)
  2921. typetext("This is where you spawn your unlocked vehicles", Message.Text)
  2922. Message.Clk.Visible = true
  2923. Message.Click.Visible = true
  2924. end
  2925. Message.Clk.MouseButton1Click:connect(function()
  2926. if not C[3] and not MeltDownActive.Value then
  2927. C[3] = true
  2928. Message.Clk.Visible = false
  2929. Message.Click.Visible = false
  2930. Message.Text.Text = ""
  2931. typetext("Once you get enough money for a vehicle it will unlock automatically,", Message.Text1)
  2932. typetext("and you'll be able to spawn it how many times you want", Message.Text2)
  2933. Message.Clk.Visible = true
  2934. Message.Click.Visible = true
  2935. end
  2936. Message.Clk.MouseButton1Click:connect(function()
  2937. if not C[4] and not MeltDownActive.Value then
  2938. C[4] = true
  2939. Message.Clk.Visible = false
  2940. Message.Click.Visible = false
  2941. Message.Text2.Text = ""
  2942. Holder.Next.ZIndex = 9
  2943. Holder.Next.down.ZIndex = 9
  2944. Holder.Next.ImageLabel.ZIndex = 10
  2945. Holder.Previous.ZIndex = 9
  2946. Holder.Previous.down.ZIndex = 9
  2947. Holder.Previous.ImageLabel.ZIndex = 10
  2948. BScrnIn2()
  2949. typetext("You can scroll between vehicles by", Message.Text1)
  2950. typetext("using the arrows below", Message.Text2)
  2951. Message.Clk.Visible = true
  2952. Message.Click.Visible = true
  2953. end
  2954. Message.Clk.MouseButton1Click:connect(function()
  2955. if not C[5] and not MeltDownActive.Value then
  2956. C[5] = true
  2957. Message.Clk.Visible = false
  2958. Message.Click.Visible = false
  2959. Message.Text2.Text = ""
  2960. Holder.Next.ZIndex = 1
  2961. Holder.Next.down.ZIndex = 1
  2962. Holder.Next.ImageLabel.ZIndex = 2
  2963. Holder.Previous.ZIndex = 1
  2964. Holder.Previous.down.ZIndex = 1
  2965. Holder.Previous.ImageLabel.ZIndex = 2
  2966. DTbar.ZIndex = 9
  2967. for _, v in pairs(DTbar.VehicleBar:GetChildren()) do
  2968. if v:IsA("Frame") then
  2969. v.ZIndex = 9
  2970. v.ImageButton.ZIndex = 9
  2971. v.Click.ZIndex = 10
  2972. v.Color.ZIndex = 9
  2973. v.Color.P.ZIndex = 9
  2974. end
  2975. end
  2976. if not MobileUser then
  2977. typetext("Or if you want to go to a specific vehicle faster, you can scroll", Message.Text1)
  2978. typetext("in the vehicle wheel and click on the vehicle you want to go to", Message.Text2)
  2979. else
  2980. typetext("Or if you want to go to a specific vehicle faster, you can swipe", Message.Text1)
  2981. typetext("in the vehicle wheel and tap on the vehicle you want to go to.", Message.Text2)
  2982. end
  2983. Message.Clk.Visible = true
  2984. Message.Click.Visible = true
  2985. end
  2986. Message.Clk.MouseButton1Click:connect(function()
  2987. if not C[6] and not MeltDownActive.Value then
  2988. C[6] = true
  2989. Message.Clk.Visible = false
  2990. Message.Click.Visible = false
  2991. Message.Text1.Text = ""
  2992. Message.Text2.Text = ""
  2993. BScrnOut2()
  2994. DTbar.ZIndex = 1
  2995. for _, v in pairs(DTbar.VehicleBar:GetChildren()) do
  2996. if v:IsA("Frame") then
  2997. v.ZIndex = 1
  2998. v.ImageButton.ZIndex = 1
  2999. v.Click.ZIndex = 2
  3000. v.Color.ZIndex = 1
  3001. v.Color.P.ZIndex = 1
  3002. end
  3003. end
  3004. typetext("You can also customize your unlocked vehicles by pressing", Message.Text1)
  3005. typetext("the customize button on a vehicle's stat display", Message.Text2)
  3006. Message.Clk.Visible = true
  3007. Message.Click.Visible = true
  3008. end
  3009. Message.Clk.MouseButton1Click:connect(function()
  3010. if not C[7] and not MeltDownActive.Value then
  3011. C[7] = true
  3012. Message.Clk.Visible = false
  3013. Message.Click.Visible = false
  3014. Message.Text2.Text = ""
  3015. typetext("When you're done with your vehicle,", Message.Text1)
  3016. wait(0.1)
  3017. typetext("just press the spawn button and you can start crushing it", Message.Text2)
  3018. SpawnDisabled = false
  3019. if not SpawnDisabled2 then
  3020. Holder.Spawn.ImageColor3 = color
  3021. Holder.Spawn.down.ImageColor3 = color
  3022. end
  3023. end
  3024. Holder.Spawn.MouseButton1Click:connect(function()
  3025. if not C[8] and not SpawnDisabled2 and not MeltDownActive.Value then
  3026. C[8] = true
  3027. Message.Position = UDim2.new(0.5, -Message.AbsoluteSize.X / 2, 1, 0)
  3028. Message.Text2.Text = ""
  3029. Message.Text1.Text = ""
  3030. wait(0.5)
  3031. repeat
  3032. wait()
  3033. until not Fading
  3034. ExitDisabled = false
  3035. SideBar.Exit.ImageColor3 = ExitColor
  3036. SideBar.Exit.HoverLabel.Text = "Exit"
  3037. Message:TweenPosition(StandardPos, "In", "Back", 0.3, false)
  3038. wait(0.5)
  3039. typetext("You will unlock new crushers as you progress in the game,", Message.Text1)
  3040. wait(0.1)
  3041. typetext("but you can use all the crushers in row 1 right away", Message.Text2)
  3042. Message.Clk.Visible = true
  3043. Message.Click.Visible = true
  3044. end
  3045. Message.Clk.MouseButton1Click:connect(function()
  3046. if not C[9] and not MeltDownActive.Value then
  3047. C[9] = true
  3048. Message.Clk.Visible = false
  3049. Message.Click.Visible = false
  3050. Message.Text2.Text = ""
  3051. typetext("Some crushers have quick-enable buttons that will", Message.Text1)
  3052. typetext("automatically enable everything in the crusher", Message.Text2)
  3053. Message.Clk.Visible = true
  3054. Message.Click.Visible = true
  3055. end
  3056. Message.Clk.MouseButton1Click:connect(function()
  3057. if not C[10] and not MeltDownActive.Value then
  3058. C[10] = true
  3059. Message.Clk.Visible = false
  3060. Message.Click.Visible = false
  3061. Message.Text2.Text = ""
  3062. typetext("But all of them have a control room to the right of the vehicle", Message.Text1)
  3063. typetext("entrance where you can control how the crusher behaves", Message.Text2)
  3064. Message.Clk.Visible = true
  3065. Message.Click.Visible = true
  3066. end
  3067. Message.Clk.MouseButton1Click:connect(function()
  3068. if not C[11] and not MeltDownActive.Value then
  3069. C[11] = true
  3070. Message.Clk.Visible = false
  3071. Message.Click.Visible = false
  3072. Message.Text2.Text = ""
  3073. if not MobileUser then
  3074. typetext("Just hover your mouse over any control there", Message.Text1)
  3075. else
  3076. typetext("Just walk near any control there", Message.Text1)
  3077. end
  3078. typetext("and you'll see a label of what it does", Message.Text2)
  3079. Message.Clk.Visible = true
  3080. Message.Click.Visible = true
  3081. end
  3082. Message.Clk.MouseButton1Click:connect(function()
  3083. if not C[12] and not MeltDownActive.Value then
  3084. C[12] = true
  3085. Message.Clk.Visible = false
  3086. Message.Click.Visible = false
  3087. Message.Text1.Text = ""
  3088. Message.Text2.Text = ""
  3089. typetext("That's all for the tutorial, good luck crushing!", Message.Text)
  3090. wait(2)
  3091. Message:TweenPosition(UDim2.new(0.5, -Message.AbsoluteSize.X / 2, 1, 0), "Out", "Back", 0.3, false)
  3092. wait(0.3)
  3093. Message.Visible = false
  3094. TutorialActive = false
  3095. end
  3096. end)
  3097. end)
  3098. end)
  3099. end)
  3100. end)
  3101. end)
  3102. end)
  3103. end)
  3104. end)
  3105. end)
  3106. end)
  3107. end)
  3108. end
  3109. end)
  3110. rE.MeltDown.OnClientEvent:connect(function(Name, Players)
  3111. if Name then
  3112. Music.Value = 0
  3113. if Tutorial.Parent.Parent.Visible == true then
  3114. SF.Swoosh.PlaybackSpeed = 1
  3115. SF.Swoosh:play()
  3116. Tutorial.Parent:TweenPosition(UDim2.new(-3.5, 0, 0, DealershipGUI.MeasureMent.AbsoluteSize.Y), "Out", "Sine", 0.5, false)
  3117. delay(0.5, function()
  3118. Tutorial.Parent.Parent.Visible = false
  3119. end)
  3120. end
  3121. local GUI = Message
  3122. if TutorialActive then
  3123. local Folder = Instance.new("Folder", Plr)
  3124. Folder.Name = "ResumeTutorial"
  3125. Message.Clk:Destroy()
  3126. Message.Click:Destroy()
  3127. local Clone = Message:Clone()
  3128. for _, v in pairs(Clone:GetChildren()) do
  3129. if v:IsA("GuiObject") then
  3130. v.Text = ""
  3131. end
  3132. end
  3133. Clone.Parent = Message.Parent
  3134. Message:Destroy()
  3135. GUI = Clone
  3136. end
  3137. GUI.Visible = true
  3138. if not Dealing and not MobileUser then
  3139. GUI:TweenPosition(MessagePos1, "In", "Back", 0.3, false)
  3140. else
  3141. GUI:TweenPosition(MessagePos2, "In", "Back", 0.3, false)
  3142. end
  3143. typetext(Name[1] .. " has activated the energy core self-destruct sequence.", GUI.Text)
  3144. wait(1)
  3145. GUI.Text.Text = ""
  3146. typetext("An escape helicopter has landed somewhere " .. Name[2] .. ",", GUI.Text1)
  3147. typetext("find it and escape to survive the facility explosion.", GUI.Text2)
  3148. wait(1)
  3149. GUI.Text1.Text = ""
  3150. GUI.Text2.Text = ""
  3151. local Money = 0
  3152. if Plr.Money.Value > 5000000000 then
  3153. if Plr:FindFirstChild("CoreAccess") then
  3154. Money = math.min(Plr.Money.Value * 0.25, 100000000000)
  3155. else
  3156. Money = math.min(Plr.Money.Value * 0.15, 100000000000)
  3157. end
  3158. elseif Plr:FindFirstChild("CoreAccess") then
  3159. Money = 5000 + Plr.Money.Value * 0.4
  3160. else
  3161. Money = 5000 + Plr.Money.Value * 0.25
  3162. end
  3163. typetext("You will earn " .. Rounder:ConvertAccurate(Rounder:RoundOff(Money)) .. " Money if you survive.", GUI.Text, true)
  3164. wait(1)
  3165. if TutorialActive then
  3166. rE.RefreshCharacter:FireServer()
  3167. end
  3168. else
  3169. Message.Visible = true
  3170. Message:TweenPosition(MessagePos1, "In", "Back", 0.3, false)
  3171. wait(0.5)
  3172. typetext("The facility has been destroyed and will regenerate shortly.", Message.Text1)
  3173. wait(0.2)
  3174. if #Players == 0 then
  3175. typetext("Nobody survived the explosion!", Message.Text2)
  3176. elseif #Players == #game.Players:GetChildren() then
  3177. typetext("Everyone survived the explosion!", Message.Text2)
  3178. elseif #Players == 1 then
  3179. typetext("Only " .. Players[1] .. " Survived the explosion!", Message.Text2)
  3180. elseif #Players == 2 then
  3181. typetext("Only " .. Players[1] .. " and " .. Players[2] .. " Survived!", Message.Text2)
  3182. elseif #Players == 3 then
  3183. typetext(Players[1] .. ", " .. Players[2] .. " and " .. Players[3] .. " Survived!", Message.Text2, true)
  3184. elseif #Players == 4 then
  3185. typetext(Players[1] .. ", " .. Players[2] .. ", " .. Players[3] .. " and " .. Players[4] .. " Survived!", Message.Text2, true)
  3186. else
  3187. typetext("Almost everyone survived the explosion!")
  3188. end
  3189. wait(1.5)
  3190. BScrnIn()
  3191. BScrn.Text = "Regenerating"
  3192. while wait(0.4) do
  3193. if BScrn.Text:len() == 15 then
  3194. BScrn.Text = "Regenerating"
  3195. else
  3196. BScrn.Text = BScrn.Text .. "."
  3197. end
  3198. end
  3199. end
  3200. end)
  3201. rE.CountDown.OnClientEvent:connect(function(Number)
  3202. if Message then
  3203. if not Message.Visible then
  3204. Message.Visible = true
  3205. if MobileUser then
  3206. Message:TweenPosition(MessagePos2, "In", "Back", 0.3, false)
  3207. else
  3208. Message:TweenPosition(MessagePos1, "In", "Back", 0.3, false)
  3209. end
  3210. end
  3211. if Number then
  3212. Message.Text.Text = "Facility about to explode, the escape helicopter is leaving in " .. Number .. " seconds!"
  3213. else
  3214. Message.Text.Text = "Escape helicopter is leaving!"
  3215. wait(1.5)
  3216. Message:TweenPosition(UDim2.new(0.5, -Message.AbsoluteSize.X / 2, 1, 0), "Out", "Back", 0.3, false)
  3217. TBar.Holder:TweenPosition(UDim2.new(-2, 0, -1.79, 0), "Out", "Back", 0.3, false)
  3218. if VehicleMenu.Menu.Visible then
  3219. VehicleMenu.Menu.Background:TweenPosition(VMenuPos2, "Out", "Back", 0.3, false)
  3220. end
  3221. if View == 2 then
  3222. Cam.CameraSubject = Plr.Character.Humanoid
  3223. Cam.CameraType = "Custom"
  3224. Plr.CameraMaxZoomDistance = 250
  3225. end
  3226. wait(0.3)
  3227. Message.Text.Text = ""
  3228. Message.Visible = false
  3229. VehicleMenu.Menu.Visible = false
  3230. TBar.Holder.hide.Visible = false
  3231. TBar.Holder.Progress.Visible = false
  3232. repeat
  3233. wait()
  3234. until not Fading
  3235. if Dealing then
  3236. ExitDealership(true)
  3237. end
  3238. end
  3239. end
  3240. end)
  3241. rE.Rotor.OnClientEvent:connect(function(Helicopter)
  3242. local Event
  3243. local Rotate = Helicopter.Heli.Rotor.WeldTo
  3244. local AttachedTo = Helicopter.Heli.Main.MainRotorJoint
  3245. local Angle = 0
  3246. local Add = 0
  3247. Rotate.Anchored = false
  3248. Event = game:GetService("RunService").RenderStepped:Connect(function()
  3249. if Helicopter.Parent == nil then
  3250. Event:Disconnect()
  3251. else
  3252. Angle = Angle + Add
  3253. Rotate.CFrame = AttachedTo.CFrame * CFrame.Angles(0, math.rad(Angle), 0)
  3254. Rotate.CFrame = Rotate.CFrame * CFrame.new(0, -1.8, 0)
  3255. end
  3256. end)
  3257. for i = 1, 20 do
  3258. wait(0.1)
  3259. Add = i
  3260. end
  3261. end)
  3262. Tutorial.Yes.MouseEnter:connect(function()
  3263. if not ButtonHover then
  3264. ButtonHover = true
  3265. Tutorial.Yes.ImageColor3 = Tutorial.Yes.HoverColor.Value
  3266. Tutorial.Yes.down.ImageColor3 = Tutorial.Yes.HoverColor.Value
  3267. SF.ButtonHover:Play()
  3268. end
  3269. Tutorial.Yes.MouseLeave:connect(function()
  3270. Tutorial.Yes.ImageColor3 = color
  3271. Tutorial.Yes.down.ImageColor3 = color
  3272. ButtonHover = false
  3273. end)
  3274. end)
  3275. if Plr:FindFirstChild("Spin") then
  3276. do
  3277. local Spin, Conveyor, Controls = Plr.Spin, Plr.Conveyor, Plr.Controls
  3278. function MakeSelectionBox(parent)
  3279. local SG = Instance.new("SelectionBox")
  3280. SG.Color3 = Color3.new(1, 1, 1)
  3281. SG.LineThickness = 0.015
  3282. SG.Adornee = parent
  3283. SG.Parent = PlrGui
  3284. return SG
  3285. end
  3286. function AddHint(Control)
  3287. local SG = MakeSelectionBox(Control)
  3288. local Clicked = false
  3289. local Click
  3290. Click = Control.ClickDetector.MouseClick:connect(function()
  3291. Clicked = true
  3292. end)
  3293. local B = Control.BillboardGui:Clone()
  3294. B.Name = Control.Parent.Name .. Control.Name
  3295. B.Parent = Plr.PlayerGui
  3296. B.Adornee = Control
  3297. repeat
  3298. SG.Transparency = 0
  3299. B.Enabled = true
  3300. wait(0.35)
  3301. SG.Transparency = 1
  3302. B.Enabled = false
  3303. wait(0.35)
  3304. until Clicked or Control.ClickDetector.MaxActivationDistance ~= 20
  3305. SG:Destroy()
  3306. B:Destroy()
  3307. Click:Disconnect()
  3308. end
  3309. function AddHints(Controls, String)
  3310. local Middle = Controls[2]
  3311. local Clicked = false
  3312. local SGs = {}
  3313. for _, Control in pairs(Controls) do
  3314. do
  3315. local SG = MakeSelectionBox(Control)
  3316. table.insert(SGs, SG)
  3317. local Click
  3318. Click = Control.ClickDetector.MouseClick:connect(function()
  3319. Clicked = true
  3320. end)
  3321. spawn(function()
  3322. repeat
  3323. wait(0.1)
  3324. until Clicked
  3325. SG:Destroy()
  3326. Click:Disconnect()
  3327. end)
  3328. end
  3329. end
  3330. local B = Middle.BillboardGui:Clone()
  3331. B.Name = "Tutorial"
  3332. B.TextLabel.Text = String
  3333. B.Size = UDim2.new(2, 0, 1.5, 0)
  3334. B.StudsOffset = Vector3.new(0, 1.5, 0)
  3335. B.Parent = Plr.PlayerGui
  3336. B.Adornee = Middle
  3337. repeat
  3338. for _, SG in pairs(SGs) do
  3339. SG.Transparency = 0
  3340. end
  3341. B.Enabled = true
  3342. wait(0.35)
  3343. for _, SG in pairs(SGs) do
  3344. SG.Transparency = 1
  3345. end
  3346. B.Enabled = false
  3347. wait(0.35)
  3348. until Clicked or Middle.ClickDetector.MaxActivationDistance ~= 20
  3349. B:Destroy()
  3350. end
  3351. for _, v in pairs(workspace["All crushers"]:GetChildren()) do
  3352. if v:FindFirstChild("Conveyor") then
  3353. v.Enable.Button.ClickDetector.MouseClick:connect(function()
  3354. if v.Enable.Indicator.BrickColor == BrickColor.new("Really red") then
  3355. if v:FindFirstChild("Spin") and not Spin.Value then
  3356. AddHints({
  3357. v.Spin.Slow,
  3358. v.Spin.Medium,
  3359. v.Spin.Fast
  3360. }, "Adjust Spin Speed")
  3361. if v.Spin.Enable.ClickDetector.MaxActivationDistance == 20 and v.Spin.Enable.Enabled.Value == false then
  3362. Spin.Value = true
  3363. AddHint(v.Spin.Enable)
  3364. end
  3365. end
  3366. wait(0.2)
  3367. if v.Conveyor.Enable.ClickDetector.MaxActivationDistance == 20 and not Conveyor.Value then
  3368. AddHints({
  3369. v.Conveyor.Slow,
  3370. v.Conveyor.Medium,
  3371. v.Conveyor.Fast
  3372. }, "Adjust Conveyor Speed")
  3373. if v.Conveyor.Enable.ClickDetector.MaxActivationDistance == 20 and v.Conveyor.Enable.Enabled.Value == false then
  3374. Conveyor.Value = true
  3375. AddHint(v.Conveyor.Enable)
  3376. end
  3377. end
  3378. if v:FindFirstChild("Controls") and v.Controls.Enable.Indicator.BrickColor == BrickColor.new("Really red") and v.Name ~= "Washing Machine" and not Controls.Value then
  3379. Controls.Value = true
  3380. AddHint(v.Controls.Enable)
  3381. end
  3382. end
  3383. end)
  3384. end
  3385. end
  3386. end
  3387. end
  3388. for _, Frame in pairs(PlrGui:WaitForChild("GamepassShop"):WaitForChild("ScrollingFrame"):GetChildren()) do
  3389. Frame:WaitForChild("TextButton").MouseButton1Click:Connect(function()
  3390. local GPNum = Frame.Name:sub(9)
  3391. MP:PromptPurchase(Plr, Gpasses[tonumber(GPNum)])
  3392. end)
  3393. end
  3394. for _, Frame in pairs(PlrGui:WaitForChild("MoneyShop"):WaitForChild("ScrollingFrame"):GetChildren()) do
  3395. Frame.TextButton.MouseButton1Click:Connect(function()
  3396. local GPNum = Frame.Name:sub(6)
  3397. MP:PromptProductPurchase(Plr, MoneyProducts[tonumber(GPNum)])
  3398. end)
  3399. end
  3400. MP.PromptPurchaseFinished:Connect(function(player, assetId, isPurchased)
  3401. if isPurchased then
  3402. if assetId == Gpasses[1] then
  3403. for _, BuyColor in pairs(CustScroll:GetChildren()) do
  3404. if BuyColor.Name == "PremiumColor" then
  3405. BuyColor.LockImage.Visible = false
  3406. end
  3407. end
  3408. LockButton("Gamepass1")
  3409. elseif assetId == Gpasses[2] then
  3410. rE.GamepassItem:FireServer("Crowbar")
  3411. LockButton("Gamepass2")
  3412. elseif assetId == Gpasses[3] then
  3413. CustScroll.Neon.LockImage.Visible = false
  3414. LockButton("Gamepass3")
  3415. elseif assetId == Gpasses[4] then
  3416. CustScroll.Silver.LockImage.Visible = false
  3417. LockButton("Gamepass4")
  3418. elseif assetId == Gpasses[5] then
  3419. if VL then
  3420. VL:Destroy()
  3421. VL = false
  3422. end
  3423. rE.GamepassItem:FireServer("Tag")
  3424. LockButton("Gamepass5")
  3425. wait(0.5)
  3426. for i, v in pairs(VList) do
  3427. if game.ReplicatedStorage.VehicleInformation[v].VipOnly.Value == true then
  3428. local Result, Afforded = rF.PurchVehicle:InvokeServer(v, true)
  3429. local Price = game.ReplicatedStorage.VehicleInformation:FindFirstChild(VList[i]).Price.Value
  3430. if Result == "Bought" then
  3431. if Dealing then
  3432. ListFrameBack.VehicleList:FindFirstChild(v).Color.BackgroundColor3 = Color3.fromRGB(109, 61, 255)
  3433. DTbar.VehicleBar:FindFirstChild(v).Color.BackgroundColor3 = Color3.fromRGB(109, 61, 255)
  3434. else
  3435. AddNotification(i)
  3436. end
  3437. if Price > Previous then
  3438. Previous = Price
  3439. end
  3440. elseif Result == "Low Cash" and (Target == false or Target and Price < Target) then
  3441. Target = Price
  3442. break
  3443. elseif Result == "Low Tokens" then
  3444. break
  3445. end
  3446. end
  3447. end
  3448. if Target then
  3449. Progress.Label.Text = "Next Vehicle: " .. Rounder:ConvertAccurate(Target)
  3450. else
  3451. Progress.Label.Text = "Max"
  3452. end
  3453. UpdateProgress()
  3454. if Dealing and 1 <= #Cam:GetChildren() then
  3455. UpdateRequirements(GetCurrentCarValue().Name)
  3456. end
  3457. elseif assetId == Gpasses[6] then
  3458. SettingsFrame.Invincibility.ImageColor3 = color
  3459. SettingsFrame.Invincibility.down.ImageColor3 = color
  3460. SettingsFrame.Invincibility.TextLabel.Text = "ON"
  3461. InvinUnlocked = true
  3462. rF.ChangeSetting:InvokeServer(1, true)
  3463. rF.ChangeSetting:InvokeServer(5, true)
  3464. rE.Speed:FireServer(32)
  3465. LockButton("Gamepass6")
  3466. elseif assetId == Gpasses[7] then
  3467. rE.GamepassItem:FireServer("Folder")
  3468. if workspace.CrusherCovers:FindFirstChild("PremiumLine") then
  3469. workspace.CrusherCovers.PremiumLine:Destroy()
  3470. end
  3471. LockButton("Gamepass7")
  3472. elseif assetId == Gpasses[8] then
  3473. rE.GamepassItem:FireServer("Tag2")
  3474. if EC then
  3475. EC:Destroy()
  3476. EC = false
  3477. end
  3478. LockButton("Gamepass8")
  3479. elseif assetId == Gpasses[9] then
  3480. CustScroll.Gold.LockImage.Visible = false
  3481. LockButton("Gamepass9")
  3482. elseif assetId == Gpasses[10] then
  3483. CustScroll.Platinum.LockImage.Visible = false
  3484. LockButton("Gamepass10")
  3485. end
  3486. end
  3487. end)
  3488. local VMenuBack2 = VehicleMenu.Menu.Background.Background
  3489. local TeleportDebounce = false
  3490. local TeleportHover = false
  3491. local RespawnDebounce = false
  3492. local RespawnHover = false
  3493. local FlipDebounce = false
  3494. local RespawnColor = VMenuBack2.Respawn.ImageColor3
  3495. function CamGuiToggle()
  3496. if View == 2 then
  3497. View = 1
  3498. if not Plr.Character.Humanoid.Sit then
  3499. Cam.CameraSubject = Plr.Character.Humanoid
  3500. end
  3501. VMenuBack2.CameraLabel.Text = VMenuBack2.CameraLabel.DisabledText.Value
  3502. elseif View == 1 then
  3503. View = 2
  3504. if not Plr.Character.Humanoid.Sit then
  3505. Cam.CameraSubject = Seat
  3506. Cam.CFrame = Seat.CFrame
  3507. end
  3508. VMenuBack2.CameraLabel.Text = VMenuBack2.CameraLabel.EnabledText.Value
  3509. end
  3510. end
  3511. VMenuBack2.Camera.MouseButton1Click:connect(function()
  3512. BtnClickAnim(VMenuBack2.Camera)
  3513. CamGuiToggle()
  3514. end)
  3515. VMenuBack2.Camera.MouseEnter:connect(function()
  3516. if not ButtonHover then
  3517. ButtonHover = true
  3518. VMenuBack2.Camera.ImageColor3 = VMenuBack2.Camera.HoverColor.Value
  3519. VMenuBack2.Camera.down.ImageColor3 = VMenuBack2.Camera.HoverColor.Value
  3520. SF.ButtonHover:Play()
  3521. end
  3522. VMenuBack2.Camera.MouseLeave:connect(function()
  3523. VMenuBack2.Camera.ImageColor3 = color
  3524. VMenuBack2.Camera.down.ImageColor3 = color
  3525. ButtonHover = false
  3526. end)
  3527. end)
  3528. VMenuBack2.Delete.MouseButton1Click:connect(function()
  3529. BtnClickAnim(VMenuBack2.Delete)
  3530. if not AnimationActive then
  3531. AnimationActive = true
  3532. SF.Delete:play()
  3533. if game.Workspace.CarCollection:FindFirstChild(Plr.Name) then
  3534. rE.Delete:FireServer(game.Workspace.CarCollection:FindFirstChild(Plr.Name))
  3535. end
  3536. InUseCar = nil
  3537. Seat = nil
  3538. VehicleCopy = nil
  3539. Cam.CameraSubject = Plr.Character.Humanoid
  3540. Cam.CameraType = "Custom"
  3541. Plr.CameraMaxZoomDistance = 250
  3542. View = 1
  3543. VMenuBack2.Parent:TweenPosition(VMenuPos2, "Out", "Back", 0.3, false)
  3544. wait(0.3)
  3545. VMenuBack2.Parent.Parent.Visible = false
  3546. AnimationActive = false
  3547. end
  3548. end)
  3549. VMenuBack2.Delete.MouseEnter:connect(function()
  3550. if not ButtonHover then
  3551. ButtonHover = true
  3552. VMenuBack2.Delete.ImageColor3 = VMenuBack2.Delete.HoverColor.Value
  3553. VMenuBack2.Delete.down.ImageColor3 = VMenuBack2.Delete.HoverColor.Value
  3554. SF.ButtonHover:Play()
  3555. end
  3556. VMenuBack2.Delete.MouseLeave:connect(function()
  3557. VMenuBack2.Delete.ImageColor3 = ExitColor
  3558. VMenuBack2.Delete.down.ImageColor3 = ExitColor
  3559. ButtonHover = false
  3560. end)
  3561. end)
  3562. function Flip()
  3563. if not FlipDebounce then
  3564. FlipDebounce = true
  3565. SF.Flip:play()
  3566. if game.Workspace.CarCollection:FindFirstChild(Plr.Name) then
  3567. rE.CreateInstance:FireServer("FlipMovers", nil, Seat, nil)
  3568. end
  3569. wait(2)
  3570. FlipDebounce = false
  3571. end
  3572. end
  3573. VMenuBack2.Flip.MouseButton1Click:connect(function()
  3574. BtnClickAnim(VMenuBack2.Flip)
  3575. Flip()
  3576. end)
  3577. VMenuBack2.Flip.MouseEnter:connect(function()
  3578. if not ButtonHover then
  3579. ButtonHover = true
  3580. VMenuBack2.Flip.ImageColor3 = VMenuBack2.Flip.HoverColor.Value
  3581. VMenuBack2.Flip.down.ImageColor3 = VMenuBack2.Flip.HoverColor.Value
  3582. SF.ButtonHover:Play()
  3583. end
  3584. VMenuBack2.Flip.MouseLeave:connect(function()
  3585. VMenuBack2.Flip.ImageColor3 = color
  3586. VMenuBack2.Flip.down.ImageColor3 = color
  3587. ButtonHover = false
  3588. end)
  3589. end)
  3590. VMenuBack2.Respawn.MouseButton1Click:connect(function()
  3591. BtnClickAnim(VMenuBack2.Respawn)
  3592. local c = game.Workspace.CarCollection:FindFirstChild(Plr.Name)
  3593. if not RespawnDebounce and not AnimationActive then
  3594. AnimationActive = true
  3595. delay(30, function()
  3596. RespawnDebounce = false
  3597. if RespawnHover then
  3598. VMenuBack2.Respawn.ImageColor3 = VMenuBack2.Respawn.HoverColor.Value
  3599. VMenuBack2.Respawn.down.ImageColor3 = VMenuBack2.Respawn.HoverColor.Value
  3600. else
  3601. VMenuBack2.Respawn.ImageColor3 = RespawnColor
  3602. VMenuBack2.Respawn.down.ImageColor3 = RespawnColor
  3603. end
  3604. end)
  3605. local Changing = false
  3606. if Music.Value == 3 then
  3607. repeat
  3608. wait()
  3609. until not ChangingMusic.Value
  3610. Music.Value = 0
  3611. ChangingMusic.Value = true
  3612. Changing = true
  3613. end
  3614. BScrnIn()
  3615. SF.Spawn:play()
  3616. RespawnDebounce = true
  3617. VMenuBack2.Respawn.ImageColor3 = VMenuBack2.Respawn.DisabledColor.Value
  3618. VMenuBack2.Respawn.down.ImageColor3 = VMenuBack2.Respawn.DisabledColor.Value
  3619. RespawnHover = false
  3620. local Parts = rF.SpawnVehicle:InvokeServer(VehicleCopy.Name, rF.LoadSaveCustoms:InvokeServer("Load", nil, VehicleCopy.Name), true)
  3621. for _, v in pairs(Parts) do
  3622. v.CanCollide = false
  3623. end
  3624. Parts = nil
  3625. InUseCar = game.Workspace.CarCollection:FindFirstChild(Plr.Name)
  3626. Seat = InUseCar.Car.Body.VehicleSeat
  3627. VMenuBack2.Teleport.ImageColor3 = color
  3628. VMenuBack2.Teleport.down.ImageColor3 = color
  3629. Cam.CameraSubject = Plr.Character.Humanoid
  3630. Cam.CameraType = "Custom"
  3631. Plr.CameraMaxZoomDistance = 250
  3632. View = 1
  3633. VMenuBack2.CameraLabel.Text = VMenuBack2.CameraLabel.DisabledText.Value
  3634. local val = Instance.new("NumberValue")
  3635. val.Parent = Seat
  3636. val.Name = "Music"
  3637. val.Value = 1
  3638. Seat.Touched:connect(SeatTouched)
  3639. Seat.ChildAdded:connect(SeatAdded)
  3640. Seat.ChildRemoved:connect(SeatRemoved)
  3641. wait(0.5)
  3642. rE.TeleportPlr:FireServer("VehicleSeat")
  3643. Music.Value = 1
  3644. BScrnOut()
  3645. if Changing then
  3646. ChangingMusic.Value = false
  3647. end
  3648. AnimationActive = false
  3649. end
  3650. end)
  3651. VMenuBack2.Respawn.MouseEnter:connect(function()
  3652. if RespawnDebounce then
  3653. VMenuBack2.Respawn.ImageColor3 = VMenuBack2.Respawn.DisabledColorHover.Value
  3654. VMenuBack2.Respawn.down.ImageColor3 = VMenuBack2.Respawn.DisabledColorHover.Value
  3655. else
  3656. VMenuBack2.Respawn.ImageColor3 = VMenuBack2.Respawn.HoverColor.Value
  3657. VMenuBack2.Respawn.down.ImageColor3 = VMenuBack2.Respawn.HoverColor.Value
  3658. end
  3659. if not RespawnHover then
  3660. RespawnHover = true
  3661. SF.ButtonHover:Play()
  3662. end
  3663. VMenuBack2.Respawn.MouseLeave:connect(function()
  3664. if RespawnDebounce then
  3665. VMenuBack2.Respawn.ImageColor3 = VMenuBack2.Respawn.DisabledColor.Value
  3666. VMenuBack2.Respawn.down.ImageColor3 = VMenuBack2.Respawn.DisabledColor.Value
  3667. else
  3668. VMenuBack2.Respawn.ImageColor3 = RespawnColor
  3669. VMenuBack2.Respawn.down.ImageColor3 = RespawnColor
  3670. end
  3671. RespawnHover = false
  3672. end)
  3673. end)
  3674. spawn(function()
  3675. while wait(0.2) do
  3676. if Seat and Seat.Disabled == true then
  3677. if TeleportHover then
  3678. VMenuBack2.Teleport.ImageColor3 = VMenuBack2.Teleport.DisabledColorHover.Value
  3679. VMenuBack2.Teleport.down.ImageColor3 = VMenuBack2.Teleport.DisabledColorHover.Value
  3680. else
  3681. VMenuBack2.Teleport.ImageColor3 = VMenuBack2.Teleport.DisabledColor.Value
  3682. VMenuBack2.Teleport.down.ImageColor3 = VMenuBack2.Teleport.DisabledColor.Value
  3683. end
  3684. end
  3685. end
  3686. end)
  3687. VMenuBack2.Teleport.MouseButton1Click:connect(function()
  3688. BtnClickAnim(VMenuBack2.Teleport)
  3689. if not TeleportDebounce and not AnimationActive and not Seat.Disabled then
  3690. AnimationActive = true
  3691. delay(10, function()
  3692. TeleportDebounce = false
  3693. if Seat then
  3694. if not Seat.Disabled then
  3695. if TeleportHover then
  3696. VMenuBack2.Teleport.ImageColor3 = VMenuBack2.Teleport.HoverColor.Value
  3697. VMenuBack2.Teleport.down.ImageColor3 = VMenuBack2.Teleport.HoverColor.Value
  3698. else
  3699. VMenuBack2.Teleport.ImageColor3 = color
  3700. VMenuBack2.Teleport.down.ImageColor3 = color
  3701. end
  3702. end
  3703. else
  3704. VMenuBack2.Teleport.ImageColor3 = color
  3705. VMenuBack2.Teleport.down.ImageColor3 = color
  3706. end
  3707. end)
  3708. local Changing1 = false
  3709. local Changing2 = false
  3710. if Seat ~= nil and Seat:FindFirstChild("Music") then
  3711. local val = Seat.Music.Value
  3712. if (Music.Value == 1 or Music.Value == 3) and val == 0 then
  3713. Changing1 = true
  3714. ChangingMusic.Value = true
  3715. Music.Value = 0
  3716. elseif (Music.Value == 0 or Music.Value == 3) and val == 1 then
  3717. Changing2 = true
  3718. ChangingMusic.Value = true
  3719. Music.Value = 0
  3720. end
  3721. end
  3722. BScrnIn()
  3723. TeleportDebounce = true
  3724. VMenuBack2.Teleport.ImageColor3 = VMenuBack2.Teleport.DisabledColor.Value
  3725. VMenuBack2.Teleport.down.ImageColor3 = VMenuBack2.Teleport.DisabledColor.Value
  3726. TeleportHover = false
  3727. rE.TeleportPlr:FireServer("VehicleSeat")
  3728. if Changing2 then
  3729. Music.Value = 1
  3730. end
  3731. BScrnOut()
  3732. if Changing1 or Changing2 then
  3733. ChangingMusic.Value = false
  3734. end
  3735. AnimationActive = false
  3736. end
  3737. end)
  3738. VMenuBack2.Teleport.MouseEnter:connect(function()
  3739. if Seat then
  3740. if TeleportDebounce or Seat.Disabled then
  3741. VMenuBack2.Teleport.ImageColor3 = VMenuBack2.Teleport.DisabledColorHover.Value
  3742. VMenuBack2.Teleport.down.ImageColor3 = VMenuBack2.Teleport.DisabledColorHover.Value
  3743. else
  3744. VMenuBack2.Teleport.ImageColor3 = VMenuBack2.Teleport.HoverColor.Value
  3745. VMenuBack2.Teleport.down.ImageColor3 = VMenuBack2.Teleport.HoverColor.Value
  3746. end
  3747. if not TeleportHover then
  3748. TeleportHover = true
  3749. SF.ButtonHover:Play()
  3750. end
  3751. VMenuBack2.Teleport.MouseLeave:connect(function()
  3752. if TeleportDebounce or Seat.Disabled then
  3753. VMenuBack2.Teleport.ImageColor3 = VMenuBack2.Teleport.DisabledColor.Value
  3754. VMenuBack2.Teleport.down.ImageColor3 = VMenuBack2.Teleport.DisabledColor.Value
  3755. else
  3756. VMenuBack2.Teleport.ImageColor3 = color
  3757. VMenuBack2.Teleport.down.ImageColor3 = color
  3758. end
  3759. TeleportHover = false
  3760. end)
  3761. end
  3762. end)
  3763. local VMHidden = false
  3764. VMenuBack2.Parent.Hide.ClickBox.MouseButton1Click:connect(function()
  3765. if not AnimationActive then
  3766. AnimationActive = true
  3767. SF.ButtonClick2D:play()
  3768. if VMHidden then
  3769. VMHidden = false
  3770. VMenuBack2.Parent.Hide.Hide.Visible = true
  3771. VMenuBack2.Parent.Hide.Show.Visible = false
  3772. VMenuBack2.Parent:TweenPosition(VMenuPos1, "In", "Back", 0.3, true)
  3773. else
  3774. VMHidden = true
  3775. VMenuBack2.Parent.Hide.Show.Visible = true
  3776. VMenuBack2.Parent.Hide.Hide.Visible = false
  3777. VMenuBack2.Parent:TweenPosition(VMenuPos2, "Out", "Back", 0.3, true)
  3778. end
  3779. wait(0.3)
  3780. AnimationActive = false
  3781. end
  3782. end)
  3783. repeat
  3784. wait()
  3785. until Plr.Character.Humanoid
  3786. Plr.Character.Humanoid.Died:Connect(function()
  3787. script.Disabled = true
  3788. wait()
  3789. script:Destroy()
  3790. end)
  3791. local Typing = false
  3792. US.TextBoxFocused:Connect(function()
  3793. Typing = true
  3794. US.TextBoxFocusReleased:wait()
  3795. Typing = false
  3796. end)
  3797. US.InputBegan:Connect(function(Pressed)
  3798. if not Typing and Seat and VehicleMenu.Menu.Visible then
  3799. if Pressed.KeyCode == Enum.KeyCode.V then
  3800. CamGuiToggle()
  3801. elseif Pressed.KeyCode == Enum.KeyCode.F then
  3802. Flip()
  3803. end
  3804. end
  3805. end)
  3806. rE.ChangeBrightness.OnClientEvent:connect(function(Explosion)
  3807. if not Explosion then
  3808. game.Lighting.ColorCorrection.Brightness = 0.4
  3809. wait(0.5)
  3810. for i = 1, 100 do
  3811. game.Lighting.ColorCorrection.Brightness = game.Lighting.ColorCorrection.Brightness - 0.004
  3812. wait()
  3813. end
  3814. else
  3815. BScrn.BackgroundColor3 = Color3.fromRGB(255, 202, 95)
  3816. BScrn.Visible = true
  3817. for i = 1, 20 do
  3818. BScrn.BackgroundTransparency = BScrn.BackgroundTransparency - 0.05
  3819. wait(0.1)
  3820. end
  3821. end
  3822. end)
  3823. local Crash1 = workspace["All crushers"]["Speed Crash Test"]
  3824. local Crash2 = workspace["All crushers"]["Tilted speed crash test"]
  3825. local Active = 1
  3826. local CrashTestDebounce = false
  3827. function R3(Position, Size)
  3828. local SizeOffset = Size / 2
  3829. local Point1 = Position - SizeOffset
  3830. local Point2 = Position + SizeOffset
  3831. return Region3.new(Point1, Point2)
  3832. end
  3833. Crash1.ChangeDistance.OnClientEvent:connect(function(num)
  3834. if num == 2 then
  3835. if Active == 1 then
  3836. Crash1.Wall:SetPrimaryPartCFrame(CFrame.new(-323.838, -314.495, -4759.104))
  3837. Crash1.Buttons.Button2.Indicator.BrickColor = BrickColor.new("Lime green")
  3838. Crash1.Buttons.Button1.Indicator.BrickColor = BrickColor.new("Really red")
  3839. Active = 2
  3840. end
  3841. elseif Active == 2 then
  3842. Crash1.Wall:SetPrimaryPartCFrame(CFrame.new(-323.838, -314.495, -2711.104))
  3843. Crash1.Buttons.Button1.Indicator.BrickColor = BrickColor.new("Lime green")
  3844. Crash1.Buttons.Button2.Indicator.BrickColor = BrickColor.new("Really red")
  3845. Active = 1
  3846. end
  3847. end)
  3848. local RightCar = false
  3849. function CheckVehicle(instance)
  3850. if instance.Parent.Name == Plr.Name then
  3851. RightCar = true
  3852. elseif instance.Parent == workspace then
  3853. RightCar = false
  3854. else
  3855. CheckVehicle(instance.Parent)
  3856. end
  3857. end
  3858. Crash1.Wall.SpeedSensor.Touched:connect(function(part)
  3859. CheckVehicle(part)
  3860. if InUseCar and RightCar and (part.Name == "FL" or part.Name == "FR" or part.Name == "RL" or part.Name == "RR") and not CrashTestDebounce then
  3861. CrashTestDebounce = true
  3862. do
  3863. local Distance = part.Velocity.Magnitude * 0.0375
  3864. local Size = Crash1.Wall.Hitbox.Size
  3865. local Pos = Crash1.Wall.Hitbox.CFrame
  3866. local Touched
  3867. if Distance < 15 then
  3868. Crash1.Wall.Hitbox.Size = Vector3.new(30, 27, 2 + Distance)
  3869. Crash1.Wall.Hitbox.CFrame = Pos + Vector3.new(0, 0, (2 + Distance) / 2)
  3870. else
  3871. Crash1.Wall.Hitbox.Size = Vector3.new(30, 27, 17)
  3872. Crash1.Wall.Hitbox.CFrame = Pos + Vector3.new(0, 0, 8.5)
  3873. end
  3874. Touched = Crash1.Wall.Wall.Touched:connect(function()
  3875. Touched:Disconnect()
  3876. local r3 = R3(Crash1.Wall.Hitbox.Position, Crash1.Wall.Hitbox.Size)
  3877. local Parts = game.Workspace:FindPartsInRegion3(r3, nil, math.huge)
  3878. Crash1.DestroyParts:FireServer(Parts)
  3879. Crash1.Wall.Hitbox.Size = Size
  3880. Crash1.Wall.Hitbox.CFrame = Pos
  3881. end)
  3882. wait(5)
  3883. Touched:Disconnect()
  3884. Crash1.Wall.Hitbox.Size = Size
  3885. Crash1.Wall.Hitbox.CFrame = Pos
  3886. CrashTestDebounce = false
  3887. end
  3888. end
  3889. end)
  3890. Crash2.SpeedSensor.Touched:connect(function(part)
  3891. CheckVehicle(part)
  3892. if InUseCar and RightCar and (part.Name == "FL" or part.Name == "FR" or part.Name == "RL" or part.Name == "RR") and not CrashTestDebounce then
  3893. CrashTestDebounce = true
  3894. do
  3895. local Distance = part.Velocity.Magnitude * 0.0375
  3896. local Size = Crash2.Hitbox.Size
  3897. local Pos = Crash2.Hitbox.CFrame
  3898. local WaitStarted = false
  3899. local Touched
  3900. local Parts = {}
  3901. if Distance < 15 then
  3902. Crash2.Hitbox.Size = Vector3.new(30, 27, 2 * (1 + Distance))
  3903. Crash2.Hitbox.CFrame = Pos
  3904. else
  3905. Crash2.Hitbox.Size = Vector3.new(30, 27, 32)
  3906. Crash2.Hitbox.CFrame = Pos
  3907. end
  3908. Touched = Crash2.Hitbox.Touched:connect(function(part)
  3909. table.insert(Parts, part)
  3910. if not WaitStarted then
  3911. WaitStarted = true
  3912. wait(0.25)
  3913. Touched:Disconnect()
  3914. Crash2.DestroyParts:FireServer(Parts)
  3915. Crash2.Hitbox.Size = Size
  3916. Crash2.Hitbox.CFrame = Pos
  3917. end
  3918. end)
  3919. wait(5)
  3920. Touched:Disconnect()
  3921. Crash2.Hitbox.Size = Size
  3922. Crash2.Hitbox.CFrame = Pos
  3923. Parts = nil
  3924. CrashTestDebounce = false
  3925. end
  3926. end
  3927. end)
  3928. function ConnectTouch(Crusher)
  3929. local Touch
  3930. Touch = Crusher.Sensor.Touched:connect(function(part)
  3931. if part.Parent then
  3932. if part.Parent:FindFirstChild("Humanoid") or part.Parent.Parent:FindFirstChild("Humanoid") then
  3933. if part.Name ~= "Marked" and part.Parent.Name == Plr.Name then
  3934. Crusher.Destruction.DestroyPart:FireServer(part)
  3935. end
  3936. else
  3937. CheckVehicle(part)
  3938. if InUseCar and RightCar then
  3939. Touch:Disconnect()
  3940. do
  3941. local Touched
  3942. local Parts = {}
  3943. for _, v in pairs(Crusher.Spikes:GetChildren()) do
  3944. v.CanCollide = false
  3945. end
  3946. Touched = Crusher.Bottom.Touched:connect(function()
  3947. Touched:Disconnect()
  3948. for _, v in pairs(Crusher.Spikes:GetChildren()) do
  3949. v.CanCollide = true
  3950. table.insert(Parts, v:GetTouchingParts())
  3951. end
  3952. Crusher.Destruction.DestroyParts:FireServer(Parts)
  3953. end)
  3954. wait(5)
  3955. Touched:Disconnect()
  3956. for _, v in pairs(Crusher.Spikes:GetChildren()) do
  3957. v.CanCollide = true
  3958. end
  3959. Parts = nil
  3960. ConnectTouch(Crusher)
  3961. end
  3962. else
  3963. Touch:Disconnect()
  3964. wait(5)
  3965. ConnectTouch(Crusher)
  3966. end
  3967. end
  3968. end
  3969. end)
  3970. end
  3971. ConnectTouch(workspace["All crushers"]["Spike Pit"])
  3972. ConnectTouch(workspace["All crushers"]["Spikewall Cannon Shot"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement