--BROUGHT TO YOU BY RobloxScripter.com!--
local services = setmetatable({}, {
__index = function(t, service)
return game:GetService(service);
end;
})
local config_map = {};
for i, v in next, services.ReplicatedStorage.Vehicles:GetChildren() do
if (not v:FindFirstChild("PlaneSettings")) then continue end;
config_map[v.Name] = require(v.PlaneSettings);
end;
local cfg = {
higherKnots = false;
};
local function modifyPlane(plane)
local settings = require(plane.PlaneSettings);
settings.MaxVelocity = cfg.higherKnots and 3000 or config_map[plane.Name].MaxVelocity;
end;
local spawnedVehicles = services.Workspace.SpawnedVehicles;
spawnedVehicles.ChildAdded:Connect(function(plane)
plane:WaitForChild("PlaneSettings");
print("how")
modifyPlane(plane);
end);
local function syncSettings()
for i, v in next, spawnedVehicles:GetChildren() do
if (not v:FindFirstChild("PlaneSettings")) then continue end;
modifyPlane(v);
end;
end;
local function setSetting(name, value)
cfg[name] = value;
syncSettings();
end;
getgenv().setSetting = setSetting;