Advertisement
BobMe

minecraft currency thing

Feb 4th, 2020
4,000
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.17 KB | None | 0 0
  1. // This script is a currency script to allow the player to have a better experience by
  2. // selling various resources they obtain, saving money, and buying other objects for
  3. // their benefit.
  4.  
  5. // Scripts do NOT save progress, enter in the amount of money you had last game, but don't
  6. // cheat, unless you're in a cheat-friendly world. Cheating is no no.
  7.  
  8. // Minecraft Color Code symbol: §
  9.  
  10. let home: Position = null//positions.createWorld(0, 60, 0) //remove "null" and the initial slashes to have a already set home
  11. let MONEY = 0//24375
  12. let tips = true // change 'true' to 'false' to disable the tips
  13.  
  14.  
  15. // do not change the values below
  16. let homer = 0
  17.  
  18. mobs.onMobKilled(CHICKEN, function () {
  19. MONEY = MONEY + 5
  20. player.say("§2§l+$5§r for killing a chicken; §6§l$" + MONEY)
  21. })
  22. mobs.onMobKilled(SHEEP, function () {
  23. MONEY = MONEY + 7
  24. player.say("§2§l+$7§r for killing a sheep; §6§l$" + MONEY)
  25. })
  26. mobs.onMobKilled(COW, function () {
  27. MONEY = MONEY + 8
  28. player.say("§2§l+$8§r for killing a cow; §6§l$" + MONEY)
  29. })
  30. mobs.onMobKilled(PIG, function () {
  31. MONEY = MONEY + 8
  32. player.say("§2§l+$8§r for killing a pig; §6§l$" + MONEY)
  33. })
  34. mobs.onMobKilled(COD, function () {
  35. MONEY = MONEY + 5
  36. player.say("§2§l+$5§r for killing a cod; §6§l$" + MONEY)
  37. })
  38. mobs.onMobKilled(MUSHROOM_COW, function () {
  39. MONEY = MONEY + 30
  40. player.say("§2§l+$30§r for killing a mooshroom; §6§l$" + MONEY)
  41. })
  42. mobs.onMobKilled(SALMON, function () {
  43. MONEY = MONEY + 5
  44. player.say("§2§l+$5§r for killing a salmon; §6§l$" + MONEY)
  45. })
  46. mobs.onMobKilled(DROWNED, function () {
  47. MONEY = MONEY + 25
  48. player.say("§2§l+$25§r for killing a drowned; §6§l$" + MONEY)
  49. })
  50. mobs.onMobKilled(ZOMBIE, function () {
  51. MONEY = MONEY + 20
  52. player.say("§2§l+$20§r for killing a zombie; §6§l$" + MONEY)
  53. })
  54. mobs.onMobKilled(SKELETON, function () {
  55. MONEY = MONEY + 30
  56. player.say("§2§l+$30§r for killing a skeleton; §6§l$" + MONEY)
  57. })
  58. mobs.onMobKilled(CREEPER, function () {
  59. MONEY = MONEY + 30
  60. player.say("§2§l+$25§r for killing a creeper; §6§l$" + MONEY)
  61. })
  62. mobs.onMobKilled(HORSE, function () {
  63. MONEY = MONEY + 8
  64. player.say("§2§l+$8§r for killing a horse; §6§l$" + MONEY)
  65. })
  66. mobs.onMobKilled(STRAY, function () {
  67. MONEY = MONEY + 32
  68. player.say("§2§l+$32§r for killing a stray; §6§l$" + MONEY)
  69. })
  70. mobs.onMobKilled(PHANTOM, function () {
  71. MONEY = MONEY + 30
  72. player.say("§2§l+$32§r for killing a phantom; §6§l$" + MONEY)
  73. })
  74. mobs.onMobKilled(PUFFERFISH, function () {
  75. MONEY = MONEY + 40
  76. player.say("§2§l+$40§r for killing a pufferfish; §6§l$" + MONEY)
  77. })
  78. mobs.onMobKilled(ZOMBIE_HORSE, function () {
  79. MONEY = MONEY + 100
  80. player.say("§2§l+$100§r for killing a zombie horse; §6§l$" + MONEY)
  81. })
  82. mobs.onMobKilled(SKELETON_HORSE, function () {
  83. MONEY = MONEY + 50
  84. player.say("§2§l+$50§r for killing a zombie horse; §6§l$" + MONEY)
  85. })
  86. mobs.onMobKilled(SILVERFISH, function () {
  87. MONEY = MONEY + 10
  88. player.say("§2§l+$10§r for killing a silver fish; §6§l$" + MONEY)
  89. })
  90. mobs.onMobKilled(WITHER_SKELETON, function () {
  91. MONEY = MONEY + 30
  92. player.say("§2§l+$30§r for killing a skeleton; §6§l$" + MONEY)
  93. })
  94. mobs.onMobKilled(WITHER, function () {
  95. MONEY = MONEY + 150
  96. player.say("§2§l+$150§r for killing an iron golem; §6§l$" + MONEY)
  97. })
  98. mobs.onMobKilled(BLAZE, function () {
  99. MONEY = MONEY + 50
  100. player.say("§2§l+$50§r for killing a blaze; §6§l$" + MONEY)
  101. })
  102. mobs.onMobKilled(ENDERMAN, function () {
  103. MONEY = MONEY + 50
  104. player.say("§2§l+$50§r for killing an enderman; §6§l$" + MONEY)
  105. })
  106. mobs.onMobKilled(BAT, function () {
  107. MONEY = MONEY + 3
  108. player.say("§2§l+$3§r for killing a bat; §6§l$" + MONEY)
  109. })
  110. mobs.onMobKilled(GUARDIAN, function () {
  111. MONEY = MONEY + 40
  112. player.say("§2§l+$40§r for killing a guardian; §6§l$" + MONEY)
  113. })
  114. mobs.onMobKilled(ELDER_GUARDIAN, function () {
  115. MONEY = MONEY + 250
  116. player.say("§2§l+$250§r for killing an elder guardian; §6§l$" + MONEY)
  117. })
  118. mobs.onMobKilled(HUSK, function () {
  119. MONEY = MONEY + 23
  120. player.say("§2§l+$23§r for killing a husk; §6§l$" + MONEY)
  121. })
  122. mobs.onMobKilled(SEA_TURTLE, function () {
  123. MONEY = MONEY + 10
  124. player.say("§2§l+$10§r for killing a turtle; §6§l$" + MONEY)
  125. })
  126. mobs.onMobKilled(AnimalMob.Villager, function () {
  127. MONEY = MONEY - 60
  128. player.say("§4§lUhoh! -$60§r for killing a villager; §6§l$" + MONEY)
  129. })
  130. mobs.onMobKilled(ZOMBIE_VILLAGER, function () {
  131. MONEY = MONEY + 25
  132. player.say("§2§l+$25§r for killing a zombie villager; §6§l$" + MONEY)
  133. })
  134. mobs.onMobKilled(SPIDER, function () {
  135. MONEY = MONEY + 15
  136. player.say("§2§l+$15§r for killing a spider; §6§l$" + MONEY)
  137. })
  138. mobs.onMobKilled(DONKEY, function () {
  139. MONEY = MONEY + 8
  140. player.say("§2§l+$8§r for killing a donkey; §6§l$" + MONEY)
  141. })
  142. mobs.onMobKilled(ENDERMITE, function () {
  143. MONEY = MONEY + 150
  144. player.say("§2§l+$150§r for killing an endermite; §6§l$" + MONEY)
  145. })
  146. mobs.onMobKilled(SHULKER, function () {
  147. MONEY = MONEY + 60
  148. player.say("§2§l+$60§r for killing a shulker; §6§l$" + MONEY)
  149. })
  150. mobs.onMobKilled(SQUID, function () {
  151. MONEY = MONEY + 11
  152. player.say("§2§l+$11§r for killing a squid; §6§l$" + MONEY)
  153. })
  154. mobs.onMobKilled(POLAR_BEAR, function () {
  155. MONEY = MONEY + 15
  156. player.say("§2§l+$15§r for killing a polar bear; §6§l$" + MONEY)
  157. })
  158. mobs.onMobKilled(PANDA, function () {
  159. MONEY = MONEY - 100
  160. player.say("§4§lYou monster! -$100§r for killing a panda; §6§l$" + MONEY)
  161. })
  162. mobs.onMobKilled(RABBIT, function () {
  163. MONEY = MONEY + 7
  164. player.say("§2§l+$7§r for killing a rabbit; §6§l$" + MONEY)
  165. })
  166. mobs.onMobKilled(WOLF, function () {
  167. MONEY = MONEY + 15
  168. player.say("§2§l+$15§r for killing a wolf; §6§l$" + MONEY)
  169. })
  170. mobs.onMobKilled(CAT, function () {
  171. MONEY = MONEY + 8
  172. player.say("§2§l+$8§r for killing a cat; §6§l$" + MONEY)
  173. })
  174. mobs.onMobKilled(OCELOT, function () {
  175. MONEY = MONEY + 8
  176. player.say("§2§l+$8§r for killing an ocelot; §6§l$" + MONEY)
  177. })
  178. mobs.onMobKilled(PIG_ZOMBIE, function () {
  179. MONEY = MONEY + 30
  180. player.say("§2§l+$30§r for killing a zombie pigman; §6§l$" + MONEY)
  181. })
  182. mobs.onMobKilled(WITCH, function () {
  183. MONEY = MONEY + 30
  184. player.say("§2§l+$30§r for killing a witch; §6§l$" + MONEY)
  185. })
  186. mobs.onMobKilled(DOLPHIN, function () {
  187. MONEY = MONEY + 10
  188. player.say("§2§l+$10§r for killing a dolphin; §6§l$" + MONEY)
  189. })
  190. mobs.onMobKilled(LLAMA, function () {
  191. MONEY = MONEY + 10
  192. player.say("§2§l+$10§r for killing a llama; §6§l$" + MONEY)
  193. })
  194. mobs.onMobKilled(mobs.monster(MonsterMob.Vindicator), function () {
  195. MONEY = MONEY + 40
  196. player.say("§2§l+$40§r for killing a vindicator; §6§l$" + MONEY)
  197. })
  198.  
  199. player.onChat(";gamble ", function (num1: number) {
  200. if (num1 <= 0 || num1 == null) {
  201. player.say("§4§lYou need to bet something to gamble you dum dum.")
  202. } else if (num1 > MONEY) {
  203. player.say("§4§lYou don't even have $" + num1 + "! Don't try to lie to me hoe.")
  204. } else {
  205. let roll1 = Math.randomRange(1, 12)
  206. let roll2 = Math.randomRange(1, 12)
  207. if (roll1 > roll2) {
  208. let roll3 = Math.randomRange(50, 150)
  209. let numof = Math.floor(num1 * (roll3 / 100))
  210. player.say("§2§l-----------------------------------")
  211. player.say("§2§l" + player.name() + "'s gambling game:")
  212. player.say("You rolled: §l" + roll1 + "§r | Bot rolled: §l" + roll2)
  213. player.say("Percent of bet won: §l" + roll3 + "%")
  214. player.say("You've won §2§l$" + numof)
  215. player.say("§2§l-----------------------------------")
  216. MONEY = MONEY + numof
  217. } else {
  218. player.say("§4§l-----------------------------------")
  219. player.say("§4§l" + player.name() + "'s gambling game:")
  220. player.say("You rolled: §l" + roll1 + "§r | Bot rolled: §l" + roll2)
  221. player.say("")
  222. player.say("You've lost §4§l$" + num1)
  223. player.say("§4§l-----------------------------------")
  224. MONEY = MONEY - num1
  225. }
  226. }
  227. })
  228.  
  229. player.onChat(";balance", function () {
  230. player.say("You have §2§l$" + MONEY)
  231. })
  232.  
  233. let temname = "Diamond"
  234. let nam = "diamond"
  235. let cos = 2200
  236. player.onChat(";cost/" + nam, function () {
  237. let cost = cos
  238. player.say("Item:§7§l " + temname)
  239. player.say("--")
  240. player.say("Buy price: §2§l$" + cost)
  241. player.say("Sell price: §5§l$" + Math.floor(cost / 1.5))
  242. })
  243. player.onChat(";buy/" + nam + " ", function (num1: number, num2: number) {
  244. let cost = cos
  245. let itemname = temname
  246. let cmd = "give @s " + nam
  247. if (num1 == 0 || num1 == null) {
  248. num1 = 1
  249. }
  250. if (MONEY >= cost * num1) {
  251. if (num1 == 1) {
  252. player.say("You've bought: §l1§8§l " + itemname + "§r for $§l§2" + cost)
  253. MONEY = MONEY - cost
  254. player.execute(cmd)
  255. } else {
  256. player.say("You've bought: §l" + num1 + "§8§l " + itemname + "s§r for $§l§2" + cost * num1)
  257. MONEY = MONEY - cost * num1
  258. player.execute(cmd + " " + num1)
  259. }
  260. } else {
  261. player.say("§4§lYou don't have enough money!\n§rYou need $§4§l" + cost * num1 + "§r; You have: $§2§l" + MONEY)
  262. }
  263. })
  264. player.onChat(";sell/" + nam + " ", function (num1: number, num2: number) {
  265. let cost = Math.floor(cos / 1.5)
  266. let itemname = temname
  267. let cmd = "clear @s " + nam + " 0"
  268. if (num1 == 0 || num1 == null) {
  269. num1 = 1
  270. }
  271. if (3 == 3) {
  272. if (num1 == 1) {
  273. player.say("You've sold: §l1§8§l " + itemname + "§r for $§l§2" + cost)
  274. MONEY = MONEY + cost
  275. player.execute(cmd + " 1")
  276. } else {
  277. player.say("You've sold: §l" + num1 + "§8§l " + itemname + "s§r for $§l§2" + cost * num1)
  278. MONEY = MONEY + cost * num1
  279. player.execute(cmd + " " + num1)
  280. }
  281. }
  282. })
  283.  
  284. let temname2 = "Coal"
  285. let naaa2 = "coal"
  286. let cosss2 = 35
  287. player.onChat(";cost/" + naaa2, function () {
  288. let cost = cosss2
  289. player.say("Item:§7§l " + temname2)
  290. player.say("--")
  291. player.say("Buy price: §2§l$" + cost)
  292. player.say("Sell price: §5§l$" + Math.floor(cost / 1.5))
  293. })
  294. player.onChat(";buy/" + naaa2, function (num1: number, num2: number) {
  295. let cost = cosss2
  296. let itemname2 = temname2
  297. let cmd = "give @s " + naaa2
  298. if (num1 == 0 || num1 == null) {
  299. num1 = 1
  300. }
  301. if (MONEY >= cost * num1) {
  302. if (num1 == 1) {
  303. player.say("You've bought: §l1§8§l " + itemname2 + "§r for $§l§2" + cost)
  304. MONEY = MONEY - cost
  305. player.execute(cmd)
  306. } else {
  307. player.say("You've bought: §l" + num1 + "§8§l " + itemname2 + "s§r for $§l§2" + cost * num1)
  308. MONEY = MONEY - cost * num1
  309. player.execute(cmd + " " + num1)
  310. }
  311. } else {
  312. player.say("§4§lYou don't have enough money!\n§rYou need $§4§l" + cost * num1 + "§r; You have: $§2§l" + MONEY)
  313. }
  314. })
  315. player.onChat(";sell/" + naaa2, function (num1: number, num2: number) {
  316. let cost = Math.floor(cosss2 / 1.5)
  317. let itemname2 = temname2
  318. let cmd = "clear @s " + naaa2 + " 0"
  319. if (num1 == 0 || num1 == null) {
  320. num1 = 1
  321. }
  322. if (3 == 3) {
  323. if (num1 == 1) {
  324. player.say("You've sold: §l1§8§l " + itemname2 + "§r for $§l§2" + cost)
  325. MONEY = MONEY + cost
  326. player.execute(cmd + " 1")
  327. } else {
  328. player.say("You've sold: §l" + num1 + "§8§l " + itemname2 + "s§r for $§l§2" + cost * num1)
  329. MONEY = MONEY + cost * num1
  330. player.execute(cmd + " " + num1)
  331. }
  332. }
  333. })
  334.  
  335. let temname3 = "Iron Ingot"
  336. let naaa3 = "iron"
  337. let cmmd3 = "iron_ingot"
  338. let cosss3 = 225
  339. player.onChat(";cost/" + naaa3, function () {
  340. let cost = cosss3
  341. player.say("Item:§7§l " + temname3)
  342. player.say("--")
  343. player.say("Buy price: §2§l$" + cost)
  344. player.say("Sell price: §5§l$" + Math.floor(cost / 1.5))
  345. })
  346. player.onChat(";buy/" + naaa3, function (num1: number, num2: number) {
  347. let cost = cosss3
  348. let itemname3 = temname3
  349. let cmd = "give @s " + cmmd3
  350. if (num1 == 0 || num1 == null) {
  351. num1 = 1
  352. }
  353. if (MONEY >= cost * num1) {
  354. if (num1 == 1) {
  355. player.say("You've bought: §l1§8§l " + itemname3 + "§r for $§l§2" + cost)
  356. MONEY = MONEY - cost
  357. player.execute(cmd + " 1")
  358. } else {
  359. player.say("You've bought: §l" + num1 + "§8§l " + itemname3 + "s§r for $§l§2" + cost * num1)
  360. MONEY = MONEY - cost * num1
  361. player.execute(cmd + " " + num1)
  362. }
  363. } else {
  364. player.say("§4§lYou don't have enough money!\n§rYou need $§4§l" + cost * num1 + "§r; You have: $§2§l" + MONEY)
  365. }
  366. })
  367. player.onChat(";sell/" + naaa3, function (num1: number, num2: number) {
  368. let cost = Math.floor(cosss3 / 1.5)
  369. let itemname3 = temname3
  370. let cmd = "clear @s " + cmmd3 + " 0"
  371. if (num1 == 0 || num1 == null) {
  372. num1 = 1
  373. }
  374. if (3 == 3) {
  375. if (num1 == 1) {
  376. player.say("You've sold: §l1§8§l " + itemname3 + "§r for $§l§2" + cost)
  377. MONEY = MONEY + cost
  378. player.execute(cmd + " 1")
  379. } else {
  380. player.say("You've sold: §l" + num1 + "§8§l " + itemname3 + "s§r for $§l§2" + cost * num1)
  381. MONEY = MONEY + cost * num1
  382. player.execute(cmd + " " + num1)
  383. }
  384. }
  385. })
  386.  
  387. let temname4 = "Emerald"
  388. let naaa4 = "emerald"
  389. let cmmd4 = "emerald"
  390. let cosss4 = 750
  391. player.onChat(";cost/" + naaa4, function () {
  392. let cost = cosss4
  393. player.say("Item:§7§l " + temname4)
  394. player.say("--")
  395. player.say("Buy price: §2§l$" + cost)
  396. player.say("Sell price: §5§l$" + Math.floor(cost / 1.5))
  397. })
  398. player.onChat(";buy/" + naaa4, function (num1: number, num2: number) {
  399. let cost = cosss4
  400. let itemname4 = temname4
  401. let cmd = "give @s " + cmmd4
  402. if (num1 == 0 || num1 == null) {
  403. num1 = 1
  404. }
  405. if (MONEY >= cost * num1) {
  406. if (num1 == 1) {
  407. player.say("You've bought: §l1§8§l " + itemname4 + "§r for $§l§2" + cost)
  408. MONEY = MONEY - cost
  409. player.execute(cmd)
  410. } else {
  411. player.say("You've bought: §l" + num1 + "§8§l " + itemname4 + "s§r for $§l§2" + cost * num1)
  412. MONEY = MONEY - cost * num1
  413. player.execute(cmd + " " + num1)
  414. }
  415. } else {
  416. player.say("§4§lYou don't have enough money!\n§rYou need $§4§l" + cost * num1 + "§r; You have: $§2§l" + MONEY)
  417. }
  418. })
  419. player.onChat(";sell/" + naaa4, function (num1: number, num2: number) {
  420. let cost = Math.floor(cosss4 / 1.5)
  421. let itemname4 = temname4
  422. let cmd = "clear @s " + cmmd4 + " 0"
  423. if (num1 == 0 || num1 == null) {
  424. num1 = 1
  425. }
  426. if (3 == 3) {
  427. if (num1 == 1) {
  428. player.say("You've sold: §l1§8§l " + itemname4 + "§r for $§l§2" + cost)
  429. MONEY = MONEY + cost
  430. player.execute(cmd + " 1")
  431. } else {
  432. player.say("You've sold: §l" + num1 + "§8§l " + itemname4 + "s§r for $§l§2" + cost * num1)
  433. MONEY = MONEY + cost * num1
  434. player.execute(cmd + " " + num1)
  435. }
  436. }
  437. })
  438.  
  439. let temname5 = "Gold Ingot"
  440. let naaa5 = "gold"
  441. let cmmd5 = "gold_ingot"
  442. let cosss5 = 450
  443. player.onChat(";cost/" + naaa5, function () {
  444. let cost = cosss5
  445. player.say("Item:§7§l " + temname5)
  446. player.say("--")
  447. player.say("Buy price: §2§l$" + cost)
  448. player.say("Sell price: §5§l$" + Math.floor(cost / 1.5))
  449. })
  450. player.onChat(";buy/" + naaa5, function (num1: number, num2: number) {
  451. let cost = cosss5
  452. let itemname5 = temname5
  453. let cmd = "give @s " + cmmd5
  454. if (num1 == 0 || num1 == null) {
  455. num1 = 1
  456. }
  457. if (MONEY >= cost * num1) {
  458. if (num1 == 1) {
  459. player.say("You've bought: §l1§8§l " + itemname5 + "§r for $§l§2" + cost)
  460. MONEY = MONEY - cost
  461. player.execute(cmd)
  462. } else {
  463. player.say("You've bought: §l" + num1 + "§8§l " + itemname5 + "s§r for $§l§2" + cost * num1)
  464. MONEY = MONEY - cost * num1
  465. player.execute(cmd + " " + num1)
  466. }
  467. } else {
  468. player.say("§4§lYou don't have enough money!\n§rYou need $§4§l" + cost * num1 + "§r; You have: $§2§l" + MONEY)
  469. }
  470. })
  471. player.onChat(";sell/" + naaa5, function (num1: number, num2: number) {
  472. let cost = Math.floor(cosss5 / 1.5)
  473. let itemname5 = temname5
  474. let cmd = "clear @s " + cmmd5 + " 0"
  475. if (num1 == 0 || num1 == null) {
  476. num1 = 1
  477. }
  478. if (3 == 3) {
  479. if (num1 == 1) {
  480. player.say("You've sold: §l1§8§l " + itemname5 + "§r for $§l§2" + cost)
  481. MONEY = MONEY + cost
  482. player.execute(cmd + " 1")
  483. } else {
  484. player.say("You've sold: §l" + num1 + "§8§l " + itemname5 + "s§r for $§l§2" + cost * num1)
  485. MONEY = MONEY + cost * num1
  486. player.execute(cmd + " " + num1)
  487. }
  488. }
  489. })
  490.  
  491. let temname6 = "Obsidian"
  492. let naaa6 = "obsidian"
  493. let cmmd6 = "obsidian"
  494. let cosss6 = 175
  495. player.onChat(";cost/" + naaa6, function () {
  496. let cost = cosss6
  497. player.say("Item:§7§l " + temname6)
  498. player.say("--")
  499. player.say("Buy price: §2§l$" + cost)
  500. player.say("Sell price: §5§l$" + Math.floor(cost / 1.5))
  501. })
  502. player.onChat(";buy/" + naaa6, function (num1: number, num2: number) {
  503. let cost = cosss6
  504. let itemname6 = temname6
  505. let cmd = "give @s " + cmmd6
  506. if (num1 == 0 || num1 == null) {
  507. num1 = 1
  508. }
  509. if (MONEY >= cost * num1) {
  510. if (num1 == 1) {
  511. player.say("You've bought: §l1§8§l " + itemname6 + "§r for $§l§2" + cost)
  512. MONEY = MONEY - cost
  513. player.execute(cmd)
  514. } else {
  515. player.say("You've bought: §l" + num1 + "§8§l " + itemname6 + "s§r for $§l§2" + cost * num1)
  516. MONEY = MONEY - cost * num1
  517. player.execute(cmd + " " + num1)
  518. }
  519. } else {
  520. player.say("§4§lYou don't have enough money!\n§rYou need $§4§l" + cost * num1 + "§r; You have: $§2§l" + MONEY)
  521. }
  522. })
  523. player.onChat(";sell/" + naaa6, function (num1: number, num2: number) {
  524. let cost = Math.floor(cosss6 / 1.5)
  525. let itemname6 = temname6
  526. let cmd = "clear @s " + cmmd6 + " 0"
  527. if (num1 == 0 || num1 == null) {
  528. num1 = 1
  529. }
  530. if (3 == 3) {
  531. if (num1 == 1) {
  532. player.say("You've sold: §l1§8§l " + itemname6 + "§r for $§l§2" + cost)
  533. MONEY = MONEY + cost
  534. player.execute(cmd + " 1")
  535. } else {
  536. player.say("You've sold: §l" + num1 + "§8§l " + itemname6 + "s§r for $§l§2" + cost * num1)
  537. MONEY = MONEY + cost * num1
  538. player.execute(cmd + " " + num1)
  539. }
  540. }
  541. })
  542.  
  543. let temname7 = "Ender Pearl"
  544. let naaa7 = "enderpearl"
  545. let cmmd7 = "ender_pearl"
  546. let cosss7 = 1000
  547. player.onChat(";cost/" + naaa7, function () {
  548. let cost = cosss7
  549. player.say("Item:§7§l " + temname7)
  550. player.say("--")
  551. player.say("Buy price: §2§l$" + cost)
  552. player.say("Sell price: §5§l$" + Math.floor(cost / 1.5))
  553. })
  554. player.onChat(";buy/" + naaa7, function (num1: number, num2: number) {
  555. let cost = cosss7
  556. let itemname7 = temname7
  557. let cmd = "give @s " + cmmd7
  558. if (num1 == 0 || num1 == null) {
  559. num1 = 1
  560. }
  561. if (MONEY >= cost * num1) {
  562. if (num1 == 1) {
  563. player.say("You've bought: §l1§8§l " + itemname7 + "§r for $§l§2" + cost)
  564. MONEY = MONEY - cost
  565. player.execute(cmd)
  566. } else {
  567. player.say("You've bought: §l" + num1 + "§8§l " + itemname7 + "s§r for $§l§2" + cost * num1)
  568. MONEY = MONEY - cost * num1
  569. player.execute(cmd + " " + num1)
  570. }
  571. } else {
  572. player.say("§4§lYou don't have enough money!\n§rYou need $§4§l" + cost * num1 + "§r; You have: $§2§l" + MONEY)
  573. }
  574. })
  575. player.onChat(";sell/" + naaa7, function (num1: number, num2: number) {
  576. let cost = Math.floor(cosss7 / 1.5)
  577. let itemname7 = temname7
  578. let cmd = "clear @s " + cmmd7 + " 0"
  579. if (num1 == 0 || num1 == null) {
  580. num1 = 1
  581. }
  582. if (3 == 3) {
  583. if (num1 == 1) {
  584. player.say("You've sold: §l1§8§l " + itemname7 + "§r for $§l§2" + cost)
  585. MONEY = MONEY + cost
  586. player.execute(cmd + " 1")
  587. } else {
  588. player.say("You've sold: §l" + num1 + "§8§l " + itemname7 + "s§r for $§l§2" + cost * num1)
  589. MONEY = MONEY + cost * num1
  590. player.execute(cmd + " " + num1)
  591. }
  592. }
  593. })
  594.  
  595. let temname8 = "Cobblestone"
  596. let naaa8 = "cobblestone"
  597. let cmmd8 = "cobblestone"
  598. let cosss8 = 2
  599. player.onChat(";cost/" + naaa8, function () {
  600. let cost = cosss8
  601. player.say("Item:§7§l " + temname8)
  602. player.say("--")
  603. player.say("Buy price: §2§l$" + cost)
  604. player.say("Sell price: §5§l$" + Math.floor(cost / 1.5))
  605. })
  606. player.onChat(";buy/" + naaa8, function (num1: number, num2: number) {
  607. let cost = cosss8
  608. let itemname8 = temname8
  609. let cmd = "give @s " + cmmd8
  610. if (num1 == 0 || num1 == null) {
  611. num1 = 1
  612. }
  613. if (MONEY >= cost * num1) {
  614. if (num1 == 1) {
  615. player.say("You've bought: §l1§8§l " + itemname8 + "§r for $§l§2" + cost)
  616. MONEY = MONEY - cost
  617. player.execute(cmd)
  618. } else {
  619. player.say("You've bought: §l" + num1 + "§8§l " + itemname8 + "s§r for $§l§2" + cost * num1)
  620. MONEY = MONEY - cost * num1
  621. player.execute(cmd + " " + num1)
  622. }
  623. } else {
  624. player.say("§4§lYou don't have enough money!\n§rYou need $§4§l" + cost * num1 + "§r; You have: $§2§l" + MONEY)
  625. }
  626. })
  627. player.onChat(";sell/" + naaa8, function (num1: number, num2: number) {
  628. let cost = Math.floor(cosss8 / 1.5)
  629. let itemname8 = temname8
  630. let cmd = "clear @s " + cmmd8 + " 0"
  631. if (num1 == 0 || num1 == null) {
  632. num1 = 1
  633. }
  634. if (3 == 3) {
  635. if (num1 == 1) {
  636. player.say("You've sold: §l1§8§l " + itemname8 + "§r for $§l§2" + cost)
  637. MONEY = MONEY + cost
  638. player.execute(cmd + " 1")
  639. } else {
  640. player.say("You've sold: §l" + num1 + "§8§l " + itemname8 + "s§r for $§l§2" + cost * num1)
  641. MONEY = MONEY + cost * num1
  642. player.execute(cmd + " " + num1)
  643. }
  644. }
  645. })
  646.  
  647. let temname9 = "Oak Log"
  648. let naaa9 = "log"
  649. let cmmd9 = "log"
  650. let cosss9 = 6
  651. player.onChat(";cost/" + naaa9, function () {
  652. let cost = cosss9
  653. player.say("Item:§7§l " + temname9)
  654. player.say("--")
  655. player.say("Buy price: §2§l$" + cost)
  656. player.say("Sell price: §5§l$" + Math.floor(cost / 1.5))
  657. })
  658. player.onChat(";buy/" + naaa9, function (num1: number, num2: number) {
  659. let cost = cosss9
  660. let itemname9 = temname9
  661. let cmd = "give @s " + cmmd9
  662. if (num1 == 0 || num1 == null) {
  663. num1 = 1
  664. }
  665. if (MONEY >= cost * num1) {
  666. if (num1 == 1) {
  667. player.say("You've bought: §l1§8§l " + itemname9 + "§r for $§l§2" + cost)
  668. MONEY = MONEY - cost
  669. player.execute(cmd)
  670. } else {
  671. player.say("You've bought: §l" + num1 + "§8§l " + itemname9 + "s§r for $§l§2" + cost * num1)
  672. MONEY = MONEY - cost * num1
  673. player.execute(cmd + " " + num1)
  674. }
  675. } else {
  676. player.say("§4§lYou don't have enough money!\n§rYou need $§4§l" + cost * num1 + "§r; You have: $§2§l" + MONEY)
  677. }
  678. })
  679. player.onChat(";sell/" + naaa9, function (num1: number, num2: number) {
  680. let cost = Math.floor(cosss9 / 1.5)
  681. let itemname9 = temname9
  682. let cmd = "clear @s " + cmmd9 + " 0"
  683. if (num1 == 0 || num1 == null) {
  684. num1 = 1
  685. }
  686. if (3 == 3) {
  687. if (num1 == 1) {
  688. player.say("You've sold: §l1§8§l " + itemname9 + "§r for $§l§2" + cost)
  689. MONEY = MONEY + cost
  690. player.execute(cmd + " 1")
  691. } else {
  692. player.say("You've sold: §l" + num1 + "§8§l " + itemname9 + "s§r for $§l§2" + cost * num1)
  693. MONEY = MONEY + cost * num1
  694. player.execute(cmd + " " + num1)
  695. }
  696. }
  697. })
  698.  
  699. let temname10 = "Book"
  700. let naaa10 = "book"
  701. let cmmd10 = "book"
  702. let cosss10 = 100
  703. player.onChat(";cost/" + naaa10, function () {
  704. let cost = cosss10
  705. player.say("Item:§7§l " + temname10)
  706. player.say("--")
  707. player.say("Buy price: §2§l$" + cost)
  708. player.say("Sell price: §5§l$" + Math.floor(cost / 1.5))
  709. })
  710. player.onChat(";buy/" + naaa10, function (num1: number, num2: number) {
  711. let cost = cosss10
  712. let itemname10 = temname10
  713. let cmd = "give @s " + cmmd10
  714. if (num1 == 0 || num1 == null) {
  715. num1 = 1
  716. }
  717. if (MONEY >= cost * num1) {
  718. if (num1 == 1) {
  719. player.say("You've bought: §l1§8§l " + itemname10 + "§r for $§l§2" + cost)
  720. MONEY = MONEY - cost
  721. player.execute(cmd)
  722. } else {
  723. player.say("You've bought: §l" + num1 + "§8§l " + itemname10 + "s§r for $§l§2" + cost * num1)
  724. MONEY = MONEY - cost * num1
  725. player.execute(cmd + " " + num1)
  726. }
  727. } else {
  728. player.say("§4§lYou don't have enough money!\n§rYou need $§4§l" + cost * num1 + "§r; You have: $§2§l" + MONEY)
  729. }
  730. })
  731. player.onChat(";sell/" + naaa10, function (num1: number, num2: number) {
  732. let cost = Math.floor(cosss10 / 1.5)
  733. let itemname10 = temname10
  734. let cmd = "clear @s " + cmmd10 + " 0"
  735. if (num1 == 0 || num1 == null) {
  736. num1 = 1
  737. }
  738. if (3 == 3) {
  739. if (num1 == 1) {
  740. player.say("You've sold: §l1§8§l " + itemname10 + "§r for $§l§2" + cost)
  741. MONEY = MONEY + cost
  742. player.execute(cmd + " 1")
  743. } else {
  744. player.say("You've sold: §l" + num1 + "§8§l " + itemname10 + "s§r for $§l§2" + cost * num1)
  745. MONEY = MONEY + cost * num1
  746. player.execute(cmd + " " + num1)
  747. }
  748. }
  749. })
  750.  
  751. function shpp1() {
  752. let temname10 = "Golden Apple"
  753. let naaa10 = "goldenapple"
  754. let cmmd10 = "golden_apple"
  755. let cosss10 = 3700
  756. player.onChat(";cost/" + naaa10, function () {
  757. let cost = cosss10
  758. player.say("Item:§7§l " + temname10)
  759. player.say("--")
  760. player.say("Buy price: §2§l$" + cost)
  761. player.say("Sell price: §5§l$" + Math.floor(cost / 1.5))
  762. })
  763. player.onChat(";buy/" + naaa10, function (num1: number, num2: number) {
  764. let cost = cosss10
  765. let itemname10 = temname10
  766. let cmd = "give @s " + cmmd10
  767. if (num1 == 0 || num1 == null) {
  768. num1 = 1
  769. }
  770. if (MONEY >= cost * num1) {
  771. if (num1 == 1) {
  772. player.say("You've bought: §l1§8§l " + itemname10 + "§r for $§l§2" + cost)
  773. MONEY = MONEY - cost
  774. player.execute(cmd)
  775. } else {
  776. player.say("You've bought: §l" + num1 + "§8§l " + itemname10 + "s§r for $§l§2" + cost * num1)
  777. MONEY = MONEY - cost * num1
  778. player.execute(cmd + " " + num1)
  779. }
  780. } else {
  781. player.say("§4§lYou don't have enough money!\n§rYou need $§4§l" + cost * num1 + "§r; You have: $§2§l" + MONEY)
  782. }
  783. })
  784. player.onChat(";sell/" + naaa10, function (num1: number, num2: number) {
  785. let cost = Math.floor(cosss10 / 1.5)
  786. let itemname10 = temname10
  787. let cmd = "clear @s " + cmmd10 + " 0"
  788. if (num1 == 0 || num1 == null) {
  789. num1 = 1
  790. }
  791. if (3 == 3) {
  792. if (num1 == 1) {
  793. player.say("You've sold: §l1§8§l " + itemname10 + "§r for $§l§2" + cost)
  794. MONEY = MONEY + cost
  795. player.execute(cmd + " 1")
  796. } else {
  797. player.say("You've sold: §l" + num1 + "§8§l " + itemname10 + "s§r for $§l§2" + cost * num1)
  798. MONEY = MONEY + cost * num1
  799. player.execute(cmd + " " + num1)
  800. }
  801. }
  802. })
  803. }
  804. shpp1();
  805.  
  806. // smelting
  807. function boof1() {
  808. let a_itemname1 = "Iron Ingot"
  809. let a_itemvalue1 = "iron"
  810. let a_cmdname1 = "iron_ore"
  811. let b_cmdname1 = "iron_ingot"
  812.  
  813. player.onChat(";smelt/" + a_itemvalue1, function (num1: number, num2: number) {
  814. if (num1 == 0 || num1 == null) {
  815. num1 = 1
  816. }
  817. if (num1 * 15 <= MONEY) {
  818. player.execute("clear @s " + a_cmdname1 + " 0 " + num1)
  819. player.execute("give @s " + b_cmdname1 + " " + num1)
  820. MONEY = MONEY - num1 * 15
  821. if (num1 != 1) {
  822. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "s§r for §2§l$" + num1 * 15)
  823. } else {
  824. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "§r for §2§l$" + num1 * 15)
  825. }
  826. } else {
  827. player.say("§4§lYou don't even have enough money to smelt that, idiot.")
  828. }
  829. })
  830. }
  831. boof1();
  832.  
  833. function boof2() {
  834. let a_itemname1 = "Gold Ingot"
  835. let a_itemvalue1 = "gold"
  836. let a_cmdname1 = "gold_ore"
  837. let b_cmdname1 = "gold_ingot"
  838.  
  839. player.onChat(";smelt/" + a_itemvalue1, function (num1: number, num2: number) {
  840. if (num1 == 0 || num1 == null) {
  841. num1 = 1
  842. }
  843. if (num1 * 15 <= MONEY) {
  844. player.execute("clear @s " + a_cmdname1 + " 0 " + num1)
  845. player.execute("give @s " + b_cmdname1 + " " + num1)
  846. MONEY = MONEY - num1 * 15
  847. if (num1 != 1) {
  848. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "s§r for §2§l$" + num1 * 15)
  849. } else {
  850. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "§r for §2§l$" + num1 * 15)
  851. }
  852. } else {
  853. player.say("§4§lYou don't even have enough money to smelt that, idiot.")
  854. }
  855. })
  856. }
  857. boof2();
  858.  
  859. function boof3() {
  860. let a_itemname1 = "Cooked Porkchop"
  861. let a_itemvalue1 = "pork"
  862. let a_cmdname1 = "porkchop"
  863. let b_cmdname1 = "cooked_porkchop"
  864.  
  865. player.onChat(";smelt/" + a_itemvalue1, function (num1: number, num2: number) {
  866. if (num1 == 0 || num1 == null) {
  867. num1 = 1
  868. }
  869. if (num1 * 15 <= MONEY) {
  870. player.execute("clear @s " + a_cmdname1 + " 0 " + num1)
  871. player.execute("give @s " + b_cmdname1 + " " + num1)
  872. MONEY = MONEY - num1 * 15
  873. if (num1 != 1) {
  874. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "s§r for §2§l$" + num1 * 15)
  875. } else {
  876. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "§r for §2§l$" + num1 * 15)
  877. }
  878. } else {
  879. player.say("§4§lYou don't even have enough money to smelt that, idiot.")
  880. }
  881. })
  882. }
  883. boof3();
  884.  
  885. function boof4() {
  886. let a_itemname1 = "Cooked Beef"
  887. let a_itemvalue1 = "beef"
  888. let a_cmdname1 = "beef"
  889. let b_cmdname1 = "cooked_beef"
  890.  
  891. player.onChat(";smelt/" + a_itemvalue1, function (num1: number, num2: number) {
  892. if (num1 == 0 || num1 == null) {
  893. num1 = 1
  894. }
  895. if (num1 * 15 <= MONEY) {
  896. player.execute("clear @s " + a_cmdname1 + " 0 " + num1)
  897. player.execute("give @s " + b_cmdname1 + " " + num1)
  898. MONEY = MONEY - num1 * 15
  899. if (num1 != 1) {
  900. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "§r for §2§l$" + num1 * 15)
  901. } else {
  902. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "§r for §2§l$" + num1 * 15)
  903. }
  904. } else {
  905. player.say("§4§lYou don't even have enough money to smelt that, idiot.")
  906. }
  907. })
  908. }
  909. boof4();
  910. function boof5() {
  911. let a_itemname1 = "Cooked Chicken"
  912. let a_itemvalue1 = "chicken"
  913. let a_cmdname1 = "chicken"
  914. let b_cmdname1 = "cooked_chicken"
  915.  
  916. player.onChat(";smelt/" + a_itemvalue1, function (num1: number, num2: number) {
  917. if (num1 == 0 || num1 == null) {
  918. num1 = 1
  919. }
  920. if (num1 * 15 <= MONEY) {
  921. player.execute("clear @s " + a_cmdname1 + " 0 " + num1)
  922. player.execute("give @s " + b_cmdname1 + " " + num1)
  923. MONEY = MONEY - num1 * 15
  924. if (num1 != 1) {
  925. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "§r for §2§l$" + num1 * 15)
  926. } else {
  927. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "§r for §2§l$" + num1 * 15)
  928. }
  929. } else {
  930. player.say("§4§lYou don't even have enough money to smelt that, idiot.")
  931. }
  932. })
  933. }
  934. boof5();
  935. function boof6() {
  936. let a_itemname1 = "Cooked Mutton"
  937. let a_itemvalue1 = "mutton"
  938. let a_cmdname1 = "muttonraw"
  939. let b_cmdname1 = "muttoncooked"
  940.  
  941. player.onChat(";smelt/" + a_itemvalue1, function (num1: number, num2: number) {
  942. if (num1 == 0 || num1 == null) {
  943. num1 = 1
  944. }
  945. if (num1 * 15 <= MONEY) {
  946. player.execute("clear @s " + a_cmdname1 + " 0 " + num1)
  947. player.execute("give @s " + b_cmdname1 + " " + num1)
  948. MONEY = MONEY - num1 * 15
  949. if (num1 != 1) {
  950. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "§r for §2§l$" + num1 * 15)
  951. } else {
  952. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "§r for §2§l$" + num1 * 15)
  953. }
  954. } else {
  955. player.say("§4§lYou don't even have enough money to smelt that, idiot.")
  956. }
  957. })
  958. }
  959. boof6();
  960. function boof7() {
  961. let a_itemname1 = "Cooked Salmon"
  962. let a_itemvalue1 = "salmon"
  963. let a_cmdname1 = "salmon"
  964. let b_cmdname1 = "cooked_salmon"
  965.  
  966. player.onChat(";smelt/" + a_itemvalue1, function (num1: number, num2: number) {
  967. if (num1 == 0 || num1 == null) {
  968. num1 = 1
  969. }
  970. if (num1 * 15 <= MONEY) {
  971. player.execute("clear @s " + a_cmdname1 + " 0 " + num1)
  972. player.execute("give @s " + b_cmdname1 + " " + num1)
  973. MONEY = MONEY - num1 * 15
  974. if (num1 != 1) {
  975. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "§r for §2§l$" + num1 * 15)
  976. } else {
  977. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "§r for §2§l$" + num1 * 15)
  978. }
  979. } else {
  980. player.say("§4§lYou don't even have enough money to smelt that, idiot.")
  981. }
  982. })
  983. }
  984. boof7();
  985. function boof8() {
  986. let a_itemname1 = "Cooked Rabbit"
  987. let a_itemvalue1 = "rabbit"
  988. let a_cmdname1 = "rabbit"
  989. let b_cmdname1 = "cooked_rabbit"
  990.  
  991. player.onChat(";smelt/" + a_itemvalue1, function (num1: number, num2: number) {
  992. if (num1 == 0 || num1 == null) {
  993. num1 = 1
  994. }
  995. if (num1 * 15 <= MONEY) {
  996. player.execute("clear @s " + a_cmdname1 + " 0 " + num1)
  997. player.execute("give @s " + b_cmdname1 + " " + num1)
  998. MONEY = MONEY - num1 * 15
  999. if (num1 != 1) {
  1000. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "§r for §2§l$" + num1 * 15)
  1001. } else {
  1002. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "§r for §2§l$" + num1 * 15)
  1003. }
  1004. } else {
  1005. player.say("§4§lYou don't even have enough money to smelt that, idiot.")
  1006. }
  1007. })
  1008. }
  1009. boof8();
  1010. function boof9() {
  1011. let a_itemname1 = "Cooked Salmon"
  1012. let a_itemvalue1 = "salmon"
  1013. let a_cmdname1 = "salmon"
  1014. let b_cmdname1 = "cooked_salmon"
  1015.  
  1016. player.onChat(";smelt/" + a_itemvalue1, function (num1: number, num2: number) {
  1017. if (num1 == 0 || num1 == null) {
  1018. num1 = 1
  1019. }
  1020. if (num1 * 15 <= MONEY) {
  1021. player.execute("clear @s " + a_cmdname1 + " 0 " + num1)
  1022. player.execute("give @s " + b_cmdname1 + " " + num1)
  1023. MONEY = MONEY - num1 * 15
  1024. if (num1 != 1) {
  1025. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "§r for §2§l$" + num1 * 15)
  1026. } else {
  1027. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "§r for §2§l$" + num1 * 15)
  1028. }
  1029. } else {
  1030. player.say("§4§lYou don't even have enough money to smelt that, idiot.")
  1031. }
  1032. })
  1033. }
  1034. boof9();
  1035. function boof10() {
  1036. let a_itemname1 = "Cooked Cod"
  1037. let a_itemvalue1 = "cod"
  1038. let a_cmdname1 = "fish"
  1039. let b_cmdname1 = "cooked_fish"
  1040.  
  1041. player.onChat(";smelt/" + a_itemvalue1, function (num1: number, num2: number) {
  1042. if (num1 == 0 || num1 == null) {
  1043. num1 = 1
  1044. }
  1045. if (num1 * 15 <= MONEY) {
  1046. player.execute("clear @s " + a_cmdname1 + " 0 " + num1)
  1047. player.execute("give @s " + b_cmdname1 + " " + num1)
  1048. MONEY = MONEY - num1 * 15
  1049. if (num1 != 1) {
  1050. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "§r for §2§l$" + num1 * 15)
  1051. } else {
  1052. player.say("Smelted §l" + num1 + " §7" + a_itemname1 + "§r for §2§l$" + num1 * 15)
  1053. }
  1054. } else {
  1055. player.say("§4§lYou don't even have enough money to smelt that, idiot.")
  1056. }
  1057. })
  1058. }
  1059. boof10();
  1060.  
  1061.  
  1062. player.onDied(function () {
  1063. let math = Math.randomRange(0,25)
  1064. if (math != 0) {
  1065. let amountToLose = Math.floor(MONEY * (math/100))
  1066. MONEY = MONEY - amountToLose
  1067. player.say("§4Ouch! You dropped §l$" + amountToLose +"§r§4 when you died. You now have §6§l$"+MONEY)
  1068. } else {
  1069. player.say("§4You held onto your wallet as you vaporized! You dropped §6§l$0")
  1070. }
  1071. })
  1072.  
  1073. player.onChat(";sethome", function () {
  1074. player.say("§l§3Your home position has been set to §6(" + player.position().add(positions.create(0, 0, 0)) + ")")
  1075. home = player.position().add(positions.create(0, 0, 0))
  1076. })
  1077.  
  1078. function gohome() {
  1079. player.say("§lIt costs §2§l$500§r§l to fast travel back to your home, would you like to fast travel?")
  1080. player.say("Reply with §2Yes§r§l or §4No§r§l.")
  1081. player.onChat("yes", function () {
  1082. if (homer == 1) {
  1083. homer = 0
  1084. if (home != null) {
  1085. if (MONEY >= 500) {
  1086. MONEY = MONEY - 500
  1087. player.teleport(home)
  1088. player.execute("playsound random.break @a ~ ~ ~ 5 0.6")
  1089. player.say("You paid §2§l$500§r to teleport to §5§lhome§r. You now have §2§l$"+MONEY+".")
  1090. } else {
  1091. player.say("§4§lYou don't even have enough money to pay for your trip lmao.")
  1092. }
  1093. } else {
  1094. player.say("§4§lYou don't even have a home dum dum.")
  1095. }
  1096. }
  1097. })
  1098. player.onChat("no", function () {
  1099. if (homer == 1) {
  1100. homer = 0
  1101. player.say("§lOk, canceling.")
  1102. }
  1103. })
  1104. }
  1105.  
  1106. player.onChat(";gohome", function () {
  1107. homer = 1
  1108. gohome()
  1109. })
  1110.  
  1111. if (tips == true) {
  1112. loops.forever(function () {
  1113. loops.pause(120000)
  1114. let math = Math.randomRange(0, 10)
  1115. if (math == 0) {
  1116. player.say("§7§lTip:§r§7 Coal is basically useless, just sell it and use the ;smelt command instead.")
  1117. } else if (math == 1) {
  1118. player.say("§7§lTip:§r§7 Gambling isn't always worth it, betting alot of money could result in a big loss!")
  1119. } else if (math == 2) {
  1120. player.say("§7§lTip:§r§7 Killing mobs yields lots of profit!")
  1121. } else if (math == 3) {
  1122. player.say("§7§lTip:§r§7 You can turn off these tips in the initial settings!")
  1123. } else if (math == 4) {
  1124. player.say("§7§lTip:§r§7 You can buy and sell cobblestone! No trash bin needed.")
  1125. } else if (math == 5) {
  1126. player.say("§7§lTip:§r§7 If you read this you're beautiful!")
  1127. } else if (math == 6) {
  1128. player.say("§7§lTip:§r§7 Combining villager trades and the shop could make you rich!")
  1129. } else if (math == 7) {
  1130. player.say("§7§lTip:§r§7 Items sell for 75% of their value.")
  1131. } else if (math == 8) {
  1132. player.say("§7§lTip:§r§7 Remember to budget items rather then spending all of your money immediatly!")
  1133. } else if (math == 9) {
  1134. player.say("§7§lTip:§r§7 If you need building supplies, buy logs from the shop!")
  1135. } else if (math == 10) {
  1136. player.say("§7§lTip:§r§7 You can also cook food with the ;smelt command!")
  1137. }
  1138. })
  1139. }
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement