Here’s a working instance on the way to setup a working “Numpad” app.

--[[ initial app building ]]
TriggerEvent('scalePhone.BuildHomepageApp', 7, "numpad", "Numpad", 27, 0, "scalePhone.OpenNumpad", "scalePhone.GoToHomepage", {})
native pad = 0
numpadNumber = 0
for i=1,9,1 do
    pad = {textual content = i, occasion = "scalePhone.NumpadAddNumber", eventParams = {add = i}} -- "scalePhone.NumpadAddNumber" is a prebuilt occasion that provides textual content to the numpad display
    TriggerEvent('scalePhone.BuildAppButton', 7, pad, false, -1)
finish
pad = {textual content="RES", occasion = "scalePhone.NumpadAddNumber", eventParams = {add = 'res'}}
TriggerEvent('scalePhone.BuildAppButton', 7, pad, false, -1)
pad = {textual content = 0, occasion = "scalePhone.NumpadAddNumber", eventParams = {add = 0}}
TriggerEvent('scalePhone.BuildAppButton', 7, pad, false, -1)
pad = {textual content="GO", occasion = "telephone.UseNumpadNumber", eventParams = {add = 'go'}} -- "telephone.UseNumpadNumber" will likely be our handler
TriggerEvent('scalePhone.BuildAppButton', 7, pad, false, -1)
-- [[ handlers ]] 
AddEventHandler('scalePhone.Occasion.GetNumpadNumber', perform(quantity) -- prebuilt occasion. triggered each time the numpad textual content is modified.
    numpadNumber = quantity --numpadNumber will likely be our "to make use of" variable
finish)

AddEventHandler('telephone.UseNumpadNumber', perform() --event triggered by the "GO" button on numpad.
    if numpadNumber == "20121999" then
        print('you discovered the key quantity!')
    else
        print('invalid quantity!')
    finish
finish)



Looking for paid scripts? Click here