-- This function executes when a player clicks a block local function clickblock(event) local playerid = event.eventobjid -- Player ID who clicked the block local uiid = "6986982063319417057" -- Replace with your UI ID local elementid = "6986982063319417057_3" -- Replace with your image element ID local url = "block_100" -- Replace with your texture ID -- Set the texture for the player's UI image element Customui:setTexture(playerid, uiid, elementid, url) end -- Register event for Player.ClickBlock ScriptSupportEvent:registerEvent([=[Player.ClickBlock]=], clickblock)