-- Triggered when player clicks a block local function clickblock(event) local playerid = event.eventobjid -- Clicking player's ID local uiid = "6986982063319417057" -- Replace with your UI ID local elementid = "6986982063319417057_1" -- Replace with text element ID local color = 0xff0000 -- Red color (RRGGBB format) -- Change the text element color Customui:setColor(playerid, uiid, elementid, color) end ScriptSupportEvent:registerEvent([=[Player.ClickBlock]=], clickblock)