I need help on Ui

so i made two buttons i quite like the the hats one the help i need is the one for the colours one i need like a icon but my dumb mind wont come up with a good idea so i was wounding if one of you genius have a idea
UIsd

1 Like

Maybe a rainbow icon? Vibrant and multicolored

Add a UIPadding object into the buttons and add some distance in the left and right so the text doesn’t collide with the border.

Make it rainbow the hat with this script

-- Get the ViewportFrame object
local viewportFrame = script.Parent -- Assume the ViewportFrame is the parent of this script

-- Define the rainbow colors in Color3
local rainbowColors = {
	Color3.fromRGB(255, 0, 0),
	Color3.fromRGB(255, 255, 0),
	Color3.fromRGB(0, 255, 0),
	Color3.fromRGB(0, 255, 255),
	Color3.fromRGB(0, 0, 255),
	Color3.fromRGB(255, 0, 255),
}

-- Get TweenService
local TweenService = game:GetService("TweenService")

-- Function to tween between two colors
local function tweenColor(startColor, endColor, duration)
	local tweenInfo = TweenInfo.new(duration, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, -1, true)
	local goal = {ImageColor = endColor}  -- Goal to tween to the endColor
	local tween = TweenService:Create(viewportFrame, tweenInfo, goal)
	tween:Play()
end

-- Function to cycle through rainbow colors smoothly
local function cycleRainbowColors()
	while true do
		for i = 1, #rainbowColors do
			local nextColor = rainbowColors[(i % #rainbowColors) + 1] -- Get the next color, loop back to the first after the last
			tweenColor(rainbowColors[i], nextColor, 2)  -- Duration set to 2 seconds for smooth transition
			wait(2)  -- Wait for the transition to complete before starting the next
		end
	end
end

-- Start the rainbow color transition
cycleRainbowColors()

1 Like

thank you this does work and the only problem is that it only changes the white band but ik theres no way to fix it so thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.