Advertisement
poulton0

standaloneclicker.lua

Jan 9th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.26 KB | None | 0 0
  1. require "table"
  2. require "string"
  3. ver="0.6.4"
  4. t = {}
  5. os.execute("cls")
  6.  
  7. local clock = os.clock
  8. local clock = os.clock
  9. function sleep(n) -- seconds
  10. local t0 = clock()
  11. while clock() - t0 <= n do end
  12. end
  13.  
  14. function value()
  15. pointers=0
  16. files=0
  17. humans=0
  18. macros=0
  19. bots=0
  20. rnds=100
  21. a=10
  22. b=1000
  23. c=100000
  24. d=10000000
  25. e=1000000000
  26. f=110
  27. g=10
  28. clicks=0
  29. cheat=2147483647
  30. name=""
  31. end
  32.  
  33. function credits()
  34. os.execute("lua credits.lua")
  35. main()
  36. end
  37.  
  38. function rand()
  39. os.execute("sounder click.wav")
  40. clicks=clicks-rnds
  41. rnds=rnds+100
  42. rnd=math.random(1,10000)
  43. if rnd == 100 then
  44. humans=humans+1
  45. elseif rnd == 1000 then
  46. macros=macros+1
  47. elseif rnd == 10000 then
  48. bots=bots+1
  49. else
  50. print("unlucky")
  51. sleep(0.5)
  52. end
  53. end
  54.  
  55.  
  56. function name_set()
  57. if name=="HAXOR" then
  58. print("ERROR YOU CAN'T CHANGE YOUR NAME")
  59. main()
  60. end
  61. os.execute("cls")
  62. print("do you want to change your name yes/no")
  63. reed=io.read()
  64. if reed=="yes" then
  65. print("enter a new name")
  66. name=io.read()
  67. main()
  68. elseif reed == "no" then
  69. main()
  70. elseif reed == "" then
  71. print("error no option entered")
  72. sleep(0.5)
  73. name_set()
  74. end
  75. end
  76.  
  77. function pointer_s()
  78. if clicks >= a then
  79. os.execute("sounder click.wav")
  80. pointers=pointers+1
  81. clicks=clicks-a
  82. a=a+7
  83. click()
  84. else
  85. print("Not enough clicks")
  86. end
  87. end
  88.  
  89. function batch_s()
  90. if clicks >= b then
  91. os.execute("sounder click.wav")
  92. files=files+1
  93. clicks=clicks-b
  94. b=b+700
  95. click()
  96. else
  97. print("Not enough clicks")
  98. end
  99. end
  100.  
  101. function human_s()
  102. if clicks >= c then
  103. os.execute("sounder click.wav")
  104. humans=humans+1
  105. clicks=clicks-c
  106. c=c+70000
  107. click()
  108. else
  109. print("Not enough clicks")
  110. end
  111. end
  112.  
  113. function macro_s()
  114. if clicks >= d then
  115. os.execute("sounder click.wav")
  116. macros=macros+1
  117. clicks=clicks-d
  118. d=d+7000000
  119. click()
  120. else
  121. print("Not enough clicks")
  122. end
  123. end
  124.  
  125. function bot_s()
  126. if clicks >= e then
  127. os.execute("sounder click.wav")
  128. bots=bots+1
  129. clicks=clicks-e
  130. e=e+700000000
  131. click()
  132. else
  133. print("Not enough clicks")
  134. end
  135. end
  136.  
  137.  
  138. function help()
  139. os.execute("cls")
  140. print(" ? = this menu")
  141. print(" point = buy a pointer")
  142. print(" bfile = buy a batch file")
  143. print(" human = buy a human")
  144. print(" macro = buy a macro")
  145. print(" btnet = buy a bot net")
  146. print(" rando = buy a random chance")
  147. print(" name = change name")
  148. print("credit = show credits")
  149. print(" quit = quit/save game")
  150. print("")
  151. print("press enter to continue")
  152. yn=io.read()
  153. if yn == "" then
  154. main()
  155. else
  156. help()
  157. end
  158. end
  159.  
  160.  
  161.  
  162. function welcome()
  163. sleep(0.5)
  164. print("what is your name")
  165. sleep(0.5)
  166. name = io.read()
  167. if name =="HAXOR" then
  168. print("YOU CANT HAVE THAT NAME")
  169. welcome()
  170. end
  171. sleep(0.5)
  172. if name == "CH34T" then
  173. print("YOU HAXOR")
  174. name="HAXOR"
  175. sleep(0.5)
  176. clicks=cheat
  177. pointers=cheat
  178. files=cheat
  179. humans=cheat
  180. macros=cheat
  181. bots=cheat
  182. end
  183. if name=="jason" or name == "Jason" then
  184. os.execute("color c")
  185. end
  186. if name=="zophie" or name == "Zophie" then
  187. os.execute("color c")
  188. end
  189. if name=="misfit" or name=="Misfit" then
  190. os.execute("color e")
  191. end
  192. if name=="fobs" or name=="Fobs" then
  193. os.execute("color 0")
  194. end
  195. if name=="sierra" or naem=="Sierra" then
  196. os.execute("color d")
  197. end
  198. if name=="sam" or "Sam" then
  199. os.execute("color 1")
  200. print("hello "..name.." and welcome to batch clicker (lua) ver: "..ver)
  201. sleep(2)
  202. print("to see a list of commands type ?")
  203. sleep(5)
  204. end
  205. end
  206.  
  207. function click()
  208. os.execute("cls")
  209. print("Current clicks: "..clicks.." Player: "..name)
  210. print("Current pointers: "..pointers.." Current pointer price: "..a)
  211. print("Current batch files: "..files.." Current batch file price: "..b)
  212. print("Current humans: "..humans.." Current human price: "..c)
  213. print("Current macros: "..macros.." Current current macro price: "..d)
  214. print("Current bot nets: "..bots.." current current bot net price: "..e)
  215. print("Random = "..rnds.." clicks")
  216. clicks=(clicks+1)+(pointers*2)+(files*4)+(humans*8)+(macros*16)+(bots*32)
  217. main()
  218. end
  219.  
  220. function quit()
  221. save_game()
  222. os.exit()
  223. end
  224.  
  225. function main()
  226. while true do
  227. check=io.read()
  228.  
  229. if check == "?" then
  230. help()
  231. end
  232.  
  233. if check == "" then
  234. click()
  235. end
  236.  
  237. if check == "-" then
  238. click()
  239. end
  240.  
  241. if check == "point" then
  242. pointer_s()
  243. end
  244.  
  245. if check == "bfile" then
  246. batch_s()
  247. end
  248.  
  249. if check == "human" then
  250. human_s()
  251. end
  252.  
  253. if check == "macro" then
  254. macro_s()
  255. end
  256.  
  257. if check == "btnet" then
  258. bot_s()
  259. end
  260.  
  261. if check == "c_h_e_a_t" and name == "HAXOR" then
  262. clicks=clicks+(cheat*1000000)
  263. pointers=pointers+(cheat*1000000)
  264. files=files+(cheat*1000000)
  265. humans=humans+(cheat*1000000)
  266. macros=macros+(cheat*1000000)
  267. bots=bots+(cheat*1000000)
  268. click()
  269. end
  270.  
  271. if check == "name" then
  272. name_set()
  273. end
  274.  
  275. if check == "rando" and clicks >= rnds then
  276. rand()
  277. end
  278.  
  279. if check == "credit" then
  280. credits()
  281. end
  282.  
  283. if check == "quit" then
  284. quit()
  285. end
  286.  
  287. end
  288. end
  289. value()
  290. welcome()
  291. os.execute("cls")
  292. print("Current clicks: "..clicks.." Player: "..name)
  293. print("Current pointers: "..pointers.." Current pointer price: "..a)
  294. print("Current batch files: "..files.." Current batch file price: "..b)
  295. print("Current humans: "..humans.." Current human price: "..c)
  296. print("Current macros: "..macros.." Current current macro price: "..d)
  297. print("Current bot nets: "..bots.." Current current bot net price: "..e)
  298. print("Random = "..rnds.." clicks")
  299. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement