Hello! I need help with this script. Ive been trying to change the color of the gui text based off of the table they are in. I want to be able to just put them in the table then it checks if its in common or uncommon etc, then sets the right color for that table, common being white, uncommon being green etc. Basically if lets say “OFA” was in uncommon it would be green but if it was in PlusUltra it will be Golden, its like a auto switch depending on the table it is in, and i want to be able to add multiple strings per each table, like “Regeneration” and “OFA” if they were both in common if i had either one of them my text would be white.
Script
script.Parent:WaitForChild(“QuirkChanger”)
local player = game.Players.LocalPlayer
local character = player.Character
local humanoid = character:WaitForChild(“Humanoid”)
local Common = {
}
local Uncommon = {
}
local Rare = {
}
local PlusUltra = {
“OFA”
}
while wait(5) do
local Quirk = script.Parent:WaitForChild(“QuirkName”)
Quirk.Text = game.StarterGui.Values.Abillity.Value
if game.StarterGui.Values.Abillity.Value == Common then
Quirk.TextColor3 = Color3.fromRGB(212,200,255)
elseif game.StarterGui.Values.Abillity.Value == Uncommon then
Quirk.TextColor3 = Color3.fromRGB(50,205,50)
elseif game.StarterGui.Values.Abillity.Value == Rare then
Quirk.TextColor3 = Color3.fromRGB(50,50,205)
elseif game.StarterGui.Values.Abillity.Value == PlusUltra then
Quirk.TextColor3 = Color3.fromRGB(212,175,55)
end
end