0% found this document useful (0 votes)
6 views4 pages

GGBYCYBERA

The document outlines a Lua script for a game mod menu that allows users to toggle various gameplay features and switch between English and Russian languages. It includes functions to create a user interface, update button texts based on the selected language, and enable gameplay modifications such as speed boosts and unlimited jumps. The script also saves the user's language preference for future sessions.

Uploaded by

annafirmalino
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

GGBYCYBERA

The document outlines a Lua script for a game mod menu that allows users to toggle various gameplay features and switch between English and Russian languages. It includes functions to create a user interface, update button texts based on the selected language, and enable gameplay modifications such as speed boosts and unlimited jumps. The script also saves the user's language preference for future sessions.

Uploaded by

annafirmalino
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

local language = Storage:Get("selectedLanguage") or "EN" -- Load saved language or

default to English

local texts = {
EN = {
speed = "Speed",
devFly = "DevFly",
unlimitedJump = "Unlimited Jump",
fastJump = "Fast Jump",
switchLang = "Switch to Russian"
},
RU = {
speed = "Скорость",
devFly = "Режим разработчика",
unlimitedJump = "Безграничный прыжок",
fastJump = "Быстрый прыжок",
switchLang = "Переключить на английский"
}
}

function GMHelper:CreateMenu()
local ui = UI:CreateWindow("Game Mods")

local function updateMenu()


ui:ClearElements()

ui:AddButton(texts[language].speed, function()
Game:EnableSpeedBoost()
UI:ShowMessage(texts[language].speed .. " enabled!")
end)

ui:AddButton(texts[language].devFly, function()
Game:EnableDevFly()
UI:ShowMessage(texts[language].devFly .. " enabled!")
end)

ui:AddButton(texts[language].unlimitedJump, function()
Game:EnableUnlimitedJump()
UI:ShowMessage(texts[language].unlimitedJump .. " enabled!")
end)

ui:AddButton(texts[language].fastJump, function()
Game:EnableFastJump()
UI:ShowMessage(texts[language].fastJump .. " enabled!")
end)

ui:AddButton(texts[language].switchLang, function()
language = (language == "EN") and "RU" or "EN"
Storage:Set("selectedLanguage", language) -- Save language preference
updateMenu()
end)
end

updateMenu()
ui:Show()
end

function GMHelper:ApplyLanguageToGuiGmMain()
local gui = GuiGmMain:GetInstance()
if gui then
gui:SetButtonText("speedButton", texts[language].speed)
gui:SetButtonText("devFlyButton", texts[language].devFly)
gui:SetButtonText("unlimitedJumpButton", texts[language].unlimitedJump)
gui:SetButtonText("fastJumpButton", texts[language].fastJump)
end
end

GMHelper:ApplyLanguageToGuiGmMain()local language = Storage:Get("selectedLanguage")


or "EN" -- Load saved language or default to English

local texts = {
EN = {
speed = "Speed",
devFly = "DevFly",
unlimitedJump = "Unlimited Jump",
fastJump = "Fast Jump",
switchLang = "Switch to Russian"
},
RU = {
speed = "Скорость",
devFly = "Режим разработчика",
unlimitedJump = "Безграничный прыжок",
fastJump = "Быстрый прыжок",
switchLang = "Переключить на английский"
}
}

function GMHelper:CreateMenu()
local ui = UI:CreateWindow("Game Mods")

local function updateMenu()


ui:ClearElements()

ui:AddButton(texts[language].speed, function()
Game:EnableSpeedBoost()
UI:ShowMessage(texts[language].speed .. " enabled!")
end)

ui:AddButton(texts[language].devFly, function()
Game:EnableDevFly()
UI:ShowMessage(texts[language].devFly .. " enabled!")
end)

ui:AddButton(texts[language].unlimitedJump, function()
Game:EnableUnlimitedJump()
UI:ShowMessage(texts[language].unlimitedJump .. " enabled!")
end)

ui:AddButton(texts[language].fastJump, function()
Game:EnableFastJump()
UI:ShowMessage(texts[language].fastJump .. " enabled!")
end)

ui:AddButton(texts[language].switchLang, function()
language = (language == "EN") and "RU" or "EN"
Storage:Set("selectedLanguage", language) -- Save language preference
updateMenu()
end)
end

updateMenu()
ui:Show()
end

function GMHelper:ApplyLanguageToGuiGmMain()
local gui = GuiGmMain:GetInstance()

if gui then
gui:SetButtonText("speedButton", texts[language].speed)
gui:SetButtonText("devFlyButton", texts[language].devFly)
gui:SetButtonText("unlimitedJumpButton", texts[language].unlimitedJump)
gui:SetButtonText("fastJumpButton", texts[language].fastJump)
end
end

GMHelper:ApplyLanguageToGuiGmMain()local language = Storage:Get("selectedLanguage")


or "EN" -- Load saved language or default to English

local texts = {
EN = {
speed = "Speed",
devFly = "DevFly",
unlimitedJump = "Unlimited Jump",
fastJump = "Fast Jump",
switchLang = "Switch to Russian"
},
RU = {
speed = "Скорость",
devFly = "Режим разработчика",
unlimitedJump = "Безграничный прыжок",
fastJump = "Быстрый прыжок",
switchLang = "Переключить на английский"
}
}

function GMHelper:CreateMenu()
local ui = UI:CreateWindow("Game Mods")

local function updateMenu()


ui:ClearElements()

ui:AddButton(texts[language].speed, function()
Game:EnableSpeedBoost()
UI:ShowMessage(texts[language].speed .. " enabled!")
end)

ui:AddButton(texts[language].devFly, function()
Game:EnableDevFly()
UI:ShowMessage(texts[language].devFly .. " enabled!")
end)

ui:AddButton(texts[language].unlimitedJump, function()
Game:EnableUnlimitedJump()
UI:ShowMessage(texts[language].unlimitedJump .. " enabled!")
end)
ui:AddButton(texts[language].fastJump, function()
Game:EnableFastJump()
UI:ShowMessage(texts[language].fastJump .. " enabled!")
end)

ui:AddButton(texts[language].switchLang, function()
language = (language == "EN") and "RU" or "EN"
Storage:Set("selectedLanguage", language) -- Save language preference
updateMenu()
end)
end

updateMenu()
ui:Show()
end

function GMHelper:ApplyLanguageToGuiGmMain()
local gui = GuiGmMain:GetInstance()

if gui then
gui:SetButtonText("speedButton", texts[language].speed)
gui:SetButtonText("devFlyButton", texts[language].devFly)
gui:SetButtonText("unlimitedJumpButton", texts[language].unlimitedJump)
gui:SetButtonText("fastJumpButton", texts[language].fastJump)
end
end

GMHelper:ApplyLanguageToGuiGmMain()Make In Panel btn language like ru when you


click give you msg exit game and join to apply language

You might also like