GTA 5 Mod Menu Lua Script

0% found this document useful (0 votes)
732 views2 pages
This Lua script creates an in-game mod menu for Grand Theft Auto V that is accessible by pressing F9. The menu contains options like giving money, spawning a vehicle, giving weapons, and cha…

Uploaded by

Adam Boushaj

function main()

while true do
if IsKeyJustPressed(VK_F9) then
local menu = {}
[Link] = "Mod Menu"
[Link] = {
{label = "Darte dinero", func = giveMoney},
{label = "Sacar auto", func = spawnVehicle},
{label = "Armas", func = giveWeapons},
{label = "Ropa", func = giveOutfit},
{label = "Regenerar vida", func = healPlayer},
}
createMenu(menu)
end
Wait(0)
end
end

function createMenu(menu)
local currentSelection = 1
local maxSelection = #[Link]
local menuOpen = true
while menuOpen do
ClearAllHelpMessages()
DrawMenuTitle([Link])
for i = 1, maxSelection do
local label = [Link][i].label
if i == currentSelection then
label = "-> " .. label .. " <-"
end
DrawMenuOption(label)
end
if IsControlJustPressed(1, 177) then -- Backspace
menuOpen = false
elseif IsControlJustPressed(1, 172) then -- Up arrow
if currentSelection > 1 then
currentSelection = currentSelection - 1
else
currentSelection = maxSelection
end
elseif IsControlJustPressed(1, 173) then -- Down arrow
if currentSelection < maxSelection then
currentSelection = currentSelection + 1
else
currentSelection = 1
end
elseif IsControlJustPressed(1, 176) then -- Enter
local func = [Link][currentSelection].func
func()
end
Wait(0)
end
end

function DrawMenuTitle(title)
SetTextFont(1)
SetTextProportional(0)
SetTextScale(0.0, 0.35)
SetTextColour(255, 255, 255, 255)
SetTextCentre(true)
SetTextDropShadow(0, 0, 0, 0, 255)
SetTextEdge(0, 0, 0, 0, 255)
SetTextEntry("STRING")
AddTextComponentString(title)
DrawText(0.5, 0.08)
end

function DrawMenuOption(text)
SetTextFont(1)
SetTextProportional(0)
SetTextScale(0.0, 0.35)
SetTextColour(255, 255, 255, 255)
SetTextCentre(true)
SetTextDropShadow(0, 0, 0, 0, 255)
SetTextEdge(0, 0, 0, 0, 255)
SetTextEntry("STRING")
AddTextComponentString(text)
DrawText(0.5, 0.2)
end

function giveMoney()
-- Código para dar dinero al jugador
end

function spawnVehicle()
-- Código para spawnear un vehículo al jugador
end

function giveWeapons()
-- Código para dar armas al jugador
end

function giveOutfit()
-- Código para cambiar la ropa del jugador
end

function healPlayer

You might also like