local function DrawRainbowText( frequency, str, font, x, y )
surface.SetFont( font )
surface.SetTextPos( x, y )
for i = 1, #str do
local col = HSVToColor( i * frequency % 360, 1, 1 ) -- Providing 3 numbers to surface.SetTextColor rather
surface.SetTextColor( col.r...