--BROUGHT TO YOU BY RobloxScripter.com!--
local RepStorage = game:GetService("ReplicatedStorage")
local StarterGui = game:GetService("StarterGui")
local Limiteds = RepStorage.Limitteds
local Items = RepStorage.Items
local ModuloEXP do
ModuloEXP = function(A, B, C)
if B == 0 then
return 1;
end;
if B % 2 ~= 0 then
return A % C * ModuloEXP(A, B - 1, C) % C;
end;
local EXP = ModuloEXP(A, B / 2, C);
return EXP * EXP % C;
end;
end
Limiteds.ChildAdded:Connect(function(Obj)
local Price = Obj:WaitForChild("Price").Value
local ID = Obj:WaitForChild("AssetID").Value
local Title = Obj:WaitForChild("Title").Value
local TotalLimiteds = table.getn(Limiteds:GetChildren())
local EXP = ModuloEXP(TotalLimiteds, 5, 6059)
local StartedBuying = tick()
repeat
Items:InvokeServer(Price, ID, Title, EXP)
until (Items:InvokeServer(Price, ID, Title, EXP) == true) or (tick() - StartedBuying > 1.5)
StarterGui:SetCore("SendNotification", {
Title = "AutoBuy",
Text = "Attempted to autobuy " .. Obj.Name .. '! (Check chat for confirmation)',
Duration = 5,
Button1 = "Okay"
})
end)