This is a script I made for a rainbow GUI. You can change the script manually to be a rainbow border, text, background color, and anything like that.

local button = script.Parent

function zigzag(X) return math.acos(math.cos(X*math.pi))/math.pi end
counter = 0
while wait(0.1)do
 button.BorderColor3 = Color3.fromHSV(zigzag(counter),1,1) --you can change BorderColor3
 counter = counter + 0.01
end