Twitter code GUI for a tycoon

Hello there,

I’m working on a Tycoon but i want to add a twitter code GUI but it doesn’t work for me :sad:.
I tryed to use free models but that didn’t help then i started to try it myself didn’t work either.
Can someone help me with it pls?

(I’m also using a save trigger for the tycoons)

Oh, you need to add scripts to your GUI. Do you have a model of that?

Ok do this:

--local script -- tell me if you wanna save it so it cant be reused
local codes = {
    "CodeName";
    "CodeAgain";
    "CodeAgain";
}

local textBox = --whereever it is located

for _, code in pairs(codes) do
    if textBox.Text = tostring(code) then
        table.remove(codes,code)
        -- rest of code
    end
end

yes i want it to let it save so ppl can’t reuse the twitter code

Ok then do this:

local DDS = game:GetService("DataStoreService")
local codeStore = DDS:GetDataStore("codeStore")

local codes = {
    "Code";
    "Code";
    "Code";
}

if not codeStore:GetAsync(codes) then
    codeStore:GetAsync(codes)
end

local box = --whereever located

for _, codeName in pairs(codeStore:SetAsync(codes)) do
    if box.Text == tostring(codeName) then
        table.remove(codes,codeName)

        --rest of code tell me if not working
    end
end