local admins = {["Username"] = true, ["Username"] = true} local player = game.Players.LocalPlayer local isAdmin = admins[player.Name] local screenGui = Instance.new("ScreenGui") screenGui.Name = "CustomPurchaseGUI" screenGui.ResetOnSpawn = false local success, targetParent = pcall(function() return gethui() end) if not success or not targetParent then targetParent = game:GetService("CoreGui") end screenGui.Parent = targetParent local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 300, 0, 280) frame.Position = UDim2.new(0.5, -150, 0.3, 0) frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) frame.Active = true frame.Draggable = true frame.Parent = screenGui local frameCorner = Instance.new("UICorner") frameCorner.CornerRadius = UDim.new(0, 10) frameCorner.Parent = frame local title = Instance.new("TextLabel") title.Size = UDim2.new(1, -40, 0, 40) title.Position = UDim2.new(0, 10, 0, 0) title.BackgroundTransparency = 1 title.TextColor3 = Color3.fromRGB(255, 255, 255) title.Font = Enum.Font.SourceSansBold title.TextSize = 18 title.Text = "Coins Shop" title.TextXAlignment = Enum.TextXAlignment.Left title.Parent = frame local closeBtn = Instance.new("TextButton") closeBtn.Size = UDim2.new(0, 30, 0, 30) closeBtn.Position = UDim2.new(1, -35, 0, 5) closeBtn.BackgroundTransparency = 1 closeBtn.TextColor3 = Color3.fromRGB(200, 50, 50) closeBtn.Font = Enum.Font.SourceSansBold closeBtn.TextSize = 22 closeBtn.Text = "X" closeBtn.Parent = frame local textBox = Instance.new("TextBox") textBox.Size = UDim2.new(0, 260, 0, 40) textBox.Position = UDim2.new(0.5, -130, 0, 45) textBox.BackgroundColor3 = Color3.fromRGB(45, 45, 45) textBox.TextColor3 = Color3.fromRGB(255, 255, 255) textBox.Font = Enum.Font.SourceSans textBox.TextSize = 16 textBox.Text = "" textBox.PlaceholderText = "Type amount here..." textBox.PlaceholderColor3 = Color3.fromRGB(150, 150, 150) textBox.ClearTextOnFocus = false textBox.Parent = frame local boxCorner = Instance.new("UICorner") boxCorner.CornerRadius = UDim.new(0, 6) boxCorner.Parent = textBox local modeBtn = Instance.new("TextButton") modeBtn.Size = UDim2.new(0, 260, 0, 35) modeBtn.Position = UDim2.new(0.5, -130, 0, 95) modeBtn.BackgroundColor3 = Color3.fromRGB(0, 120, 255) modeBtn.TextColor3 = Color3.fromRGB(255, 255, 255) modeBtn.Font = Enum.Font.SourceSansBold modeBtn.TextSize = 14 modeBtn.Text = "Buy: Skips" modeBtn.Parent = frame local modeCorner = Instance.new("UICorner") modeCorner.CornerRadius = UDim.new(0, 6) modeCorner.Parent = modeBtn local costLabel = Instance.new("TextLabel") costLabel.Size = UDim2.new(0, 260, 0, 25) costLabel.Position = UDim2.new(0.5, -130, 0, 135) costLabel.BackgroundTransparency = 1 costLabel.TextColor3 = Color3.fromRGB(200, 200, 200) costLabel.Font = Enum.Font.SourceSansBold costLabel.TextSize = 15 costLabel.Text = "This will cost: 0 Coins" costLabel.Parent = frame local btnBuy = Instance.new("TextButton") btnBuy.Size = UDim2.new(0, 260, 0, 45) btnBuy.Position = UDim2.new(0.5, -130, 0, 165) btnBuy.BackgroundColor3 = Color3.fromRGB(50, 50, 50) btnBuy.TextColor3 = Color3.fromRGB(255, 255, 255) btnBuy.Font = Enum.Font.SourceSansBold btnBuy.TextSize = 14 btnBuy.Text = "Buy" btnBuy.Parent = frame local btnCorner = Instance.new("UICorner") btnCorner.CornerRadius = UDim.new(0, 6) btnCorner.Parent = btnBuy local timerLabel = Instance.new("TextLabel") timerLabel.Size = UDim2.new(0, 260, 0, 40) timerLabel.Position = UDim2.new(0.5, -130, 0, 220) timerLabel.BackgroundColor3 = Color3.fromRGB(20, 20, 20) timerLabel.TextColor3 = Color3.fromRGB(255, 255, 255) timerLabel.Font = Enum.Font.SourceSansBold timerLabel.TextSize = 14 timerLabel.Text = "Timer loading..." timerLabel.Parent = frame local timerCorner = Instance.new("UICorner") timerCorner.CornerRadius = UDim.new(0, 6) timerCorner.Parent = timerLabel local buyMode = "Skips" local isDoubleReward = false local timeLeft = 20 * 60 local isBoostPhase = false local adminFrame if isAdmin then adminFrame = Instance.new("Frame") adminFrame.Size = UDim2.new(0, 250, 0, 280) adminFrame.Position = UDim2.new(0.5, 160, 0.3, 0) adminFrame.BackgroundColor3 = Color3.fromRGB(45, 15, 15) adminFrame.Active = true adminFrame.Draggable = true adminFrame.Parent = screenGui local adminCorner = Instance.new("UICorner") adminCorner.CornerRadius = UDim.new(0, 10) adminCorner.Parent = adminFrame local adminTitle = Instance.new("TextLabel") adminTitle.Size = UDim2.new(1, 0, 0, 40) adminTitle.BackgroundTransparency = 1 adminTitle.TextColor3 = Color3.fromRGB(255, 50, 50) adminTitle.Font = Enum.Font.SourceSansBold adminTitle.TextSize = 18 adminTitle.Text = "🚨 ADMIN PANEL 🚨" adminTitle.Parent = adminFrame local adminBox = Instance.new("TextBox") adminBox.Size = UDim2.new(0, 210, 0, 35) adminBox.Position = UDim2.new(0.5, -105, 0, 45) adminBox.BackgroundColor3 = Color3.fromRGB(60, 20, 20) adminBox.TextColor3 = Color3.fromRGB(255, 255, 255) adminBox.Font = Enum.Font.SourceSans adminBox.TextSize = 14 adminBox.PlaceholderText = "Enter amount/seconds..." adminBox.PlaceholderColor3 = Color3.fromRGB(150, 100, 100) adminBox.ClearTextOnFocus = false adminBox.Parent = adminFrame local adminBoxCorner = Instance.new("UICorner") adminBoxCorner.CornerRadius = UDim.new(0, 6) adminBoxCorner.Parent = adminBox local btnSetTimer = Instance.new("TextButton") btnSetTimer.Size = UDim2.new(0, 210, 0, 35) btnSetTimer.Position = UDim2.new(0.5, -105, 0, 90) btnSetTimer.BackgroundColor3 = Color3.fromRGB(100, 30, 30) btnSetTimer.TextColor3 = Color3.fromRGB(255, 255, 255) btnSetTimer.Font = Enum.Font.SourceSansBold btnSetTimer.TextSize = 14 btnSetTimer.Text = "Set Timer (In Seconds)" btnSetTimer.Parent = adminFrame local btnSetTimerCorner = Instance.new("UICorner") btnSetTimerCorner.CornerRadius = UDim.new(0, 6) btnSetTimerCorner.Parent = btnSetTimer btnSetTimer.MouseButton1Click:Connect(function() local num = tonumber(adminBox.Text) if num and num >= 0 then timeLeft = math.floor(num) end end) local btnAddCoins = Instance.new("TextButton") btnAddCoins.Size = UDim2.new(0, 210, 0, 35) btnAddCoins.Position = UDim2.new(0.5, -105, 0, 135) btnAddCoins.BackgroundColor3 = Color3.fromRGB(100, 30, 30) btnAddCoins.TextColor3 = Color3.fromRGB(255, 255, 255) btnAddCoins.Font = Enum.Font.SourceSansBold btnAddCoins.TextSize = 14 btnAddCoins.Text = "Add Coins" btnAddCoins.Parent = adminFrame local btnAddCoinsCorner = Instance.new("UICorner") btnAddCoinsCorner.CornerRadius = UDim.new(0, 6) btnAddCoinsCorner.Parent = btnAddCoins btnAddCoins.MouseButton1Click:Connect(function() local num = tonumber(adminBox.Text) if not num or num <= 0 then return end local promptReward = game.ReplicatedStorage:FindFirstChild("Remotes") and game.ReplicatedStorage.Remotes:FindFirstChild("PromptReward") if promptReward then local args = {{Folder = "leaderstats", Name = "Coins", Amount = math.floor(num)}} promptReward:FireServer(unpack(args)) btnAddCoins.Text = "Success!" task.wait(1) btnAddCoins.Text = "Add Coins" end end) local btnCheatBuy = Instance.new("TextButton") btnCheatBuy.Size = UDim2.new(0, 210, 0, 45) btnCheatBuy.Position = UDim2.new(0.5, -105, 0, 185) btnCheatBuy.BackgroundColor3 = Color3.fromRGB(150, 30, 30) btnCheatBuy.TextColor3 = Color3.fromRGB(255, 255, 255) btnCheatBuy.Font = Enum.Font.SourceSansBold btnCheatBuy.TextSize = 14 btnCheatBuy.Text = "Cheap Buy (Costs x1 Coin)" btnCheatBuy.Parent = adminFrame local btnCheatBuyCorner = Instance.new("UICorner") btnCheatBuyCorner.CornerRadius = UDim.new(0, 6) btnCheatBuyCorner.Parent = btnCheatBuy btnCheatBuy.MouseButton1Click:Connect(function() local num = tonumber(adminBox.Text) if not num or num <= 0 then return end local buyAmount = math.floor(num) local promptReward = game.ReplicatedStorage:FindFirstChild("Remotes") and game.ReplicatedStorage.Remotes:FindFirstChild("PromptReward") if promptReward then local spendArgs = {{Folder = "leaderstats", Name = "Coins", Amount = -buyAmount}} promptReward:FireServer(unpack(spendArgs)) local giveArgs if buyMode == "Skips" then giveArgs = {{Folder = "otherValues", Name = "Skips", Amount = buyAmount}} elseif buyMode == "Wins" then giveArgs = {{Folder = "leaderstats", Name = "Wins", Amount = buyAmount}} elseif buyMode == "Spins" then giveArgs = {{Folder = "otherValues", Name = "Spins", Amount = buyAmount}} end promptReward:FireServer(unpack(giveArgs)) end end) end closeBtn.MouseButton1Click:Connect(function() screenGui:Destroy() end) local function updateCalculator() local inputNumber = tonumber(textBox.Text) if inputNumber and inputNumber > 0 then local buyAmount = math.floor(inputNumber) local multiplier = 100 if buyMode == "Wins" then multiplier = 10000 elseif buyMode == "Spins" then multiplier = 5000 end local cost = buyAmount * multiplier costLabel.Text = "This will cost: " .. string.format("%.0f", cost) .. " Coins" if cost <= 1000 then costLabel.TextColor3 = Color3.fromRGB(0, 255, 0) elseif cost <= 10000 then costLabel.TextColor3 = Color3.fromRGB(255, 255, 0) elseif cost <= 100000 then costLabel.TextColor3 = Color3.fromRGB(255, 0, 0) else costLabel.TextColor3 = Color3.fromRGB(160, 32, 240) end else costLabel.Text = "This will cost: 0 Coins" costLabel.TextColor3 = Color3.fromRGB(200, 200, 200) end end modeBtn.MouseButton1Click:Connect(function() if buyMode == "Skips" then buyMode = "Wins" modeBtn.Text = "Buy: Wins" modeBtn.BackgroundColor3 = Color3.fromRGB(255, 170, 0) elseif buyMode == "Wins" then buyMode = "Spins" modeBtn.Text = "Buy: Spins" modeBtn.BackgroundColor3 = Color3.fromRGB(138, 43, 226) else buyMode = "Skips" modeBtn.Text = "Buy: Skips" modeBtn.BackgroundColor3 = Color3.fromRGB(0, 120, 255) end updateCalculator() end) textBox:GetPropertyChangedSignal("Text"):Connect(updateCalculator) task.spawn(function() while true do local minutes = math.floor(timeLeft / 60) local seconds = timeLeft % 60 local timeString = string.format("%02d:%02d", minutes, seconds) if not isBoostPhase then timerLabel.Text = "Next x2 Boost in: " .. timeString timerLabel.TextColor3 = Color3.fromRGB(255, 255, 255) else timerLabel.Text = "🔥 x2 BOOST ACTIVE: " .. timeString .. " 🔥" timerLabel.TextColor3 = Color3.fromRGB(0, 255, 0) end task.wait(1) timeLeft = timeLeft - 1 if timeLeft < 0 then if not isBoostPhase then isBoostPhase = true isDoubleReward = true timeLeft = 5 * 60 else isBoostPhase = false isDoubleReward = false timeLeft = 20 * 60 end end end end) btnBuy.MouseButton1Click:Connect(function() local leaderstats = player:FindFirstChild("leaderstats") local coinsValue = leaderstats and leaderstats:FindFirstChild("Coins") local promptReward = game.ReplicatedStorage:FindFirstChild("Remotes") and game.ReplicatedStorage.Remotes:FindFirstChild("PromptReward") local inputNumber = tonumber(textBox.Text) if not inputNumber or inputNumber <= 0 then return end local buyAmount = math.floor(inputNumber) local multiplier = 100 if buyMode == "Wins" then multiplier = 10000 elseif buyMode == "Spins" then multiplier = 5000 end local coinCost = buyAmount * multiplier if coinsValue and coinsValue.Value < coinCost then btnBuy.Text = "Not enough Coins!" btnBuy.BackgroundColor3 = Color3.fromRGB(170, 0, 0) task.wait(1.5) btnBuy.Text = "Buy" btnBuy.BackgroundColor3 = Color3.fromRGB(50, 50, 50) return end local finalReward = isDoubleReward and (buyAmount * 2) or buyAmount if promptReward then local spendArgs = {{Folder = "leaderstats", Name = "Coins", Amount = -coinCost}} promptReward:FireServer(unpack(spendArgs)) local giveArgs if buyMode == "Skips" then giveArgs = {{Folder = "otherValues", Name = "Skips", Amount = finalReward}} elseif buyMode == "Wins" then giveArgs = {{Folder = "leaderstats", Name = "Wins", Amount = finalReward}} elseif buyMode == "Spins" then giveArgs = {{Folder = "otherValues", Name = "Spins", Amount = finalReward}} end promptReward:FireServer(unpack(giveArgs)) btnBuy.Text = "Success! +"..finalReward btnBuy.BackgroundColor3 = Color3.fromRGB(0, 170, 0) task.wait(1.5) btnBuy.Text = "Buy" btnBuy.BackgroundColor3 = Color3.fromRGB(50, 50, 50) end end)