i got problem on this script
what is problem? i writing correct code (like twitter code system) but returning “false 1”
script ;
game:GetService("ReplicatedStorage"):WaitForChild("RedeemSystem").OnServerEvent:Connect(function(Plr, RedeemBox)
print("Responsed")
local ModuleV = game:GetService("InsertService"):GetLatestAssetVersionAsync(9071950264)
local LoadModule = game:GetService("InsertService"):LoadAssetVersion(ModuleV)
local TableC = require(LoadModule:WaitForChild("MainModule"))
for _,Code in pairs(TableC) do
for Index,UsedCode in pairs(profile.Data["Used Codes"]) do
local CodeText = RedeemBox.Text:lower():find(Code[1]:lower())
local UsedCodeText = RedeemBox.Text:lower():find(UsedCode:lower())
if CodeText then
if UsedCodeText then
print("false 2")
else
print("true")
profile.Data["Money"] += Code[2]
table.insert(profile.Data["Used Codes"], Code[1])
print(profile.Data["Used Codes"])
end
else
print("false 1")
end
end
end
LoadModule:Destroy()
end)
codes module;
return {
{"TestCode", 500},
}