In my Base Control Program I define a callback function:
local function getClick(_, _, x, y, _, _)
if x > 44 and x < 50 and y == 4 and active == false then
setStatus(true)
elseif x > 44 and x < 50 and y == 4 and active == true then
setStatus(false)
elseif x > 44 and x < 50 and y == 6 and safety == false then
safety = true
elseif x > 44 and x < 50 and y == 6 and safety == true then
safety = false
elseif x > 44 and x < 50 and y == 20 and spawnEnder == false then
setSpawnEnder(true)
elseif x > 44 and x < 50 and y == 20 and spaw