and then the portals because I practically created new portals but none of them work only the first 3 but I did copy and paste it goes well for the twitter code script I think it's fine I just need to know where to put the codes thanks
THIS IS THE CODE SCRIPT: local ds = game:GetService("DataStoreService"):GetDataStore("-tCodes01")
game.Players.PlayerAdded:Connect(function(player) local key = "codes-"..player.userId local folder = Instance.new("Folder",player) folder.Name = "Codes" local save = ds:GetAsync(key) if save then for i = 1,#save do local temp = Instance.new("BoolValue",folder) temp.Name = save[i] end end end)
game.ReplicatedStorage.EnterCode.OnServerEvent:Connect(function(player,reward,code) local key = "codes-"..player.userId local currency = player.leaderstats:FindFirstChild("Clicks") -- Name of your currency currency.Value = currency.Value + reward
local bool = Instance.new("BoolValue",player.Codes)
bool.Name = code
bool.Value = true
local activated = {}
for i,v in pairs(player.Codes:GetChildren()) do
if v:isA("BoolValue") then
table.insert(activated, v.Name)
ds:SetAsync(key,activated)
end
end
end)

1 comment
the script is for Twitter codes