Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function s(...) return sleep(...) end
- function w(...) return write(...) end
- function p(...) return print(...) end
- function tw(...) return term.write(...) end
- function scp(...) return term.setCursorPos(...) end
- function sbc(...) return term.setBackgroundColor(...) end
- function stc(...) return term.setTextColor(...) end
- function tc(...) return term.clear(...) end
- function tcl(...) return term.clearLine() end
- function scb(...) return term.setCursorBlink(...) end
- function ts(...) return term.scroll(...) end
- function r(...) return shell.run(...) end
- function para(...) return parallel.waitForAny(...) end
- function sw(...) return textutils.slowWrite(...) end
- function sp(...) return textutils.slowPrint(...) end
- function newGame()
- Cookies = "0"
- cps = "1"
- ClickerCost = "10"
- end
- sbc( colors.black )
- term.clear()
- sbc( colors.gray )
- scp(6,6)
- w([[New File Or Import? ]])
- sbc( colors.white )
- scp(6,7)
- w([[ ]])
- scp(6,8)
- w([[ Do you want to import a save or ]])
- scp(6,9)
- w([[ create a new file? ]])
- scp(6,10)
- w([[ ]])
- scp(6,11)
- w([[ ]])
- scp(6,12)
- w([[ ]])
- scp(8,11)
- sbc( colors.red )
- stc(1)
- w([[ New ]])
- while true do
- event, button, X, Y = os.pullEvent("mouse_click")
- if X >= 8 and X <= 13 and Y == 11 then
- newGame()
- break
- end
- end
- sbc( colors.cyan )
- term.clear()
- function drawCookie()
- paintutils.drawImage(Cookie, 3, 3 )
- end
- function drawAmmount()
- stc(1)
- sbc( colors.cyan )
- scp(2,16)
- print(Cookies.." Cookies")
- end
- function drawShop()
- paintutils.drawFilledBox(30, 3, 50, 6, colors.orange)
- scp(32,4)
- stc(1)
- w([[ Clicker ]])
- scp(32,5)
- if Cookies >= ClickerCost then
- stc( colors.green )
- term.write(ClickerCost.." Cookies")
- else
- stc( colors.red )
- scp(32,5)
- term.write(ClickerCost.." Cookies")-
- end
- end
- -- Game Startup
- drawShop()
- drawAmmount()
- drawCookie()
- while true do
- event, button, X, Y = os.pullEvent("mouse_click")
- if X >= 4 and X <= 18 and Y == 3 or X >= 4 and X <= 18 and Y == 4 or X >= 4 and X <= 18 and Y == 5 or X >= 4 and X <= 18 and Y == 6 or X >= 4 and X <= 18 and Y == 7 or X >= 4 and X <= 18 and Y == 8 or X >= 4 and X <= 18 and Y == 9 or X >= 4 and X <= 18 and Y == 10 or X >= 4 and X <= 18 and Y == 11 or X >= 4 and X <= 18 and Y == 12 then
- Cookies = Cookies + cps
- drawAmmount()
- drawShop()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment