[HELP] Popup GUI

Hey guys! This is my current code for showing a help box if you press F6 then it should show it. The problem is that it won’t show it and my coding skills are very horrible. Please help!

Current Code:

showhelp = false

Citizen.CreateThread(function()
	while true do
		Wait(1)

		if IsControlJustReleased(1, 167) then
			if not showhelp then
				showhelp = true
				SendNUIMessage({
					showhelp = true
				})
			else
				showhelp = false
				SendNUIMessage({
					hidehelp = true
					end
				end
			end
		end
		
		if showhelp then
		TriggerEvent (function DrawAdvancedText(0.581, 0.16, 0.005, 0.0028, 0.485, "Help text goes here")
    SetTextFont(font)
    SetTextProportional(0)
    SetTextScale(sc, sc)
	N_0x4e096588b13ffeca(jus)
    SetTextColour(167, 233, 255, 255)
    SetTextDropShadow(0, 0, 0, 0,255)
    SetTextEdge(1, 0, 0, 0, 255)
    SetTextOutline()
    SetTextEntry("STRING")
    AddTextComponentString(text)
	DrawText(x - 0.1+w, y - 0.02+h));
	
		TriggerEvent (function DrawRect(0.493, 0.386, 0.45, 0.536, 0, 0, 0, 150)
    SetTextFont(font)
    SetTextProportional(0)
    SetTextScale(sc, sc)
	N_0x4e096588b13ffeca(jus)
    SetTextColour(0, 0, 0, 0)
    SetTextDropShadow(0, 0, 0, 0,255)
    SetTextEdge(1, 0, 0, 0, 255)
    SetTextOutline()
    SetTextEntry("STRING")
    AddTextComponentString(text)
	DrawText(x - 0.1+w, y - 0.02+h));
	end
end)
1 Like