So, I have been trying to make a cookie clicker game, however the code is very messy!
Any help appreciated!
Code:
<!DOCTYPE html>
<html>
<head><title>hey</title>
<script>
var Cookies = 0
var banks = 0
var temples = 0
var autoClickers = 0
var autoClickerCost = 50
var bakerCost = 500
var farmCost = 6500
var mineCost = 40000
var factoryCost = 600000
var bankCost = 7000000
var loopRunningBanks = false
var templeCost = 40000000
var loopRunningTemples = false
var loopRunningAutoClickers = false
var bakers = 0
var loopRunningBakers = false
var farms = 0
var loopRunningFarms = false
var mines = 0
var loopRunningMines = false
var factories = 0
var loopRunningFactories = false
var wizards = 0
var wizardCost = 300000000
var loopRunningWizards = false
var cookiesSpent = 0
var tierBonus = 1
function save() {
localStorage.cookies = Cookies + cookiesSpent
}
function load() {
Cookies = localStorage.cookies
Cookies = parseInt(Cookies)
if (Cookies < 1000) {
document.getElementById("CookieCounter").value = Cookies + " Cookies!"
}
if (Cookies >= 1000) {
document.getElementById("CookieCounter").value = (Cookies / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies!"
}
if (Cookies >= 1000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies!"
}
if (Cookies >= 1000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies!"
}
if (Cookies >= 1000000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000000).toFixed(3).replace(/\.0$/, ' ') + "T Cookies!"
}
}
function addCookie() {
Cookies += (10000000 * tierBonus)
if (Cookies < 1000) {
document.getElementById("CookieCounter").value = Cookies + " Cookies!"
}
if (Cookies >= 1000) {
document.getElementById("CookieCounter").value = (Cookies / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies!"
}
if (Cookies >= 1000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies!"
}
if (Cookies >= 1000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies!"
}
if (Cookies >= 1000000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000000).toFixed(3).replace(/\.0$/, ' ') + "T Cookies!"
}
}
function autoClickerBrought() {
if (Cookies > autoClickerCost) {
Cookies -= autoClickerCost
autoClickerCost = Math.round(autoClickerCost * 1.15)
cookiesSpent += autoClickerCost
if (autoClickerCost < 1000) {
document.getElementById("autoClickerButton").value = "Auto-Clicker. Cost: " + autoClickerCost + " Cookies, + 1 Cookies Per Second"
}
if (autoClickerCost >= 1000) {
document.getElementById("autoClickerButton").value = "Auto-Clicker. Cost: " + (autoClickerCost / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies, + 1 Cookies Per Second"
}
if (Cookies < 1000) {
document.getElementById("CookieCounter").value = Cookies + " Cookies!"
}
if (Cookies >= 1000) {
document.getElementById("CookieCounter").value = (Cookies / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies!"
}
if (Cookies >= 1000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies!"
}
if (Cookies >= 1000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies!"
}
if (Cookies >= 1000000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000000).toFixed(3).replace(/\.0$/, ' ') + "T Cookies!"
}
autoClickers += 1
if (loopRunningAutoClickers == false) {
autoClickerLoop()
}
loopRunningAutoClickers = true
}
}
function autoClickerLoop() {
loopRunningAutoClickers = true
Cookies += (autoClickers * 1 * tierBonus)
if (Cookies < 1000) {
document.getElementById("CookieCounter").value = Cookies + " Cookies!"
}
if (Cookies >= 1000) {
document.getElementById("CookieCounter").value = (Cookies / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies!"
}
if (Cookies >= 1000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies!"
}
if (Cookies >= 1000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies!"
}
if (Cookies >= 1000000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000000).toFixed(3).replace(/\.0$/, ' ') + "T Cookies!"
}
setTimeout(autoClickerLoop, 1000)
}
function bakerBrought() {
if (Cookies >= bakerCost) {
Cookies -= bakerCost
bakerCost = Math.round(bakerCost * 1.15)
cookiesSpent += bakerCost
if (bakerCost < 1000) {
document.getElementById("bakerButton").value = "Baker. Cost: " + bakerCost + " Cookies, + 8 Cookies Per Second."
}
if (bakerCost >= 1000) {
document.getElementById("bakerButton").value = "Baker. Cost: " + (bakerCost / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies, + 8 Cookies Per Second."
}
if (Cookies < 1000) {
document.getElementById("CookieCounter").value = Cookies + " Cookies!"
}
if (Cookies >= 1000) {
document.getElementById("CookieCounter").value = (Cookies / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies!"
}
if (Cookies >= 1000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies!"
}
if (Cookies >= 1000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies!"
}
if (Cookies >= 1000000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000000).toFixed(3).replace(/\.0$/, ' ') + "T Cookies!"
}
bakers += 1
if (loopRunningBakers == false) {
bakerLoop()
}
loopRunningBakers = true
}
}
function bakerLoop() {
loopRunningBakers = true
Cookies += (bakers * 8 * tierBonus)
if (Cookies < 1000) {
document.getElementById("CookieCounter").value = Cookies + " Cookies!"
}
if (Cookies >= 1000) {
document.getElementById("CookieCounter").value = (Cookies / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies!"
}
if (Cookies >= 1000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies!"
}
if (Cookies >= 1000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies!"
}
if (Cookies >= 1000000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000000).toFixed(3).replace(/\.0$/, ' ') + "T Cookies!"
}
setTimeout(bakerLoop, 1000)
}
function farmBrought() {
if (Cookies > farmCost) {
Cookies -= farmCost
cookiesSpent += farmCost
farmCost = Math.round(farmCost * 1.15)
if (Cookies >= 1000) {
document.getElementById("farmButton").value = "Farm. Cost: " + (farmCost / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies, + 75 Cookies Per Second"
}
if (Cookies < 1000) {
document.getElementById("CookieCounter").value = Cookies + " Cookies!"
}
if (Cookies >= 1000) {
document.getElementById("CookieCounter").value = (Cookies / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies!"
}
if (Cookies >= 1000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies!"
}
if (Cookies >= 1000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies!"
}
if (Cookies >= 1000000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000000).toFixed(3).replace(/\.0$/, ' ') + "T Cookies!"
}
farms += 1
if (loopRunningFarms == false) {
farmLoop()
}
loopRunningFarms = true
}
}
function farmLoop() {
loopRunningFarms = true
Cookies += (farms * 75 * tierBonus)
if (Cookies < 1000) {
document.getElementById("CookieCounter").value = Cookies + " Cookies!"
}
if (Cookies >= 1000) {
document.getElementById("CookieCounter").value = (Cookies / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies!"
}
if (Cookies >= 1000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies!"
}
if (Cookies >= 1000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies!"
}
if (Cookies >= 1000000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000000).toFixed(3).replace(/\.0$/, ' ') + "T Cookies!"
}
setTimeout(farmLoop, 1000)
}
function mineBrought() {
if (Cookies > mineCost) {
Cookies -= mineCost
mineCost = Math.round(mineCost * 1.15)
cookiesSpent += mineCost
if (mineCost >= 1000) {
document.getElementById("mineButton").value = "Mine. Cost: " + (mineCost / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies, + 250 Cookies Per Second"
}
if (mineCost >= 1000000) {
document.getElementById("mineButton").value = "Mine. Cost: " + (mineCost / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies, + 250 Cookies Per Second"
}
if (Cookies < 1000) {
document.getElementById("CookieCounter").value = Cookies + " Cookies!"
}
if (Cookies >= 1000) {
document.getElementById("CookieCounter").value = (Cookies / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies!"
}
if (Cookies >= 1000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies!"
}
if (Cookies >= 1000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies!"
}
if (Cookies >= 1000000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000000).toFixed(3).replace(/\.0$/, ' ') + "T Cookies!"
}
mines += 1
if (loopRunningMines == false) {
mineLoop()
}
loopRunningMines = true
}
}
function mineLoop() {
loopRunningMines = true
Cookies += (mines * 250 * tierBonus)
if (Cookies < 1000) {
document.getElementById("CookieCounter").value = Cookies + " Cookies!"
}
if (Cookies >= 1000) {
document.getElementById("CookieCounter").value = (Cookies / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies!"
}
if (Cookies >= 1000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies!"
}
if (Cookies >= 1000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies!"
}
if (Cookies >= 1000000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000000).toFixed(3).replace(/\.0$/, ' ') + "T Cookies!"
}
setTimeout(mineLoop, 1000)
}
function factoryBrought() {
if (Cookies > factoryCost) {
Cookies -= factoryCost
factoryCost = Math.round(factoryCost * 1.15)
cookiesSpent += factoryCost
if (factoryCost >= 1000) {
document.getElementById("factoryButton").value = "Factory. Cost: " + (factoryCost / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies, + 3K Cookies Per Second"
}
if (factoryCost >= 1000000) {
document.getElementById("factoryButton").value = "Factory. Cost: " + (factoryCost / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies, + 3K Cookies Per Second"
}
if (Cookies < 1000) {
document.getElementById("CookieCounter").value = Cookies + " Cookies!"
}
if (Cookies >= 1000) {
document.getElementById("CookieCounter").value = (Cookies / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies!"
}
if (Cookies >= 1000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies!"
}
if (Cookies >= 1000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies!"
}
if (Cookies >= 1000000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000000).toFixed(3).replace(/\.0$/, ' ') + "T Cookies!"
}
factories += 1
if (loopRunningFactories == false) {
factoryLoop()
}
loopRunningFactories = true
}
}
function factoryLoop() {
loopRunningFactories = true
Cookies += (factories * 3000 * tierBonus)
if (Cookies < 1000) {
document.getElementById("CookieCounter").value = Cookies + " Cookies!"
}
if (Cookies >= 1000) {
document.getElementById("CookieCounter").value = (Cookies / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies!"
}
if (Cookies >= 1000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies!"
}
if (Cookies >= 1000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies!"
}
if (Cookies >= 1000000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000000).toFixed(3).replace(/\.0$/, ' ') + "T Cookies!"
}
setTimeout(factoryLoop, 1000)
}
function bankBrought() {
if (Cookies > bankCost) {
Cookies -= bankCost
bankCost = Math.round(bankCost * 1.15)
cookiesSpent += bankCost
document.getElementById("bankButton").value = "Bank. Cost: " + (bankCost / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies, + 15,000 Cookies Per Second"
if (Cookies < 1000) {
document.getElementById("CookieCounter").value = Cookies + " Cookies!"
}
if (Cookies >= 1000) {
document.getElementById("CookieCounter").value = (Cookies / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies!"
}
if (Cookies >= 1000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies!"
}
if (Cookies >= 1000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies!"
}
if (Cookies >= 1000000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000000).toFixed(3).replace(/\.0$/, ' ') + "T Cookies!"
}
banks += 1
if (loopRunningBanks == false) {
bankLoop()
}
loopRunningBanks = true
}
}
function bankLoop() {
loopRunningBanks = true
Cookies += (banks * 15000 * tierBonus)
if (Cookies < 1000) {
document.getElementById("CookieCounter").value = Cookies + " Cookies!"
}
if (Cookies >= 1000) {
document.getElementById("CookieCounter").value = (Cookies / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies!"
}
if (Cookies >= 1000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies!"
}
if (Cookies >= 1000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies!"
}
if (Cookies >= 1000000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000000).toFixed(3).replace(/\.0$/, ' ') + "T Cookies!"
}
setTimeout(bankLoop, 1000)
}
function templeBrought() {
if (Cookies > templeCost) {
Cookies -= templeCost
templeCost = Math.round(templeCost * 1.15)
cookiesSpent += templeCost
if (templeCost >= 1000000) {
document.getElementById("templeButton").value = "Temple. Cost: " + (templeCost / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies, + 65,000 Cookies Per Second"
}
if(templeCost >= 1000000000) {
document.getElementById("templeButton").value = "Temple. Cost: " + (templeCost / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies, + 65,000 Cookies Per Second"
}
if (Cookies < 1000) {
document.getElementById("CookieCounter").value = Cookies + " Cookies!"
}
if (Cookies >= 1000) {
document.getElementById("CookieCounter").value = (Cookies / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies!"
}
if (Cookies >= 1000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies!"
}
if (Cookies >= 1000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies!"
}
if (Cookies >= 1000000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000000).toFixed(3).replace(/\.0$/, ' ') + "T Cookies!"
}
temples += 1
if (loopRunningTemples == false) {
templeLoop()
}
loopRunningTemples = true
}
}
function templeLoop() {
loopRunningTemples = true
Cookies += (temples * 65000 * tierBonus)
if (Cookies < 1000) {
document.getElementById("CookieCounter").value = Cookies + " Cookies!"
}
if (Cookies >= 1000) {
document.getElementById("CookieCounter").value = (Cookies / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies!"
}
if (Cookies >= 1000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies!"
}
if (Cookies >= 1000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies!"
}
if (Cookies >= 1000000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000000).toFixed(3).replace(/\.0$/, ' ') + "T Cookies!"
}
setTimeout(templeLoop, 1000)
}
function wizardBrought() {
if (Cookies > wizardCost) {
Cookies -= wizardCost
wizardCost = Math.round(wizardCost * 1.15)
cookiesSpent += wizardCost
if (wizardCost >= 1000000) {
document.getElementById("wizardButton").value = "Wizard. Cost: " + (wizardCost / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies, + 500K Cookies Per Second"
}
if(wizardCost >= 1000000000) {
document.getElementById("wizardButton").value = "Wizard. Cost: " + (wizardCost / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies, + 500K Cookies Per Second"
}
if (Cookies < 1000) {
document.getElementById("CookieCounter").value = Cookies + " Cookies!"
}
if (Cookies >= 1000) {
document.getElementById("CookieCounter").value = (Cookies / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies!"
}
if (Cookies >= 1000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies!"
}
if (Cookies >= 1000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies!"
}
if (Cookies >= 1000000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000000).toFixed(3).replace(/\.0$/, ' ') + "T Cookies!"
}
wizards += 1
if (loopRunningWizards == false) {
wizardLoop()
}
loopRunningWizards = true
}
}
function wizardLoop() {
loopRunningWizards = true
Cookies += (wizards * 500000 * tierBonus)
if (Cookies < 1000) {
document.getElementById("CookieCounter").value = Cookies + " Cookies!"
}
if (Cookies >= 1000) {
document.getElementById("CookieCounter").value = (Cookies / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies!"
}
if (Cookies >= 1000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies!"
}
if (Cookies >= 1000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies!"
}
if (Cookies >= 1000000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000000).toFixed(3).replace(/\.0$/, ' ') + "T Cookies!"
}
setTimeout(wizardLoop, 1000)
}
function rankedUp() {
if (Cookies >= 50000000) {
if (Cookies < 1000) {
document.getElementById("CookieCounter").value = Cookies + " Cookies!"
}
if (Cookies >= 1000) {
document.getElementById("CookieCounter").value = (Cookies / 1000).toFixed(3).replace(/\.0$/, ' ') + "K Cookies!"
}
if (Cookies >= 1000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000).toFixed(3).replace(/\.0$/, ' ') + "M Cookies!"
}
if (Cookies >= 1000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000).toFixed(3).replace(/\.0$/, ' ') + "B Cookies!"
}
if (Cookies >= 1000000000000) {
document.getElementById("CookieCounter").value = (Cookies / 1000000000000).toFixed(3).replace(/\.0$/, ' ') + "T Cookies!"
}
tierBonus = 2
document.getElementById("rankButton").value = "Max Tier"
Cookies -= 50000000
}
}
</script>
<style>
</style>
</head>
<body>
<input type="text" id="CookieCounter" value="0 Cookies!" disabled style="text-align: center">
<input type="button" value="Save" onclick="save()">
<input type="button" value="Load" onclick="load()">
<img src="Cookie.jpg" onclick="addCookie()">
<input type="button" value="Auto-Clicker. Cost: 50 Cookies, + 1 Cookies Per Second" id="autoClickerButton" onclick="autoClickerBrought()">
<input type="button" value="Baker. Cost: 500 Cookies, + 8 Cookies Per Second" id="bakerButton" onclick="bakerBrought()">
<input type="button" value="Farm. Cost: 6.5K Cookies, + 75 Cookies Per Second" id="farmButton" onclick="farmBrought()">
<input type="button" value="Mine. Cost: 40K Cookies, + 250 Cookies Per Second" id="mineButton" onclick="mineBrought()">
<input type="button" value="Factory. Cost: 600K Cookies, + 3K Cookies Per Second" id="factoryButton" onclick="factoryBrought()">
<input type="button" value="Bank. Cost: 7M Cookies, + 15K Cookies Per Second" id="bankButton" onclick="bankBrought()">
<input type="button" value="Temple. Cost: 40M Cookies, + 65K Cookies Per Second" id="templeButton" onclick="templeBrought()">
<input type="button" value="Wizard. Cost: 300M Cookies, + 500K Cookies Per Second" id="wizardButton" onclick="wizardBrought()">
<input type="button" value="Buy tier 1 (50M Cookies) for x2 Cookies" id="rankButton" onclick="rankedUp()">
</body>
</html>