-- Define a table of cheat options
local cheatOptions = {
{name = "No Damage", enabled = false},
{name = "Infinite Money", enabled = false},
{name = "Infinite Nitro", enabled = false}
}
-- Function to print centered text
local function printCentered(text)
local lineLength = 40
local margin = math.floor((lineLength - string.len(text)) / 2)
print(string.rep(" ", margin) .. text)
end
-- Function to display the cheat menu
local function displayCheatMenu()
printCentered("===== Game Extreme Car Driving Simulator Cheat Menu =====")
for i, option in ipairs(cheatOptions) do
print(i .. ". " .. option.name .. ": " .. (option.enabled and "ON" or "OFF"))
end
printCentered("====================================================")
end
-- Function to toggle a cheat option by its index
local function toggleCheatOption(index)
if cheatOptions[index] then
cheatOptions[index].enabled = not cheatOptions[index].enabled
end
end
-- Function to toggle a cheat option by its name
local function toggleCheatOptionByName(name)
for i, option in ipairs(cheatOptions) do
if option.name == name then
option.enabled = not option.enabled
return
end
end
print("Cheat option not found")
end
-- Function to exit the game
local function exitGame()
os.exit()
end
-- Game loop
while true do
-- Display the cheat menu
displayCheatMenu()
-- Get user input
print("Enter a cheat option to toggle (or 'exit' to quit):")
local input = io.read()
if input == "exit" then
-- Exit the game
exitGame()
else
-- Try to toggle cheat option by its name
toggleCheatOptionByName(input)
end
end
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}