#i need critiquing

1 messages · Page 1 of 1 (latest)

ancient robin
#

Alot of your code is repeating itself, instead of writing out the same thing but changing one word, you could use a for loop to set everything up for each customisable thing

#

Like so:

local customizables = {
    ["race"] = {
        Application = function() end,
        Text = function() end
    },
    ["height"] = {
        Application = function() end,
        Text = function() end
    },
    ["bulk"] = {
        Application = function() end,
        Text = function() end
    },
}

for customization, funcs in customizables do    
    page1[customization].up.MouseButton1Click:Connect(function()
        -- Code here
    end)
    
    page1[customization].down.MouseButton1Click:Connect(function()
        -- Code here
    end)
    
    funcs.Application() -- Apply the customization
    funcs.Text() -- Updating text
end

local attribute = "bulk" -- Just an example

customizables[attribute].Application()
customizables[attribute].Text()

This code is just an example so don't copy and paste it, but you can do something similar with your code.