try this
ocal color = tocolor(255, 255, 255, 255)
function onClientCursorMove( x, y, absX, absY )
if isInBox( absX, absY ,482, 482 + 124, 330, 330+124) then
color = tocolor(255, 0, 0, 255)
else
color = tocolor(255, 255, 255, 255)
end
end
addEventHandler( "onClientCursorMove", getRootElement( ), onClientCursorMove )
addEventHandler("onClientRender", root, function()
dxDrawText("RaysMTA", 482, 330, 537, 344, color, 1.00, font)
end
)
function isInBox( x, y, xmin, xmax, ymin, ymax)
if x and y and xmin and xmax and ymax and ymin then
return x >= xmin and x <= xmax and y >= ymin and y <= ymax
end
end