room.onPlayerBallKick = function(player) lastMove[player.id] = Date.now(); ;
room.onGoal = function(goalInfo) const scorer = goalInfo.player.name; const team = goalInfo.team === 1 ? "Red" : "Blue"; room.sendAnnouncement( ⚽ GOAL! $scorer ($team) scores! , -1, 0xFFD700); ; haxball script
// AFK detection (simple) const lastMove = {}; room.sendAnnouncement( ⚽ GOAL! $scorer ($team) scores!