Advertisement
Honansik

Eight Driver Car Racing GUI Script [Stats Car Modifier]

Dec 10th, 2021
3,145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.24 KB | None | 0 0
  1. local function Create()
  2. local library = loadstring(game:HttpGet(('https://raw.githubusercontent.com/AikaV3rm/UiLib/master/Lib.lua')))()
  3.  
  4. local win = library:CreateWindow("Water")
  5.  
  6. local main = win:CreateFolder("Vehicle Tuning")
  7. local other = win:CreateFolder("Stat Tuning")
  8.  
  9. local Player = game:GetService("Players").LocalPlayer
  10. local current_selected = ""
  11. local current_item = nil;
  12. local current_stat = nil;
  13.  
  14. local SelectPlayer;
  15. local function GetPlayers()
  16. local plr = {"None"}
  17. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  18. table.insert(plr, v.Name)
  19. end
  20. return plr
  21. end
  22.  
  23. local function UpdateVehicle(Spec, Value)
  24. local a,b = pcall(function()
  25. local args = {
  26. [1] = "UpdateVal",
  27. [2] = Spec,
  28. [3] = Value
  29. }
  30.            
  31.            local whatever = Spec;
  32.            local tries = 0;
  33.            
  34.            while whatever.ClassName ~= "VehicleSeat" do
  35.                wait()
  36.                tries = tries+1;
  37.                
  38.                if tries >= 5 then break end;
  39.                whatever = whatever.Parent
  40.            end
  41.    whatever.Server.RemoteEvent:FireServer(unpack(args))
  42. end)
  43. print(a, b)
  44. end
  45.  
  46. local function CustomSpoof(Spec, Value, Remote)
  47. local a,b = pcall(function()
  48. local args = {
  49. [1] = "UpdateVal",
  50. [2] = Spec,
  51. [3] = Value
  52. }
  53.            
  54.    Remote:FireServer(unpack(args))
  55. end)
  56. print(a, b)
  57. end
  58.  
  59. local display_value = main:Label("Info",{
  60.        TextSize = 25; -- Self Explaining
  61.        TextColor = Color3.fromRGB(255,255,255);
  62.        BgColor = Color3.fromRGB(69,69,69);
  63.    })
  64.  
  65. SelectPlayer = main:Dropdown("Select Player", GetPlayers(), true, function(cur)
  66. if cur == "None" then return end
  67. Player = game:GetService("Players")[cur]
  68. SelectPlayer:Refresh(GetPlayers())
  69. end)
  70.  
  71. other:Dropdown("Stat", {"None", "Drift", "Exp", "Lvl"}, true, function(cur)
  72. if cur == "None" then return end
  73. current_stat = Player.leaderstats[cur]
  74. end)
  75.  
  76. other:Box("Spoof Integer","number", function(value)
  77. if current_stat == nil then return end
  78.        if current_selected == nil then return end
  79.  
  80. if type(current_stat.Value) == "number" then
  81.    for i,v in pairs(Player.Character:GetChildren()) do
  82.     if v:IsA"Model" then
  83.     if v.Name == current_selected then
  84.            CustomSpoof(current_stat, value, v.DriveSeat.Server.RemoteEvent);
  85.     end
  86.    end
  87. end
  88. else
  89. warn("[-Error-] cannot spoof: " .. type(current_stat) .. " as integer")
  90. end
  91. end)
  92.  
  93. local function GetCars()
  94. local cars = {"None"};
  95. for i,v in pairs(Player.Character:GetChildren()) do
  96. if v:IsA"Model" then
  97. table.insert(cars, v)
  98. end
  99. end
  100. return cars
  101. end
  102.  
  103. local specs = {
  104. ["Userdata"] = {},
  105. ["Name"] = {};
  106. };
  107.    
  108. local display_data;
  109. display_data = main:Dropdown("Select Display", {"None"}, true, function(cur)
  110. if cur == "None" then return end
  111. for i,v in pairs(specs.Userdata) do
  112. if v.Name == cur then
  113. current_item = v;
  114. display_value:Refresh("Value: " .. v.Value)
  115. end
  116. end
  117. end)
  118.  
  119. local list;
  120. list = main:Dropdown("Select Car", GetCars(), true, function(car)
  121. if car == "None" then list:Refresh(GetCars()) return end
  122. current_selected = car;
  123.  
  124. specs = {
  125. ["Userdata"] = {},
  126. ["Name"] = {};
  127. };
  128.  
  129. for i,v in pairs(Player.Character:GetChildren()) do
  130. if v:IsA"Model" then
  131. if v.Name == current_selected then
  132. if v.DriveSeat.Specs ~= nil then
  133. for ii,vv in pairs(v.DriveSeat.Specs:GetDescendants()) do
  134. table.insert(specs["Userdata"], vv)
  135. table.insert(specs["Name"], vv.Name)
  136. end
  137. end
  138. end
  139. end
  140. end
  141.  
  142. display_data:Refresh(specs["Name"])
  143. end)
  144.  
  145. main:Box("Spoof Integer","number", function(value)
  146. if current_item == nil then return end
  147.  
  148. if type(current_item.Value) == "number" then
  149. UpdateVehicle(current_item, value);
  150. else
  151. warn("[-Error-] cannot spoof: " .. type(current_item) .. " as integer")
  152. end
  153. end)
  154.  
  155. main:Box("Spoof String","string", function(value)
  156. if current_item == nil then return end
  157.  
  158. if type(current_item.Value) == "string" then
  159. UpdateVehicle(current_item, value);
  160. else
  161. warn("[-Error-] cannot spoof: " .. type(current_item) .. " as string")
  162. end
  163. end)
  164.  
  165. main:Button("Give 10000 money", function()
  166.    local args = {
  167.            [1] = "Sanctioned",
  168.            [2] = -10000,
  169.            [3] = "372434240",
  170.            [4] = {}
  171.        }
  172.        
  173.        game:GetService("ReplicatedStorage").RemoteEvent:FireServer(unpack(args))
  174. end)
  175. end
  176.  
  177. Create()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement