Advertisement
Guest User

Untitled

a guest
Nov 10th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 153.37 KB | None | 0 0
  1.  
  2. clicker = {}
  3. outputlimit = 15
  4. function onLoad()
  5. tokens =getObjectFromGUID("b4ef95")
  6. bigbag = getObjectFromGUID("606a2d")
  7. --each page contains 12 prizes
  8. --Small prizes
  9. link = getObjectFromGUID("745d53")
  10. C4 = getObjectFromGUID("716267")
  11. Pikachu = getObjectFromGUID("7f90f7")
  12. Staryu = getObjectFromGUID("7b3a06")
  13. Charmander = getObjectFromGUID("ad88ed")
  14. Ivysaur = getObjectFromGUID("b434c2")
  15. Bulbasaur = getObjectFromGUID("311b41")
  16. Squirtle = getObjectFromGUID("284186")
  17. Magikarp = getObjectFromGUID("5b6628")
  18. Abra = getObjectFromGUID("bf24cf")
  19. Geodude = getObjectFromGUID("9ff6f7")
  20. Kabuto = getObjectFromGUID("f5ab41")
  21.  
  22. Mankey = getObjectFromGUID("158287")
  23. Porygon = getObjectFromGUID("31f43c")
  24. Ponyta = getObjectFromGUID("e23f1a")
  25. Zubat = getObjectFromGUID("1ca24b")
  26. Machop = getObjectFromGUID("58961a")
  27. Diglett = getObjectFromGUID("f2af83")
  28. Meowth = getObjectFromGUID("2c4678")
  29. Ekans = getObjectFromGUID("31a661")
  30. Spearow = getObjectFromGUID("1171db")
  31. Oddish = getObjectFromGUID("b2c969")
  32. Poliwag = getObjectFromGUID("cb239f")
  33. Poliwhirl = getObjectFromGUID("5d6c7a")
  34.  
  35. Psyduck = getObjectFromGUID("c10cdd")
  36. Sandshrew = getObjectFromGUID("c40192")
  37. Clefairy = getObjectFromGUID("c094df")
  38. Caterpie = getObjectFromGUID("a1e8a4")
  39. NidoranMale = getObjectFromGUID("bfc840")
  40. NidoranFemale = getObjectFromGUID("8bd73b")
  41. Weedle = getObjectFromGUID("954fbd")
  42. Pidgey = getObjectFromGUID("6aa865")
  43. Vulpix = getObjectFromGUID("76064f")
  44. Jigglypuff = getObjectFromGUID("1d634f")
  45. Ratata = getObjectFromGUID("d43998")
  46. Eevee = getObjectFromGUID("b2afa7")
  47.  
  48. Omanyte = getObjectFromGUID("eac203")
  49. Ditto = getObjectFromGUID("6d387f")
  50. Cubone = getObjectFromGUID("6f9ed3")
  51. Horsea = getObjectFromGUID("f33e54")
  52. Magnemite = getObjectFromGUID("9e8a69")
  53. Haunter = getObjectFromGUID("46ca45")
  54. Duodrio = getObjectFromGUID("bc121e")
  55. --Medium Prizes
  56. Mew = getObjectFromGUID("31c260")
  57. Dragonite = getObjectFromGUID("1a060f")
  58. Dragonair = getObjectFromGUID("661303")
  59. Magneton = getObjectFromGUID("e21ba4")
  60. Lapras = getObjectFromGUID("a1b5ae")
  61. Vaporeon = getObjectFromGUID("f013ea")
  62. Jolteon = getObjectFromGUID("7624dd")
  63. Flareon = getObjectFromGUID("e60e5b")
  64. Charmeleon = getObjectFromGUID("de2c3f")
  65. Snorlax = getObjectFromGUID("843223")
  66. Dugtrio = getObjectFromGUID("439f8c")
  67. Wartortle = getObjectFromGUID("ff6d71")
  68.  
  69. Masterball = getObjectFromGUID("c5e529")
  70. Safariball = getObjectFromGUID("0ad7d2")
  71. Pokeball = getObjectFromGUID("775517")
  72. Levelball = getObjectFromGUID("afb634")
  73. Cloneball = getObjectFromGUID("cf6384")
  74. Ultraball = getObjectFromGUID("a75bc1")
  75. Premierball = getObjectFromGUID("611fe4")
  76. Loveball = getObjectFromGUID("4b49ca")
  77. Greatball = getObjectFromGUID("5764a9")
  78. Cherishball = getObjectFromGUID("d4df90")
  79. Lureball = getObjectFromGUID("d971d2")
  80. Ambrosia = getObjectFromGUID("f271d5")
  81.  
  82. Slurm = getObjectFromGUID("9d9ceb")
  83. Duff = getObjectFromGUID("961e97")
  84. Pokegearblue = getObjectFromGUID("6ba0f4")
  85. Pokegearpink = getObjectFromGUID("80d7b1")
  86. Gameboy = getObjectFromGUID("8ae0f3")
  87. Cooler = getObjectFromGUID("53e201")
  88. Pokecenter = getObjectFromGUID("47a10f")
  89. Skyrim = getObjectFromGUID("f2475f")
  90. Probedroid = getObjectFromGUID("2fab48")
  91. Uselessdevice = getObjectFromGUID("61c8bf")
  92. Rupeebag = getObjectFromGUID("b56e6f")
  93. Brain = getObjectFromGUID("97954c")
  94.  
  95. BlackSkele = getObjectFromGUID("39a152")
  96. Diamond = getObjectFromGUID("224667")
  97. Skelebow = getObjectFromGUID("c1c342")
  98. Blackskelebow = getObjectFromGUID("7c08fc")
  99. DwarvenHe = getObjectFromGUID("57b33a")
  100. Bonecrown = getObjectFromGUID("7933f0")
  101. BlackSkull = getObjectFromGUID("c8a31e")
  102. Kynareth = getObjectFromGUID("fbbb6d")
  103. Stendarr = getObjectFromGUID("eb0f7d")
  104. Talos = getObjectFromGUID("c010ae")
  105. Dibella = getObjectFromGUID("3d1ec6")
  106. Akatosh = getObjectFromGUID("fb047c")
  107.  
  108. Zenithar = getObjectFromGUID("430c5b")
  109. Mara = getObjectFromGUID("cb8ef3")
  110. Julianos = getObjectFromGUID("3e5639")
  111. Arkay = getObjectFromGUID("8b6f48")
  112. --Large Prizes
  113. Moltres = getObjectFromGUID("9b13f4")
  114. Zapdos = getObjectFromGUID("4805e7")
  115. Articuno = getObjectFromGUID("488c70")
  116. Mewtwo = getObjectFromGUID("51720d")
  117. Lady = getObjectFromGUID("0da675")
  118. Companioncube = getObjectFromGUID("65e3b2")
  119. Skeletonking = getObjectFromGUID("a4cdd6")
  120. Thunderball = getObjectFromGUID("0c8b11")
  121. Leprechaun = getObjectFromGUID("1fa0d0")
  122. Bluecake = getObjectFromGUID("fd10ee")
  123. Redcake = getObjectFromGUID("c18844")
  124. Masterhand = getObjectFromGUID("50faf7")
  125.  
  126. Moose = getObjectFromGUID("767746")
  127. Bantharider = getObjectFromGUID("af78c5")
  128. Cthulhu = getObjectFromGUID("6554c1")
  129. Goldentank = getObjectFromGUID("6fb190")
  130. ATST = getObjectFromGUID("909cfd")
  131. Flyingfairy = getObjectFromGUID("ea0a9a")
  132. Daedrichel = getObjectFromGUID("c012fe")
  133. Ebonyhel = getObjectFromGUID("658f4d")
  134. Dragonhel = getObjectFromGUID("69b1bc")
  135. Tuskenraid = getObjectFromGUID("a351f7")
  136. Obi = getObjectFromGUID("d5e44d")
  137. Chew = getObjectFromGUID("6abe1e")
  138.  
  139. Jawa = getObjectFromGUID("958a99")
  140. Leia = getObjectFromGUID("313947")
  141. Rebel = getObjectFromGUID("7fdf17")
  142. Stormtrooper = getObjectFromGUID("e32d81")
  143. Han = getObjectFromGUID("f96cbe")
  144. Luke = getObjectFromGUID("af6b4f")
  145. Greedo = getObjectFromGUID("181944")
  146. Royalchamp = getObjectFromGUID("f90c71")
  147. C3PO = getObjectFromGUID("9e840f")
  148. Impguard = getObjectFromGUID("70e6ad")
  149. R2d2 = getObjectFromGUID("3015c2")
  150. Boba= getObjectFromGUID("ef1c4e")
  151.  
  152. Vader = getObjectFromGUID("e4764e")
  153. Palp = getObjectFromGUID("0e0693")
  154.  
  155. requiresToken = true
  156. initiate()
  157. end
  158.  
  159. function initiate()
  160. self.clearButtons()
  161. self.clearInputs()
  162. self.createButton({click_function = 'ffgStart', function_owner = self, label = 'Small Prizes', position = {2,0.45,2}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  163. self.createButton({click_function = 'mediumprizes1', function_owner = self, label = 'Medium Prizes', position = {2,0.45,3}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  164. self.createButton({click_function = 'largeprizes1', function_owner = self, label = 'Large Prizes', position = {2,0.45,4}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  165. self.createButton({click_function = 'buytokens', function_owner = self, label = 'Buy tokens', position = {2,0.45,5}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  166. end
  167.  
  168. function buytokens()
  169. self.clearButtons()
  170. self.clearInputs()
  171. self.createButton({click_function = 'convertButton1000', function_owner = self, label = 'Buy', position = {0,0.45,2}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  172. self.createButton({click_function = 'FFGinitiate', function_owner = self, label = 'Back', position = {-2,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  173. self.createButton({click_function = 'nil', function_owner = self, label = '[b] [FF0000]PUT CHIPS HERE[/b][-]', position = {4,0.25,0}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  174. end
  175. function convertButton1000(object, player)
  176.  
  177. clicker = player
  178. spawnZoneswe('1000')
  179.  
  180. end
  181.  
  182. --[[ Spawn a scripting zone on the input platform. The actual conversion is performed in the callback function calculateAndConvert --]]
  183.  
  184. function spawnZoneswe(value)
  185.  
  186. --[[spawn scripting zone on in surface--]]
  187.  
  188. local p = self.getPosition()
  189. local r = self.getRotation()
  190. local s = self.getScale()
  191.  
  192. params = {}
  193.  
  194. params.type = 'ScriptingTrigger'
  195. params.callback = 'calculateAndConvert'
  196. params.callback_owner = self
  197. params.params = {value}
  198. params.scale = {4, 9, 6.5}
  199. params.position = {p.x - math.cos(math.rad(r.y)) * (2.5 * s.x), p.y + 4.5, p.z + math.sin(math.rad(r.y)) * (5.5 * s.x)}
  200. params.rotation = self.getRotation()
  201.  
  202. zone = spawnObject(params)
  203.  
  204. end
  205.  
  206. --[[ Counts the chips in the zone, spawns new chips, destroys old chips --]]
  207.  
  208. function calculateAndConvert(zone, pvalue)
  209.  
  210. local chips = {}
  211. local chipvalues = {1000, 500, 100, 50, 10}
  212. local yoffset = 0.0825
  213. local p = self.getPosition()
  214. local r = self.getRotation()
  215. local s = self.getScale()
  216. local objects = zone.getObjects()
  217.  
  218. for i, v in ipairs (objects) do
  219. if v.tag == 'Chip' and (v.getValue() or tonumber(v.getName()) > 0) then
  220. chips[#chips+1] = v
  221. end
  222. end
  223.  
  224. local value = getChipValues(chips)
  225. if value > (tonumber(pvalue[1]) * outputlimit) then
  226. broadcastToColor(tostring('Error: Conversion exceeds output limit of '..outputlimit..' chips. Please reduce input amount.'), clicker, {1, 0, 0})
  227. clicker = {}
  228. return 0
  229. end
  230.  
  231. --[[ Abort and print message if the conversion will spawn more chips than the output limit--]]
  232.  
  233. if value < (1000) then
  234. broadcastToColor(tostring("Insert at least $1000"),clicker, {1,0.25,0.25})
  235. clicker = {}
  236. return 0
  237. end
  238. for i, v in ipairs (chipvalues) do
  239. while v == tonumber(pvalue[1]) and v <= value do
  240. local params = {}
  241. params.smooth = false
  242. params.position = {p.x + math.cos(math.rad(r.y)) * (2 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y)) * (2 * s.x)}
  243. tokens.takeObject(params)
  244. value = value - v
  245. yoffset = yoffset + 0.165
  246. end
  247. end
  248. for i, v in ipairs (chipvalues) do
  249. while v < tonumber(pvalue[1]) and v <= value do
  250. local params = {}
  251. params.type = 'Chip_'..v
  252. params.position = {p.x + math.cos(math.rad(r.y)) * (2 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y)) * (2 * s.x)}
  253. spawnObject(params)
  254.  
  255. value = (value ) - v
  256. yoffset = yoffset + 0.165
  257. end
  258. end
  259. --[[ destroy zone --]]
  260. zone.destruct()
  261.  
  262. --[[ destroy inserted money --]]
  263. for i, v in ipairs (chips) do
  264. v.destruct()
  265. end
  266.  
  267. clicker = {}
  268.  
  269. end
  270.  
  271. function getChipValues(chips)
  272.  
  273. local value = 0
  274.  
  275. for j, w in ipairs (chips) do
  276. if w.getQuantity() < 0 then
  277. if w.getValue() then
  278. value = value + w.getValue()
  279. else
  280. value = value + tonumber(w.getName())
  281. end
  282. else
  283. if w.getValue() then
  284. value = value + (w.getValue() * w.getQuantity())
  285. else
  286. value = value + (tonumber(w.getName()) * w.getQuantity())
  287. end
  288. end
  289. end
  290. return value
  291.  
  292. end
  293.  
  294. function ffgStart()
  295. self.clearButtons()
  296. self.clearInputs()
  297. self.createButton({click_function = 'FFGinitiate', function_owner = self, label = 'Back', position = {-2,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  298. self.createButton({click_function = 'nextside', function_owner = self, label = 'Next', position = {6,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  299. self.createButton({label="Link", click_function="Linkfunc", function_owner=self, position={-2,0.25,2}, width = 1600, height = 380, font_size = 200})
  300. self.createButton({label="C4", click_function="c4func", function_owner=self, position={-2,0.25,3}, width = 1600, height = 380, font_size = 200})
  301. self.createButton({label="Pikachu", click_function="pikachufunc", function_owner=self, position={-2,0.25,4}, width = 1600, height = 380, font_size = 200})
  302. self.createButton({label="Staryu", click_function="staryufunc", function_owner=self, position={-2,0.25,5}, width = 1600, height = 380, font_size = 200})
  303. self.createButton({label="Charmander", click_function="Charmanderfunc", function_owner=self, position={2,0.25,2}, width = 1600, height = 380, font_size = 200})
  304. self.createButton({label="Ivysaur", click_function="Ivysaurfunc", function_owner=self, position={2,0.25,3}, width = 1600, height = 380, font_size = 200})
  305. self.createButton({label="Bulbasaur", click_function="Bulbasaurfunc", function_owner=self, position={2,0.25,4}, width = 1600, height = 380, font_size = 200})
  306. self.createButton({label="Squirtle", click_function="Squirtlefunc", function_owner=self, position={2,0.25,5}, width = 1600, height = 380, font_size = 200})
  307. self.createButton({label="Magikarp", click_function="Magikarpfunc", function_owner=self, position={6,0.25,2}, width = 1600, height = 380, font_size = 200})
  308. self.createButton({label="Abra", click_function="Abrafunc", function_owner=self, position={6,0.25,3}, width = 1600, height = 380, font_size = 200})
  309. self.createButton({label="Geodude", click_function="Geodudefunc", function_owner=self, position={6,0.25,4}, width = 1600, height = 380, font_size = 200})
  310. self.createButton({label="Kabuto", click_function="Kabutofunc", function_owner=self, position={6,0.25,5}, width = 1600, height = 380, font_size = 200})
  311.  
  312. end
  313.  
  314. function FFGinitiate()
  315. if lista ~= nil then
  316. lista = nil
  317. end
  318. if partList ~= nil then
  319. partList = nil
  320. end
  321. initiate()
  322. end
  323.  
  324. function Linkfunc(container, color)
  325. col = color
  326. if insertToken() then
  327. startLuaCoroutine(self, "play")
  328. else
  329. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  330. end
  331. end
  332. function insertToken()
  333.  
  334. for i, obj in pairs(self.getObjects()) do
  335. if obj.name == "Small Prize Token" then
  336. local params = {}
  337. params.guid = obj.guid
  338. params.smooth = true
  339. params.position = self.getPosition()
  340. params.position.y = params.position.y + 4
  341. takenObject = self.takeObject(params)
  342. takenObject.destruct()
  343. return true
  344. end
  345. end
  346. return false
  347. end
  348. function play ()
  349. bigbag.getObjects()
  350. bigbag.takeObject({
  351. guid="745d53",
  352. callback_function = function(obj)
  353. take_callback(obj)
  354. end,
  355. })
  356. return 1
  357. end
  358. function take_callback(obj)
  359. local params = {}
  360. local p = self.getPosition()
  361. local r = self.getRotation()
  362. local s = self.getScale()
  363. local yoffset = 0.0825
  364. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  365. params.smooth = false
  366. yoffset = yoffset + 0.165
  367. clone = obj.clone(params)
  368. bigbag.putObject(obj)
  369. clone.setName("link")
  370. end
  371.  
  372. function c4func(container, color)
  373. col = color
  374. if insertToken2() then
  375. startLuaCoroutine(self, "play2")
  376. else
  377. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  378. end
  379. end
  380.  
  381. function insertToken2()
  382.  
  383. for i, obj in pairs(self.getObjects()) do
  384. if obj.name == "Small Prize Token" then
  385. local params = {}
  386. params.guid = obj.guid
  387. params.smooth = true
  388. params.position = self.getPosition()
  389. params.position.y = params.position.y + 4
  390. takenObject = self.takeObject(params)
  391. takenObject.destruct()
  392. return true
  393. end
  394. end
  395. return false
  396. end
  397. function play2 ()
  398. local params = {}
  399. params.position = self.getPosition()
  400. params.rotation = self.getRotation()
  401. params.rotation.x = params.rotation.x - 90
  402. params.rotation.z = params.rotation.z - 180
  403. params.position.z = params.position.z - 4
  404. params.position.y = params.position.y + 3
  405. local p = self.getPosition()
  406. local r = self.getRotation()
  407. local s = self.getScale()
  408. local yoffset = 0.0825
  409. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  410. yoffset = yoffset + 0.165
  411. params.smooth = false
  412. C4.takeObject(params)
  413. return 1
  414. end
  415.  
  416. function pikachufunc(container, color)
  417. col = color
  418. if insertToken3() then
  419. startLuaCoroutine(self, "play3")
  420. else
  421. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  422. end
  423. end
  424.  
  425. function insertToken3()
  426.  
  427. for i, obj in pairs(self.getObjects()) do
  428. if obj.name == "Small Prize Token" then
  429. local params = {}
  430. params.guid = obj.guid
  431. params.smooth = true
  432. params.position = self.getPosition()
  433. params.position.y = params.position.y + 4
  434. takenObject = self.takeObject(params)
  435. takenObject.destruct()
  436. return true
  437. end
  438. end
  439. return false
  440. end
  441. function play3 ()
  442. local params = {}
  443. params.position = self.getPosition()
  444. local p = self.getPosition()
  445. local r = self.getRotation()
  446. local s = self.getScale()
  447. local yoffset = 0.0825
  448. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  449. params.smooth = false
  450. yoffset = yoffset + 0.165
  451. params.smooth = false
  452. Pikachu.takeObject(params)
  453. return 1
  454. end
  455.  
  456. function staryufunc(container, color)
  457. col = color
  458. if insertToken4() then
  459. startLuaCoroutine(self, "play4")
  460. else
  461. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  462. end
  463. end
  464.  
  465. function insertToken4()
  466.  
  467. for i, obj in pairs(self.getObjects()) do
  468. if obj.name == "Small Prize Token" then
  469. local params = {}
  470. params.guid = obj.guid
  471. params.smooth = true
  472. params.position = self.getPosition()
  473. params.position.y = params.position.y + 4
  474. takenObject = self.takeObject(params)
  475. takenObject.destruct()
  476. return true
  477. end
  478. end
  479. return false
  480. end
  481. function play4 ()
  482. local params = {}
  483. local p = self.getPosition()
  484. local r = self.getRotation()
  485. local s = self.getScale()
  486. local yoffset = 0.0825
  487. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  488. yoffset = yoffset + 0.165
  489. params.smooth = false
  490. Staryu.takeObject(params)
  491. return 1
  492. end
  493.  
  494. function Charmanderfunc(container, color)
  495. col = color
  496. if insertToken5() then
  497. startLuaCoroutine(self, "play5")
  498. else
  499. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  500. end
  501. end
  502.  
  503. function insertToken5()
  504.  
  505. for i, obj in pairs(self.getObjects()) do
  506. if obj.name == "Small Prize Token" then
  507. local params = {}
  508. params.guid = obj.guid
  509. params.smooth = true
  510. params.position = self.getPosition()
  511. params.position.y = params.position.y + 4
  512. takenObject = self.takeObject(params)
  513. takenObject.destruct()
  514. return true
  515. end
  516. end
  517. return false
  518. end
  519. function play5 ()
  520. local params = {}
  521. local p = self.getPosition()
  522. local r = self.getRotation()
  523. local s = self.getScale()
  524. local yoffset = 0.0825
  525. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  526. yoffset = yoffset + 0.165
  527. params.smooth = false
  528. Charmander.takeObject(params)
  529. return 1
  530. end
  531.  
  532. function Ivysaurfunc(container, color)
  533. col = color
  534. if insertToken6() then
  535. startLuaCoroutine(self, "play6")
  536. else
  537. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  538. end
  539. end
  540.  
  541. function insertToken6()
  542.  
  543. for i, obj in pairs(self.getObjects()) do
  544. if obj.name == "Small Prize Token" then
  545. local params = {}
  546. params.guid = obj.guid
  547. params.smooth = true
  548. params.position = self.getPosition()
  549. params.position.y = params.position.y + 4
  550. takenObject = self.takeObject(params)
  551. takenObject.destruct()
  552. return true
  553. end
  554. end
  555. return false
  556. end
  557. function play6 ()
  558. local params = {}
  559. local p = self.getPosition()
  560. local r = self.getRotation()
  561. local s = self.getScale()
  562. local yoffset = 0.0825
  563. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  564. yoffset = yoffset + 0.165
  565. params.smooth = false
  566. Ivysaur.takeObject(params)
  567. return 1
  568. end
  569.  
  570. function Bulbasaurfunc(container, color)
  571. col = color
  572. if insertToken7() then
  573. startLuaCoroutine(self, "play7")
  574. else
  575. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  576. end
  577. end
  578.  
  579. function insertToken7()
  580.  
  581. for i, obj in pairs(self.getObjects()) do
  582. if obj.name == "Small Prize Token" then
  583. local params = {}
  584. params.guid = obj.guid
  585. params.smooth = true
  586. params.position = self.getPosition()
  587. params.position.y = params.position.y + 4
  588. takenObject = self.takeObject(params)
  589. takenObject.destruct()
  590. return true
  591. end
  592. end
  593. return false
  594. end
  595. function play7 ()
  596. local params = {}
  597. local p = self.getPosition()
  598. local r = self.getRotation()
  599. local s = self.getScale()
  600. local yoffset = 0.0825
  601. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  602. yoffset = yoffset + 0.165
  603. params.smooth = false
  604. Bulbasaur.takeObject(params)
  605. return 1
  606. end
  607.  
  608. function Squirtlefunc(container, color)
  609. col = color
  610. if insertToken8() then
  611. startLuaCoroutine(self, "play8")
  612. else
  613. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  614. end
  615. end
  616.  
  617. function insertToken8()
  618.  
  619. for i, obj in pairs(self.getObjects()) do
  620. if obj.name == "Small Prize Token" then
  621. local params = {}
  622. params.guid = obj.guid
  623. params.smooth = true
  624. params.position = self.getPosition()
  625. params.position.y = params.position.y + 4
  626. takenObject = self.takeObject(params)
  627. takenObject.destruct()
  628. return true
  629. end
  630. end
  631. return false
  632. end
  633. function play8 ()
  634. local params = {}
  635. local p = self.getPosition()
  636. local r = self.getRotation()
  637. local s = self.getScale()
  638. local yoffset = 0.0825
  639. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  640. yoffset = yoffset + 0.165
  641. params.smooth = false
  642. Squirtle.takeObject(params)
  643. return 1
  644. end
  645.  
  646. function Magikarpfunc(container, color)
  647. col = color
  648. if insertToken9() then
  649. startLuaCoroutine(self, "play9")
  650. else
  651. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  652. end
  653. end
  654.  
  655. function insertToken9()
  656.  
  657. for i, obj in pairs(self.getObjects()) do
  658. if obj.name == "Small Prize Token" then
  659. local params = {}
  660. params.guid = obj.guid
  661. params.smooth = true
  662. params.position = self.getPosition()
  663. params.position.y = params.position.y + 4
  664. takenObject = self.takeObject(params)
  665. takenObject.destruct()
  666. return true
  667. end
  668. end
  669. return false
  670. end
  671. function play9 ()
  672. local params = {}
  673. local p = self.getPosition()
  674. local r = self.getRotation()
  675. local s = self.getScale()
  676. local yoffset = 0.0825
  677. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  678. yoffset = yoffset + 0.165
  679. params.smooth = false
  680. Magikarp.takeObject(params)
  681. return 1
  682. end
  683.  
  684. function Abrafunc(container, color)
  685. col = color
  686. if insertToken10() then
  687. startLuaCoroutine(self, "play10")
  688. else
  689. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  690. end
  691. end
  692.  
  693. function insertToken10()
  694.  
  695. for i, obj in pairs(self.getObjects()) do
  696. if obj.name == "Small Prize Token" then
  697. local params = {}
  698. params.guid = obj.guid
  699. params.smooth = true
  700. params.position = self.getPosition()
  701. params.position.y = params.position.y + 4
  702. takenObject = self.takeObject(params)
  703. takenObject.destruct()
  704. return true
  705. end
  706. end
  707. return false
  708. end
  709. function play10 ()
  710. local params = {}
  711. local p = self.getPosition()
  712. local r = self.getRotation()
  713. local s = self.getScale()
  714. local yoffset = 0.0825
  715. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  716. yoffset = yoffset + 0.165
  717. params.smooth = false
  718. Abra.takeObject(params)
  719. return 1
  720. end
  721.  
  722. function Geodudefunc(container, color)
  723. col = color
  724. if insertToken11() then
  725. startLuaCoroutine(self, "play11")
  726. else
  727. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  728. end
  729. end
  730.  
  731. function insertToken11()
  732.  
  733. for i, obj in pairs(self.getObjects()) do
  734. if obj.name == "Small Prize Token" then
  735. local params = {}
  736. params.guid = obj.guid
  737. params.smooth = true
  738. params.position = self.getPosition()
  739. params.position.y = params.position.y + 4
  740. takenObject = self.takeObject(params)
  741. takenObject.destruct()
  742. return true
  743. end
  744. end
  745. return false
  746. end
  747. function play11 ()
  748. local params = {}
  749. local p = self.getPosition()
  750. local r = self.getRotation()
  751. local s = self.getScale()
  752. local yoffset = 0.0825
  753. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  754. yoffset = yoffset + 0.165
  755. params.smooth = false
  756. Geodude.takeObject(params)
  757. return 1
  758. end
  759.  
  760. function Kabutofunc(container, color)
  761. col = color
  762. if insertToken12() then
  763. startLuaCoroutine(self, "play12")
  764. else
  765. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  766. end
  767. end
  768.  
  769. function insertToken12()
  770.  
  771. for i, obj in pairs(self.getObjects()) do
  772. if obj.name == "Small Prize Token" then
  773. local params = {}
  774. params.guid = obj.guid
  775. params.smooth = true
  776. params.position = self.getPosition()
  777. params.position.y = params.position.y + 4
  778. takenObject = self.takeObject(params)
  779. takenObject.destruct()
  780. return true
  781. end
  782. end
  783. return false
  784. end
  785. function play12 ()
  786. local params = {}
  787. local p = self.getPosition()
  788. local r = self.getRotation()
  789. local s = self.getScale()
  790. local yoffset = 0.0825
  791. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  792. yoffset = yoffset + 0.165
  793. params.smooth = false
  794. Kabuto.takeObject(params)
  795. return 1
  796. end
  797.  
  798. function nextside()
  799. self.clearButtons()
  800. self.clearInputs()
  801. self.createButton({click_function = 'FFGinitiate2', function_owner = self, label = 'Back', position = {-2,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  802. self.createButton({click_function = 'nextside2', function_owner = self, label = 'Next', position = {6,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  803. self.createButton({label="Mankey", click_function="Mankeyfunc", function_owner=self, position={-2,0.25,2}, width = 1600, height = 380, font_size = 200})
  804. self.createButton({label="Porygon", click_function="Porygonfunc", function_owner=self, position={-2,0.25,3}, width = 1600, height = 380, font_size = 200})
  805. self.createButton({label="Ponyta", click_function="Ponytafunc", function_owner=self, position={-2,0.25,4}, width = 1600, height = 380, font_size = 200})
  806. self.createButton({label="Zubat", click_function="Zubatfunc", function_owner=self, position={-2,0.25,5}, width = 1600, height = 380, font_size = 200})
  807. self.createButton({label="Machop", click_function="Machopfunc", function_owner=self, position={2,0.25,2}, width = 1600, height = 380, font_size = 200})
  808. self.createButton({label="Diglett", click_function="Diglettfunc", function_owner=self, position={2,0.25,3}, width = 1600, height = 380, font_size = 200})
  809. self.createButton({label="Meowth", click_function="Meowthfunc", function_owner=self, position={2,0.25,4}, width = 1600, height = 380, font_size = 200})
  810. self.createButton({label="Ekans", click_function="Ekansfunc", function_owner=self, position={2,0.25,5}, width = 1600, height = 380, font_size = 200})
  811. self.createButton({label="Spearow", click_function="Spearowfunc", function_owner=self, position={6,0.25,2}, width = 1600, height = 380, font_size = 200})
  812. self.createButton({label="Oddish", click_function="Oddishfunc", function_owner=self, position={6,0.25,3}, width = 1600, height = 380, font_size = 200})
  813. self.createButton({label="Poliwag", click_function="Poliwagfunc", function_owner=self, position={6,0.25,4}, width = 1600, height = 380, font_size = 200})
  814. self.createButton({label="Poliwhirl", click_function="Poliwhirlfunc", function_owner=self, position={6,0.25,5}, width = 1600, height = 380, font_size = 200})
  815. end
  816. function FFGinitiate2()
  817. if lista ~= nil then
  818. lista = nil
  819. end
  820. if partList ~= nil then
  821. partList = nil
  822. end
  823. ffgStart()
  824. end
  825.  
  826. function Mankeyfunc(container, color)
  827. col = color
  828. if insertToken13() then
  829. startLuaCoroutine(self, "play13")
  830. else
  831. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  832. end
  833. end
  834.  
  835. function insertToken13()
  836.  
  837. for i, obj in pairs(self.getObjects()) do
  838. if obj.name == "Small Prize Token" then
  839. local params = {}
  840. params.guid = obj.guid
  841. params.smooth = true
  842. params.position = self.getPosition()
  843. params.position.y = params.position.y + 4
  844. takenObject = self.takeObject(params)
  845. takenObject.destruct()
  846. return true
  847. end
  848. end
  849. return false
  850. end
  851. function play13 ()
  852. local params = {}
  853. local p = self.getPosition()
  854. local r = self.getRotation()
  855. local s = self.getScale()
  856. local yoffset = 0.0825
  857. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  858. yoffset = yoffset + 0.165
  859. params.smooth = false
  860. Mankey.takeObject(params)
  861. return 1
  862. end
  863.  
  864. function Porygonfunc(container, color)
  865. col = color
  866. if insertToken14() then
  867. startLuaCoroutine(self, "play14")
  868. else
  869. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  870. end
  871. end
  872.  
  873. function insertToken14()
  874.  
  875. for i, obj in pairs(self.getObjects()) do
  876. if obj.name == "Small Prize Token" then
  877. local params = {}
  878. params.guid = obj.guid
  879. params.smooth = true
  880. params.position = self.getPosition()
  881. params.position.y = params.position.y + 4
  882. takenObject = self.takeObject(params)
  883. takenObject.destruct()
  884. return true
  885. end
  886. end
  887. return false
  888. end
  889. function play14 ()
  890. local params = {}
  891. local p = self.getPosition()
  892. local r = self.getRotation()
  893. local s = self.getScale()
  894. local yoffset = 0.0825
  895. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  896. yoffset = yoffset + 0.165
  897. params.smooth = false
  898. Porygon.takeObject(params)
  899. return 1
  900. end
  901.  
  902. function Ponytafunc(container, color)
  903. col = color
  904. if insertToken15() then
  905. startLuaCoroutine(self, "play15")
  906. else
  907. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  908. end
  909. end
  910.  
  911. function insertToken15()
  912.  
  913. for i, obj in pairs(self.getObjects()) do
  914. if obj.name == "Small Prize Token" then
  915. local params = {}
  916. params.guid = obj.guid
  917. params.smooth = true
  918. params.position = self.getPosition()
  919. params.position.y = params.position.y + 4
  920. takenObject = self.takeObject(params)
  921. takenObject.destruct()
  922. return true
  923. end
  924. end
  925. return false
  926. end
  927. function play15 ()
  928. local params = {}
  929. local p = self.getPosition()
  930. local r = self.getRotation()
  931. local s = self.getScale()
  932. local yoffset = 0.0825
  933. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  934. yoffset = yoffset + 0.165
  935. params.smooth = false
  936. Ponyta.takeObject(params)
  937. return 1
  938. end
  939.  
  940. function Zubatfunc(container, color)
  941. col = color
  942. if insertToken16() then
  943. startLuaCoroutine(self, "play16")
  944. else
  945. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  946. end
  947. end
  948.  
  949. function insertToken16()
  950.  
  951. for i, obj in pairs(self.getObjects()) do
  952. if obj.name == "Small Prize Token" then
  953. local params = {}
  954. params.guid = obj.guid
  955. params.smooth = true
  956. params.position = self.getPosition()
  957. params.position.y = params.position.y + 4
  958. takenObject = self.takeObject(params)
  959. takenObject.destruct()
  960. return true
  961. end
  962. end
  963. return false
  964. end
  965. function play16 ()
  966. local params = {}
  967. local p = self.getPosition()
  968. local r = self.getRotation()
  969. local s = self.getScale()
  970. local yoffset = 0.0825
  971. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  972. yoffset = yoffset + 0.165
  973. params.smooth = false
  974. Zubat.takeObject(params)
  975. return 1
  976. end
  977.  
  978. function Machopfunc(container, color)
  979. col = color
  980. if insertToken17() then
  981. startLuaCoroutine(self, "play17")
  982. else
  983. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  984. end
  985. end
  986.  
  987. function insertToken17()
  988.  
  989. for i, obj in pairs(self.getObjects()) do
  990. if obj.name == "Small Prize Token" then
  991. local params = {}
  992. params.guid = obj.guid
  993. params.smooth = true
  994. params.position = self.getPosition()
  995. params.position.y = params.position.y + 4
  996. takenObject = self.takeObject(params)
  997. takenObject.destruct()
  998. return true
  999. end
  1000. end
  1001. return false
  1002. end
  1003. function play17 ()
  1004. local params = {}
  1005. local p = self.getPosition()
  1006. local r = self.getRotation()
  1007. local s = self.getScale()
  1008. local yoffset = 0.0825
  1009. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1010. yoffset = yoffset + 0.165
  1011. params.smooth = false
  1012. Machop.takeObject(params)
  1013. return 1
  1014. end
  1015.  
  1016. function Diglettfunc(container, color)
  1017. col = color
  1018. if insertToken18() then
  1019. startLuaCoroutine(self, "play18")
  1020. else
  1021. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1022. end
  1023. end
  1024.  
  1025. function insertToken18()
  1026.  
  1027. for i, obj in pairs(self.getObjects()) do
  1028. if obj.name == "Small Prize Token" then
  1029. local params = {}
  1030. params.guid = obj.guid
  1031. params.smooth = true
  1032. params.position = self.getPosition()
  1033. params.position.y = params.position.y + 4
  1034. takenObject = self.takeObject(params)
  1035. takenObject.destruct()
  1036. return true
  1037. end
  1038. end
  1039. return false
  1040. end
  1041. function play18 ()
  1042. local params = {}
  1043. local p = self.getPosition()
  1044. local r = self.getRotation()
  1045. local s = self.getScale()
  1046. local yoffset = 0.0825
  1047. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1048. yoffset = yoffset + 0.165
  1049. params.smooth = false
  1050. Diglett.takeObject(params)
  1051. return 1
  1052. end
  1053.  
  1054. function Meowthfunc(container, color)
  1055. col = color
  1056. if insertToken19() then
  1057. startLuaCoroutine(self, "play19")
  1058. else
  1059. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1060. end
  1061. end
  1062.  
  1063. function insertToken19()
  1064.  
  1065. for i, obj in pairs(self.getObjects()) do
  1066. if obj.name == "Small Prize Token" then
  1067. local params = {}
  1068. params.guid = obj.guid
  1069. params.smooth = true
  1070. params.position = self.getPosition()
  1071. params.position.y = params.position.y + 4
  1072. takenObject = self.takeObject(params)
  1073. takenObject.destruct()
  1074. return true
  1075. end
  1076. end
  1077. return false
  1078. end
  1079. function play19 ()
  1080. local params = {}
  1081. local p = self.getPosition()
  1082. local r = self.getRotation()
  1083. local s = self.getScale()
  1084. local yoffset = 0.0825
  1085. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1086. yoffset = yoffset + 0.165
  1087. params.smooth = false
  1088. Meowth.takeObject(params)
  1089. return 1
  1090. end
  1091.  
  1092. function Ekansfunc(container, color)
  1093. col = color
  1094. if insertToken20() then
  1095. startLuaCoroutine(self, "play20")
  1096. else
  1097. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1098. end
  1099. end
  1100.  
  1101. function insertToken20()
  1102.  
  1103. for i, obj in pairs(self.getObjects()) do
  1104. if obj.name == "Small Prize Token" then
  1105. local params = {}
  1106. params.guid = obj.guid
  1107. params.smooth = true
  1108. params.position = self.getPosition()
  1109. params.position.y = params.position.y + 4
  1110. takenObject = self.takeObject(params)
  1111. takenObject.destruct()
  1112. return true
  1113. end
  1114. end
  1115. return false
  1116. end
  1117. function play20 ()
  1118. local params = {}
  1119. local p = self.getPosition()
  1120. local r = self.getRotation()
  1121. local s = self.getScale()
  1122. local yoffset = 0.0825
  1123. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1124. yoffset = yoffset + 0.165
  1125. params.smooth = false
  1126. Ekans.takeObject(params)
  1127. return 1
  1128. end
  1129.  
  1130. function Spearowfunc(container, color)
  1131. col = color
  1132. if insertToken21() then
  1133. startLuaCoroutine(self, "play21")
  1134. else
  1135. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1136. end
  1137. end
  1138.  
  1139. function insertToken21()
  1140.  
  1141. for i, obj in pairs(self.getObjects()) do
  1142. if obj.name == "Small Prize Token" then
  1143. local params = {}
  1144. params.guid = obj.guid
  1145. params.smooth = true
  1146. params.position = self.getPosition()
  1147. params.position.y = params.position.y + 4
  1148. takenObject = self.takeObject(params)
  1149. takenObject.destruct()
  1150. return true
  1151. end
  1152. end
  1153. return false
  1154. end
  1155. function play21 ()
  1156. local params = {}
  1157. local p = self.getPosition()
  1158. local r = self.getRotation()
  1159. local s = self.getScale()
  1160. local yoffset = 0.0825
  1161. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1162. yoffset = yoffset + 0.165
  1163. params.smooth = false
  1164. Spearow.takeObject(params)
  1165. return 1
  1166. end
  1167.  
  1168. function Oddishfunc(container, color)
  1169. col = color
  1170. if insertToken22() then
  1171. startLuaCoroutine(self, "play22")
  1172. else
  1173. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1174. end
  1175. end
  1176.  
  1177. function insertToken22()
  1178.  
  1179. for i, obj in pairs(self.getObjects()) do
  1180. if obj.name == "Small Prize Token" then
  1181. local params = {}
  1182. params.guid = obj.guid
  1183. params.smooth = true
  1184. params.position = self.getPosition()
  1185. params.position.y = params.position.y + 4
  1186. takenObject = self.takeObject(params)
  1187. takenObject.destruct()
  1188. return true
  1189. end
  1190. end
  1191. return false
  1192. end
  1193. function play22 ()
  1194. local params = {}
  1195. local p = self.getPosition()
  1196. local r = self.getRotation()
  1197. local s = self.getScale()
  1198. local yoffset = 0.0825
  1199. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1200. yoffset = yoffset + 0.165
  1201. params.smooth = false
  1202. Oddish.takeObject(params)
  1203. return 1
  1204. end
  1205.  
  1206. function Poliwagfunc(container, color)
  1207. col = color
  1208. if insertToken23() then
  1209. startLuaCoroutine(self, "play23")
  1210. else
  1211. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1212. end
  1213. end
  1214.  
  1215. function insertToken23()
  1216.  
  1217. for i, obj in pairs(self.getObjects()) do
  1218. if obj.name == "Small Prize Token" then
  1219. local params = {}
  1220. params.guid = obj.guid
  1221. params.smooth = true
  1222. params.position = self.getPosition()
  1223. params.position.y = params.position.y + 4
  1224. takenObject = self.takeObject(params)
  1225. takenObject.destruct()
  1226. return true
  1227. end
  1228. end
  1229. return false
  1230. end
  1231. function play23 ()
  1232. local params = {}
  1233. local p = self.getPosition()
  1234. local r = self.getRotation()
  1235. local s = self.getScale()
  1236. local yoffset = 0.0825
  1237. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1238. yoffset = yoffset + 0.165
  1239. params.smooth = false
  1240. Poliwag.takeObject(params)
  1241. return 1
  1242. end
  1243.  
  1244. function Poliwhirlfunc(container, color)
  1245. col = color
  1246. if insertToken24() then
  1247. startLuaCoroutine(self, "play24")
  1248. else
  1249. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1250. end
  1251. end
  1252.  
  1253. function insertToken24()
  1254.  
  1255. for i, obj in pairs(self.getObjects()) do
  1256. if obj.name == "Small Prize Token" then
  1257. local params = {}
  1258. params.guid = obj.guid
  1259. params.smooth = true
  1260. params.position = self.getPosition()
  1261. params.position.y = params.position.y + 4
  1262. takenObject = self.takeObject(params)
  1263. takenObject.destruct()
  1264. return true
  1265. end
  1266. end
  1267. return false
  1268. end
  1269. function play24 ()
  1270. local params = {}
  1271. local p = self.getPosition()
  1272. local r = self.getRotation()
  1273. local s = self.getScale()
  1274. local yoffset = 0.0825
  1275. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1276. yoffset = yoffset + 0.165
  1277. params.smooth = false
  1278. Poliwhirl.takeObject(params)
  1279. return 1
  1280. end
  1281.  
  1282. function nextside2()
  1283. self.clearButtons()
  1284. self.clearInputs()
  1285. self.createButton({click_function = 'FFGinitiate3', function_owner = self, label = 'Back', position = {-2,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  1286. self.createButton({click_function = 'nextside3', function_owner = self, label = 'Next', position = {6,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  1287. self.createButton({label="Psyduck", click_function="Psyduckfunc", function_owner=self, position={-2,0.25,2}, width = 1600, height = 380, font_size = 200})
  1288. self.createButton({label="Sandshrew", click_function="Sandshrewfunc", function_owner=self, position={-2,0.25,3}, width = 1600, height = 380, font_size = 200})
  1289. self.createButton({label="Clefairy", click_function="Clefairyfunc", function_owner=self, position={-2,0.25,4}, width = 1600, height = 380, font_size = 200})
  1290. self.createButton({label="Caterpie", click_function="Caterpiefunc", function_owner=self, position={-2,0.25,5}, width = 1600, height = 380, font_size = 200})
  1291. self.createButton({label="NidoranMale", click_function="NidoranMalefunc", function_owner=self, position={2,0.25,2}, width = 1600, height = 380, font_size = 200})
  1292. self.createButton({label="NidoranFemale", click_function="NidoranFemalefunc", function_owner=self, position={2,0.25,3}, width = 1600, height = 380, font_size = 200})
  1293. self.createButton({label="Weedle", click_function="Weedlefunc", function_owner=self, position={2,0.25,4}, width = 1600, height = 380, font_size = 200})
  1294. self.createButton({label="Pidgey", click_function="Pidgeyfunc", function_owner=self, position={2,0.25,5}, width = 1600, height = 380, font_size = 200})
  1295. self.createButton({label="Vulpix", click_function="Vulpixfunc", function_owner=self, position={6,0.25,2}, width = 1600, height = 380, font_size = 200})
  1296. self.createButton({label="Jigglypuff", click_function="Jigglypufffunc", function_owner=self, position={6,0.25,3}, width = 1600, height = 380, font_size = 200})
  1297. self.createButton({label="Ratata", click_function="Ratatafunc", function_owner=self, position={6,0.25,4}, width = 1600, height = 380, font_size = 200})
  1298. self.createButton({label="Eevee", click_function="Eeveefunc", function_owner=self, position={6,0.25,5}, width = 1600, height = 380, font_size = 200})
  1299. end
  1300. function FFGinitiate3()
  1301. if lista ~= nil then
  1302. lista = nil
  1303. end
  1304. if partList ~= nil then
  1305. partList = nil
  1306. end
  1307. nextside()
  1308. end
  1309.  
  1310. function Psyduckfunc(container, color)
  1311. col = color
  1312. if insertToken25() then
  1313. startLuaCoroutine(self, "play25")
  1314. else
  1315. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1316. end
  1317. end
  1318.  
  1319. function insertToken25()
  1320.  
  1321. for i, obj in pairs(self.getObjects()) do
  1322. if obj.name == "Small Prize Token" then
  1323. local params = {}
  1324. params.guid = obj.guid
  1325. params.smooth = true
  1326. params.position = self.getPosition()
  1327. params.position.y = params.position.y + 4
  1328. takenObject = self.takeObject(params)
  1329. takenObject.destruct()
  1330. return true
  1331. end
  1332. end
  1333. return false
  1334. end
  1335. function play25 ()
  1336. local params = {}
  1337. local p = self.getPosition()
  1338. local r = self.getRotation()
  1339. local s = self.getScale()
  1340. local yoffset = 0.0825
  1341. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1342. yoffset = yoffset + 0.165
  1343. params.smooth = false
  1344. Psyduck.takeObject(params)
  1345. return 1
  1346. end
  1347.  
  1348. function Sandshrewfunc(container, color)
  1349. col = color
  1350. if insertToken26() then
  1351. startLuaCoroutine(self, "play26")
  1352. else
  1353. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1354. end
  1355. end
  1356.  
  1357. function insertToken26()
  1358.  
  1359. for i, obj in pairs(self.getObjects()) do
  1360. if obj.name == "Small Prize Token" then
  1361. local params = {}
  1362. params.guid = obj.guid
  1363. params.smooth = true
  1364. params.position = self.getPosition()
  1365. params.position.y = params.position.y + 4
  1366. takenObject = self.takeObject(params)
  1367. takenObject.destruct()
  1368. return true
  1369. end
  1370. end
  1371. return false
  1372. end
  1373. function play26 ()
  1374. local params = {}
  1375. local p = self.getPosition()
  1376. local r = self.getRotation()
  1377. local s = self.getScale()
  1378. local yoffset = 0.0825
  1379. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1380. yoffset = yoffset + 0.165
  1381. params.smooth = false
  1382. Sandshrew.takeObject(params)
  1383. return 1
  1384. end
  1385.  
  1386. function Clefairyfunc(container, color)
  1387. col = color
  1388. if insertToken27() then
  1389. startLuaCoroutine(self, "play27")
  1390. else
  1391. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1392. end
  1393. end
  1394.  
  1395. function insertToken27()
  1396.  
  1397. for i, obj in pairs(self.getObjects()) do
  1398. if obj.name == "Small Prize Token" then
  1399. local params = {}
  1400. params.guid = obj.guid
  1401. params.smooth = true
  1402. params.position = self.getPosition()
  1403. params.position.y = params.position.y + 4
  1404. takenObject = self.takeObject(params)
  1405. takenObject.destruct()
  1406. return true
  1407. end
  1408. end
  1409. return false
  1410. end
  1411. function play27 ()
  1412. local params = {}
  1413. local p = self.getPosition()
  1414. local r = self.getRotation()
  1415. local s = self.getScale()
  1416. local yoffset = 0.0825
  1417. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1418. yoffset = yoffset + 0.165
  1419. params.smooth = false
  1420. Clefairy.takeObject(params)
  1421. return 1
  1422. end
  1423.  
  1424. function Caterpiefunc(container, color)
  1425. col = color
  1426. if insertToken28() then
  1427. startLuaCoroutine(self, "play28")
  1428. else
  1429. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1430. end
  1431. end
  1432.  
  1433. function insertToken28()
  1434.  
  1435. for i, obj in pairs(self.getObjects()) do
  1436. if obj.name == "Small Prize Token" then
  1437. local params = {}
  1438. params.guid = obj.guid
  1439. params.smooth = true
  1440. params.position = self.getPosition()
  1441. params.position.y = params.position.y + 4
  1442. takenObject = self.takeObject(params)
  1443. takenObject.destruct()
  1444. return true
  1445. end
  1446. end
  1447. return false
  1448. end
  1449. function play28 ()
  1450. local params = {}
  1451. local p = self.getPosition()
  1452. local r = self.getRotation()
  1453. local s = self.getScale()
  1454. local yoffset = 0.0825
  1455. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1456. yoffset = yoffset + 0.165
  1457. params.smooth = false
  1458. Caterpie.takeObject(params)
  1459. return 1
  1460. end
  1461.  
  1462. function NidoranMalefunc(container, color)
  1463. col = color
  1464. if insertToken29() then
  1465. startLuaCoroutine(self, "play29")
  1466. else
  1467. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1468. end
  1469. end
  1470.  
  1471. function insertToken29()
  1472.  
  1473. for i, obj in pairs(self.getObjects()) do
  1474. if obj.name == "Small Prize Token" then
  1475. local params = {}
  1476. params.guid = obj.guid
  1477. params.smooth = true
  1478. params.position = self.getPosition()
  1479. params.position.y = params.position.y + 4
  1480. takenObject = self.takeObject(params)
  1481. takenObject.destruct()
  1482. return true
  1483. end
  1484. end
  1485. return false
  1486. end
  1487. function play29 ()
  1488. local params = {}
  1489. local p = self.getPosition()
  1490. local r = self.getRotation()
  1491. local s = self.getScale()
  1492. local yoffset = 0.0825
  1493. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1494. yoffset = yoffset + 0.165
  1495. params.smooth = false
  1496. NidoranMale.takeObject(params)
  1497. return 1
  1498. end
  1499.  
  1500. function NidoranFemalefunc(container, color)
  1501. col = color
  1502. if insertToken30() then
  1503. startLuaCoroutine(self, "play30")
  1504. else
  1505. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1506. end
  1507. end
  1508.  
  1509. function insertToken30()
  1510.  
  1511. for i, obj in pairs(self.getObjects()) do
  1512. if obj.name == "Small Prize Token" then
  1513. local params = {}
  1514. params.guid = obj.guid
  1515. params.smooth = true
  1516. params.position = self.getPosition()
  1517. params.position.y = params.position.y + 4
  1518. takenObject = self.takeObject(params)
  1519. takenObject.destruct()
  1520. return true
  1521. end
  1522. end
  1523. return false
  1524. end
  1525. function play30 ()
  1526. local params = {}
  1527. local p = self.getPosition()
  1528. local r = self.getRotation()
  1529. local s = self.getScale()
  1530. local yoffset = 0.0825
  1531. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1532. yoffset = yoffset + 0.165
  1533. params.smooth = false
  1534. NidoranFemale.takeObject(params)
  1535. return 1
  1536. end
  1537.  
  1538. function Weedlefunc(container, color)
  1539. col = color
  1540. if insertToken31() then
  1541. startLuaCoroutine(self, "play31")
  1542. else
  1543. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1544. end
  1545. end
  1546.  
  1547. function insertToken31()
  1548.  
  1549. for i, obj in pairs(self.getObjects()) do
  1550. if obj.name == "Small Prize Token" then
  1551. local params = {}
  1552. params.guid = obj.guid
  1553. params.smooth = true
  1554. params.position = self.getPosition()
  1555. params.position.y = params.position.y + 4
  1556. takenObject = self.takeObject(params)
  1557. takenObject.destruct()
  1558. return true
  1559. end
  1560. end
  1561. return false
  1562. end
  1563. function play31 ()
  1564. local params = {}
  1565. local p = self.getPosition()
  1566. local r = self.getRotation()
  1567. local s = self.getScale()
  1568. local yoffset = 0.0825
  1569. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1570. yoffset = yoffset + 0.165
  1571. params.smooth = false
  1572. Weedle.takeObject(params)
  1573. return 1
  1574. end
  1575.  
  1576. function Pidgeyfunc(container, color)
  1577. col = color
  1578. if insertToken32() then
  1579. startLuaCoroutine(self, "play32")
  1580. else
  1581. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1582. end
  1583. end
  1584.  
  1585. function insertToken32()
  1586.  
  1587. for i, obj in pairs(self.getObjects()) do
  1588. if obj.name == "Small Prize Token" then
  1589. local params = {}
  1590. params.guid = obj.guid
  1591. params.smooth = true
  1592. params.position = self.getPosition()
  1593. params.position.y = params.position.y + 4
  1594. takenObject = self.takeObject(params)
  1595. takenObject.destruct()
  1596. return true
  1597. end
  1598. end
  1599. return false
  1600. end
  1601. function play32 ()
  1602. local params = {}
  1603. local p = self.getPosition()
  1604. local r = self.getRotation()
  1605. local s = self.getScale()
  1606. local yoffset = 0.0825
  1607. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1608. yoffset = yoffset + 0.165
  1609. params.smooth = false
  1610. Pidgey.takeObject(params)
  1611. return 1
  1612. end
  1613.  
  1614. function Vulpixfunc(container, color)
  1615. col = color
  1616. if insertToken33() then
  1617. startLuaCoroutine(self, "play33")
  1618. else
  1619. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1620. end
  1621. end
  1622.  
  1623. function insertToken33()
  1624.  
  1625. for i, obj in pairs(self.getObjects()) do
  1626. if obj.name == "Small Prize Token" then
  1627. local params = {}
  1628. params.guid = obj.guid
  1629. params.smooth = true
  1630. params.position = self.getPosition()
  1631. params.position.y = params.position.y + 4
  1632. takenObject = self.takeObject(params)
  1633. takenObject.destruct()
  1634. return true
  1635. end
  1636. end
  1637. return false
  1638. end
  1639. function play33 ()
  1640. local params = {}
  1641. local p = self.getPosition()
  1642. local r = self.getRotation()
  1643. local s = self.getScale()
  1644. local yoffset = 0.0825
  1645. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1646. yoffset = yoffset + 0.165
  1647. params.smooth = false
  1648. Vulpix.takeObject(params)
  1649. return 1
  1650. end
  1651.  
  1652. function Jigglypufffunc(container, color)
  1653. col = color
  1654. if insertToken34() then
  1655. startLuaCoroutine(self, "play34")
  1656. else
  1657. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1658. end
  1659. end
  1660.  
  1661. function insertToken34()
  1662.  
  1663. for i, obj in pairs(self.getObjects()) do
  1664. if obj.name == "Small Prize Token" then
  1665. local params = {}
  1666. params.guid = obj.guid
  1667. params.smooth = true
  1668. params.position = self.getPosition()
  1669. params.position.y = params.position.y + 4
  1670. takenObject = self.takeObject(params)
  1671. takenObject.destruct()
  1672. return true
  1673. end
  1674. end
  1675. return false
  1676. end
  1677. function play34 ()
  1678. local params = {}
  1679. local p = self.getPosition()
  1680. local r = self.getRotation()
  1681. local s = self.getScale()
  1682. local yoffset = 0.0825
  1683. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1684. yoffset = yoffset + 0.165
  1685. params.smooth = false
  1686. Jigglypuff.takeObject(params)
  1687. return 1
  1688. end
  1689.  
  1690. function Ratatafunc(container, color)
  1691. col = color
  1692. if insertToken35() then
  1693. startLuaCoroutine(self, "play35")
  1694. else
  1695. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1696. end
  1697. end
  1698.  
  1699. function insertToken35()
  1700.  
  1701. for i, obj in pairs(self.getObjects()) do
  1702. if obj.name == "Small Prize Token" then
  1703. local params = {}
  1704. params.guid = obj.guid
  1705. params.smooth = true
  1706. params.position = self.getPosition()
  1707. params.position.y = params.position.y + 4
  1708. takenObject = self.takeObject(params)
  1709. takenObject.destruct()
  1710. return true
  1711. end
  1712. end
  1713. return false
  1714. end
  1715. function play35 ()
  1716. local params = {}
  1717. local p = self.getPosition()
  1718. local r = self.getRotation()
  1719. local s = self.getScale()
  1720. local yoffset = 0.0825
  1721. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1722. yoffset = yoffset + 0.165
  1723. params.smooth = false
  1724. Ratata.takeObject(params)
  1725. return 1
  1726. end
  1727.  
  1728. function Eeveefunc(container, color)
  1729. col = color
  1730. if insertToken36() then
  1731. startLuaCoroutine(self, "play36")
  1732. else
  1733. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1734. end
  1735. end
  1736.  
  1737. function insertToken36()
  1738.  
  1739. for i, obj in pairs(self.getObjects()) do
  1740. if obj.name == "Small Prize Token" then
  1741. local params = {}
  1742. params.guid = obj.guid
  1743. params.smooth = true
  1744. params.position = self.getPosition()
  1745. params.position.y = params.position.y + 4
  1746. takenObject = self.takeObject(params)
  1747. takenObject.destruct()
  1748. return true
  1749. end
  1750. end
  1751. return false
  1752. end
  1753. function play36 ()
  1754. local params = {}
  1755. local p = self.getPosition()
  1756. local r = self.getRotation()
  1757. local s = self.getScale()
  1758. local yoffset = 0.0825
  1759. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1760. yoffset = yoffset + 0.165
  1761. params.smooth = false
  1762. Eevee.takeObject(params)
  1763. return 1
  1764. end
  1765.  
  1766. function nextside3()
  1767. self.clearButtons()
  1768. self.clearInputs()
  1769. self.createButton({click_function = 'FFGinitiate4', function_owner = self, label = 'Back', position = {-2,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  1770. self.createButton({label="Omanyte", click_function="Omanytefunc", function_owner=self, position={-2,0.25,2}, width = 1600, height = 380, font_size = 200})
  1771. self.createButton({label="Ditto", click_function="Dittofunc", function_owner=self, position={-2,0.25,3}, width = 1600, height = 380, font_size = 200})
  1772. self.createButton({label="Cubone", click_function="Cubonefunc", function_owner=self, position={-2,0.25,4}, width = 1600, height = 380, font_size = 200})
  1773. self.createButton({label="Horsea", click_function="Horseafunc", function_owner=self, position={-2,0.25,5}, width = 1600, height = 380, font_size = 200})
  1774. self.createButton({label="Magnemite", click_function="Magnemitefunc", function_owner=self, position={2,0.25,2}, width = 1600, height = 380, font_size = 200})
  1775. self.createButton({label="Haunter", click_function="Haunterfunc", function_owner=self, position={2,0.25,3}, width = 1600, height = 380, font_size = 200})
  1776. self.createButton({label="Duodrio", click_function="Duodriofunc", function_owner=self, position={2,0.25,4}, width = 1600, height = 380, font_size = 200})
  1777. end
  1778. function FFGinitiate4()
  1779. if lista ~= nil then
  1780. lista = nil
  1781. end
  1782. if partList ~= nil then
  1783. partList = nil
  1784. end
  1785. nextside2()
  1786. end
  1787.  
  1788. function Omanytefunc(container, color)
  1789. col = color
  1790. if insertToken37() then
  1791. startLuaCoroutine(self, "play37")
  1792. else
  1793. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1794. end
  1795. end
  1796.  
  1797. function insertToken37()
  1798.  
  1799. for i, obj in pairs(self.getObjects()) do
  1800. if obj.name == "Small Prize Token" then
  1801. local params = {}
  1802. params.guid = obj.guid
  1803. params.smooth = true
  1804. params.position = self.getPosition()
  1805. params.position.y = params.position.y + 4
  1806. takenObject = self.takeObject(params)
  1807. takenObject.destruct()
  1808. return true
  1809. end
  1810. end
  1811. return false
  1812. end
  1813. function play37 ()
  1814. local params = {}
  1815. local p = self.getPosition()
  1816. local r = self.getRotation()
  1817. local s = self.getScale()
  1818. local yoffset = 0.0825
  1819. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1820. yoffset = yoffset + 0.165
  1821. params.smooth = false
  1822. Omanyte.takeObject(params)
  1823. return 1
  1824. end
  1825.  
  1826. function Dittofunc(container, color)
  1827. col = color
  1828. if insertToken38() then
  1829. startLuaCoroutine(self, "play38")
  1830. else
  1831. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1832. end
  1833. end
  1834.  
  1835. function insertToken38()
  1836.  
  1837. for i, obj in pairs(self.getObjects()) do
  1838. if obj.name == "Small Prize Token" then
  1839. local params = {}
  1840. params.guid = obj.guid
  1841. params.smooth = true
  1842. params.position = self.getPosition()
  1843. params.position.y = params.position.y + 4
  1844. takenObject = self.takeObject(params)
  1845. takenObject.destruct()
  1846. return true
  1847. end
  1848. end
  1849. return false
  1850. end
  1851. function play38 ()
  1852. local params = {}
  1853. local p = self.getPosition()
  1854. local r = self.getRotation()
  1855. local s = self.getScale()
  1856. local yoffset = 0.0825
  1857. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1858. yoffset = yoffset + 0.165
  1859. params.smooth = false
  1860. Ditto.takeObject(params)
  1861. return 1
  1862. end
  1863.  
  1864. function Cubonefunc(container, color)
  1865. col = color
  1866. if insertToken39() then
  1867. startLuaCoroutine(self, "play39")
  1868. else
  1869. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1870. end
  1871. end
  1872.  
  1873. function insertToken39()
  1874.  
  1875. for i, obj in pairs(self.getObjects()) do
  1876. if obj.name == "Small Prize Token" then
  1877. local params = {}
  1878. params.guid = obj.guid
  1879. params.smooth = true
  1880. params.position = self.getPosition()
  1881. params.position.y = params.position.y + 4
  1882. takenObject = self.takeObject(params)
  1883. takenObject.destruct()
  1884. return true
  1885. end
  1886. end
  1887. return false
  1888. end
  1889. function play39 ()
  1890. local params = {}
  1891. local p = self.getPosition()
  1892. local r = self.getRotation()
  1893. local s = self.getScale()
  1894. local yoffset = 0.0825
  1895. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1896. yoffset = yoffset + 0.165
  1897. params.smooth = false
  1898. Cubone.takeObject(params)
  1899. return 1
  1900. end
  1901.  
  1902. function Horseafunc(container, color)
  1903. col = color
  1904. if insertToken40() then
  1905. startLuaCoroutine(self, "play40")
  1906. else
  1907. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1908. end
  1909. end
  1910.  
  1911. function insertToken40()
  1912.  
  1913. for i, obj in pairs(self.getObjects()) do
  1914. if obj.name == "Small Prize Token" then
  1915. local params = {}
  1916. params.guid = obj.guid
  1917. params.smooth = true
  1918. params.position = self.getPosition()
  1919. params.position.y = params.position.y + 4
  1920. takenObject = self.takeObject(params)
  1921. takenObject.destruct()
  1922. return true
  1923. end
  1924. end
  1925. return false
  1926. end
  1927. function play40 ()
  1928. local params = {}
  1929. local p = self.getPosition()
  1930. local r = self.getRotation()
  1931. local s = self.getScale()
  1932. local yoffset = 0.0825
  1933. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1934. yoffset = yoffset + 0.165
  1935. params.smooth = false
  1936. Horsea.takeObject(params)
  1937. return 1
  1938. end
  1939.  
  1940. function Magnemitefunc(container, color)
  1941. col = color
  1942. if insertToken41() then
  1943. startLuaCoroutine(self, "play41")
  1944. else
  1945. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1946. end
  1947. end
  1948.  
  1949. function insertToken41()
  1950.  
  1951. for i, obj in pairs(self.getObjects()) do
  1952. if obj.name == "Small Prize Token" then
  1953. local params = {}
  1954. params.guid = obj.guid
  1955. params.smooth = true
  1956. params.position = self.getPosition()
  1957. params.position.y = params.position.y + 4
  1958. takenObject = self.takeObject(params)
  1959. takenObject.destruct()
  1960. return true
  1961. end
  1962. end
  1963. return false
  1964. end
  1965. function play41 ()
  1966. local params = {}
  1967. local p = self.getPosition()
  1968. local r = self.getRotation()
  1969. local s = self.getScale()
  1970. local yoffset = 0.0825
  1971. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  1972. yoffset = yoffset + 0.165
  1973. params.smooth = false
  1974. Magnemite.takeObject(params)
  1975. return 1
  1976. end
  1977.  
  1978. function Haunterfunc(container, color)
  1979. col = color
  1980. if insertToken42() then
  1981. startLuaCoroutine(self, "play42")
  1982. else
  1983. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  1984. end
  1985. end
  1986.  
  1987. function insertToken42()
  1988.  
  1989. for i, obj in pairs(self.getObjects()) do
  1990. if obj.name == "Small Prize Token" then
  1991. local params = {}
  1992. params.guid = obj.guid
  1993. params.smooth = true
  1994. params.position = self.getPosition()
  1995. params.position.y = params.position.y + 4
  1996. takenObject = self.takeObject(params)
  1997. takenObject.destruct()
  1998. return true
  1999. end
  2000. end
  2001. return false
  2002. end
  2003. function play42 ()
  2004. local params = {}
  2005. local p = self.getPosition()
  2006. local r = self.getRotation()
  2007. local s = self.getScale()
  2008. local yoffset = 0.0825
  2009. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2010. yoffset = yoffset + 0.165
  2011. params.smooth = false
  2012. Haunter.takeObject(params)
  2013. return 1
  2014. end
  2015.  
  2016. function Duodriofunc(container, color)
  2017. col = color
  2018. if insertToken43() then
  2019. startLuaCoroutine(self, "play43")
  2020. else
  2021. broadcastToColor(tostring("Please insert 1x Small Prize Token."),color, {1,0.25,0.25})
  2022. end
  2023. end
  2024.  
  2025. function insertToken43()
  2026.  
  2027. for i, obj in pairs(self.getObjects()) do
  2028. if obj.name == "Small Prize Token" then
  2029. local params = {}
  2030. params.guid = obj.guid
  2031. params.smooth = true
  2032. params.position = self.getPosition()
  2033. params.position.y = params.position.y + 4
  2034. takenObject = self.takeObject(params)
  2035. takenObject.destruct()
  2036. return true
  2037. end
  2038. end
  2039. return false
  2040. end
  2041. function play43 ()
  2042. local params = {}
  2043. local p = self.getPosition()
  2044. local r = self.getRotation()
  2045. local s = self.getScale()
  2046. local yoffset = 0.0825
  2047. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2048. yoffset = yoffset + 0.165
  2049. params.smooth = false
  2050. Duodrio.takeObject(params)
  2051. return 1
  2052. end
  2053. function mediumprizes1()
  2054. self.clearButtons()
  2055. self.clearInputs()
  2056. self.createButton({click_function = 'FFGinitiate', function_owner = self, label = 'Back', position = {-2,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  2057. self.createButton({click_function = 'nextsideM1', function_owner = self, label = 'Next', position = {6,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  2058. self.createButton({label="Mew", click_function="Mewfunc", function_owner=self, position={-2,0.25,2}, width = 1600, height = 380, font_size = 200})
  2059. self.createButton({label="Dragonite", click_function="Dragonitefunc", function_owner=self, position={-2,0.25,3}, width = 1600, height = 380, font_size = 200})
  2060. self.createButton({label="Dragonair", click_function="Dragonairfunc", function_owner=self, position={-2,0.25,4}, width = 1600, height = 380, font_size = 200})
  2061. self.createButton({label="Magneton", click_function="Magnetonfunc", function_owner=self, position={-2,0.25,5}, width = 1600, height = 380, font_size = 200})
  2062. self.createButton({label="Lapras", click_function="Laprasfunc", function_owner=self, position={2,0.25,2}, width = 1600, height = 380, font_size = 200})
  2063. self.createButton({label="Vaporeon", click_function="Vaporeonfunc", function_owner=self, position={2,0.25,3}, width = 1600, height = 380, font_size = 200})
  2064. self.createButton({label="Jolteon", click_function="Jolteonfunc", function_owner=self, position={2,0.25,4}, width = 1600, height = 380, font_size = 200})
  2065. self.createButton({label="Flareon", click_function="Flareonfunc", function_owner=self, position={2,0.25,5}, width = 1600, height = 380, font_size = 200})
  2066. self.createButton({label="Charmeleon", click_function="Charmeleonfunc", function_owner=self, position={6,0.25,2}, width = 1600, height = 380, font_size = 200})
  2067. self.createButton({label="Snorlax", click_function="Snorlaxfunc", function_owner=self, position={6,0.25,3}, width = 1600, height = 380, font_size = 200})
  2068. self.createButton({label="Dugtrio", click_function="Dugtriofunc", function_owner=self, position={6,0.25,4}, width = 1600, height = 380, font_size = 200})
  2069. self.createButton({label="Wartortle", click_function="Wartortlefunc", function_owner=self, position={6,0.25,5}, width = 1600, height = 380, font_size = 200})
  2070. end
  2071.  
  2072. function FFGinitiate()
  2073. if lista ~= nil then
  2074. lista = nil
  2075. end
  2076. if partList ~= nil then
  2077. partList = nil
  2078. end
  2079. initiate()
  2080. end
  2081. function Mewfunc(container, color)
  2082. col = color
  2083. if insertTokenM1() then
  2084. startLuaCoroutine(self, "playM1")
  2085. else
  2086. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2087. end
  2088. end
  2089.  
  2090. function insertTokenM1()
  2091.  
  2092. for i, obj in pairs(self.getObjects()) do
  2093. if obj.name == "Medium Prize Token" then
  2094. local params = {}
  2095. params.guid = obj.guid
  2096. params.smooth = true
  2097. params.position = self.getPosition()
  2098. params.position.y = params.position.y + 4
  2099. takenObject = self.takeObject(params)
  2100. takenObject.destruct()
  2101. return true
  2102. end
  2103. end
  2104. return false
  2105. end
  2106. function playM1 ()
  2107. local params = {}
  2108. local p = self.getPosition()
  2109. local r = self.getRotation()
  2110. local s = self.getScale()
  2111. local yoffset = 0.0825
  2112. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2113. yoffset = yoffset + 0.165
  2114. params.smooth = false
  2115. Mew.takeObject(params)
  2116. return 1
  2117. end
  2118. function Dragonitefunc(container, color)
  2119. col = color
  2120. if insertTokenM2() then
  2121. startLuaCoroutine(self, "playM2")
  2122. else
  2123. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2124. end
  2125. end
  2126.  
  2127. function insertTokenM2()
  2128.  
  2129. for i, obj in pairs(self.getObjects()) do
  2130. if obj.name == "Medium Prize Token" then
  2131. local params = {}
  2132. params.guid = obj.guid
  2133. params.smooth = true
  2134. params.position = self.getPosition()
  2135. params.position.y = params.position.y + 4
  2136. takenObject = self.takeObject(params)
  2137. takenObject.destruct()
  2138. return true
  2139. end
  2140. end
  2141. return false
  2142. end
  2143. function playM2 ()
  2144. local params = {}
  2145. local p = self.getPosition()
  2146. local r = self.getRotation()
  2147. local s = self.getScale()
  2148. local yoffset = 0.0825
  2149. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2150. yoffset = yoffset + 0.165
  2151. params.smooth = false
  2152. Dragonite.takeObject(params)
  2153. return 1
  2154. end
  2155. function Dragonairfunc(container, color)
  2156. col = color
  2157. if insertTokenM3() then
  2158. startLuaCoroutine(self, "playM3")
  2159. else
  2160. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2161. end
  2162. end
  2163.  
  2164. function insertTokenM3()
  2165.  
  2166. for i, obj in pairs(self.getObjects()) do
  2167. if obj.name == "Medium Prize Token" then
  2168. local params = {}
  2169. params.guid = obj.guid
  2170. params.smooth = true
  2171. params.position = self.getPosition()
  2172. params.position.y = params.position.y + 4
  2173. takenObject = self.takeObject(params)
  2174. takenObject.destruct()
  2175. return true
  2176. end
  2177. end
  2178. return false
  2179. end
  2180. function playM3 ()
  2181. local params = {}
  2182. local p = self.getPosition()
  2183. local r = self.getRotation()
  2184. local s = self.getScale()
  2185. local yoffset = 0.0825
  2186. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2187. yoffset = yoffset + 0.165
  2188. params.smooth = false
  2189. Dragonair.takeObject(params)
  2190. return 1
  2191. end
  2192. function Magnetonfunc(container, color)
  2193. col = color
  2194. if insertTokenM4() then
  2195. startLuaCoroutine(self, "playM4")
  2196. else
  2197. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2198. end
  2199. end
  2200.  
  2201. function insertTokenM4()
  2202.  
  2203. for i, obj in pairs(self.getObjects()) do
  2204. if obj.name == "Medium Prize Token" then
  2205. local params = {}
  2206. params.guid = obj.guid
  2207. params.smooth = true
  2208. params.position = self.getPosition()
  2209. params.position.y = params.position.y + 4
  2210. takenObject = self.takeObject(params)
  2211. takenObject.destruct()
  2212. return true
  2213. end
  2214. end
  2215. return false
  2216. end
  2217. function playM4 ()
  2218. local params = {}
  2219. local p = self.getPosition()
  2220. local r = self.getRotation()
  2221. local s = self.getScale()
  2222. local yoffset = 0.0825
  2223. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2224. yoffset = yoffset + 0.165
  2225. params.smooth = false
  2226. Magneton.takeObject(params)
  2227. return 1
  2228. end
  2229.  
  2230. function Laprasfunc(container, color)
  2231. col = color
  2232. if insertTokenM5() then
  2233. startLuaCoroutine(self, "playM5")
  2234. else
  2235. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2236. end
  2237. end
  2238.  
  2239. function insertTokenM5()
  2240.  
  2241. for i, obj in pairs(self.getObjects()) do
  2242. if obj.name == "Medium Prize Token" then
  2243. local params = {}
  2244. params.guid = obj.guid
  2245. params.smooth = true
  2246. params.position = self.getPosition()
  2247. params.position.y = params.position.y + 4
  2248. takenObject = self.takeObject(params)
  2249. takenObject.destruct()
  2250. return true
  2251. end
  2252. end
  2253. return false
  2254. end
  2255. function playM5 ()
  2256. local params = {}
  2257. local p = self.getPosition()
  2258. local r = self.getRotation()
  2259. local s = self.getScale()
  2260. local yoffset = 0.0825
  2261. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2262. yoffset = yoffset + 0.165
  2263. params.smooth = false
  2264. Lapras.takeObject(params)
  2265. return 1
  2266. end
  2267.  
  2268. function Vaporeonfunc(container, color)
  2269. col = color
  2270. if insertTokenM6() then
  2271. startLuaCoroutine(self, "playM6")
  2272. else
  2273. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2274. end
  2275. end
  2276.  
  2277. function insertTokenM6()
  2278.  
  2279. for i, obj in pairs(self.getObjects()) do
  2280. if obj.name == "Medium Prize Token" then
  2281. local params = {}
  2282. params.guid = obj.guid
  2283. params.smooth = true
  2284. params.position = self.getPosition()
  2285. params.position.y = params.position.y + 4
  2286. takenObject = self.takeObject(params)
  2287. takenObject.destruct()
  2288. return true
  2289. end
  2290. end
  2291. return false
  2292. end
  2293. function playM6 ()
  2294. local params = {}
  2295. local p = self.getPosition()
  2296. local r = self.getRotation()
  2297. local s = self.getScale()
  2298. local yoffset = 0.0825
  2299. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2300. yoffset = yoffset + 0.165
  2301. params.smooth = false
  2302. Vaporeon.takeObject(params)
  2303. return 1
  2304. end
  2305.  
  2306. function Jolteonfunc(container, color)
  2307. col = color
  2308. if insertTokenM7() then
  2309. startLuaCoroutine(self, "playM7")
  2310. else
  2311. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2312. end
  2313. end
  2314.  
  2315. function insertTokenM7()
  2316.  
  2317. for i, obj in pairs(self.getObjects()) do
  2318. if obj.name == "Medium Prize Token" then
  2319. local params = {}
  2320. params.guid = obj.guid
  2321. params.smooth = true
  2322. params.position = self.getPosition()
  2323. params.position.y = params.position.y + 4
  2324. takenObject = self.takeObject(params)
  2325. takenObject.destruct()
  2326. return true
  2327. end
  2328. end
  2329. return false
  2330. end
  2331. function playM7 ()
  2332. local params = {}
  2333. local p = self.getPosition()
  2334. local r = self.getRotation()
  2335. local s = self.getScale()
  2336. local yoffset = 0.0825
  2337. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2338. yoffset = yoffset + 0.165
  2339. params.smooth = false
  2340. Jolteon.takeObject(params)
  2341. return 1
  2342. end
  2343.  
  2344. function Flareonfunc(container, color)
  2345. col = color
  2346. if insertTokenM8() then
  2347. startLuaCoroutine(self, "playM8")
  2348. else
  2349. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2350. end
  2351. end
  2352.  
  2353. function insertTokenM8()
  2354.  
  2355. for i, obj in pairs(self.getObjects()) do
  2356. if obj.name == "Medium Prize Token" then
  2357. local params = {}
  2358. params.guid = obj.guid
  2359. params.smooth = true
  2360. params.position = self.getPosition()
  2361. params.position.y = params.position.y + 4
  2362. takenObject = self.takeObject(params)
  2363. takenObject.destruct()
  2364. return true
  2365. end
  2366. end
  2367. return false
  2368. end
  2369. function playM8 ()
  2370. local params = {}
  2371. local p = self.getPosition()
  2372. local r = self.getRotation()
  2373. local s = self.getScale()
  2374. local yoffset = 0.0825
  2375. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2376. yoffset = yoffset + 0.165
  2377. params.smooth = false
  2378. Flareon.takeObject(params)
  2379. return 1
  2380. end
  2381.  
  2382. function Charmeleonfunc(container, color)
  2383. col = color
  2384. if insertTokenM9() then
  2385. startLuaCoroutine(self, "playM9")
  2386. else
  2387. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2388. end
  2389. end
  2390.  
  2391. function insertTokenM9()
  2392.  
  2393. for i, obj in pairs(self.getObjects()) do
  2394. if obj.name == "Medium Prize Token" then
  2395. local params = {}
  2396. params.guid = obj.guid
  2397. params.smooth = true
  2398. params.position = self.getPosition()
  2399. params.position.y = params.position.y + 4
  2400. takenObject = self.takeObject(params)
  2401. takenObject.destruct()
  2402. return true
  2403. end
  2404. end
  2405. return false
  2406. end
  2407. function playM9 ()
  2408. local params = {}
  2409. local p = self.getPosition()
  2410. local r = self.getRotation()
  2411. local s = self.getScale()
  2412. local yoffset = 0.0825
  2413. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2414. yoffset = yoffset + 0.165
  2415. params.smooth = false
  2416. Charmeleon.takeObject(params)
  2417. return 1
  2418. end
  2419.  
  2420. function Snorlaxfunc(container, color)
  2421. col = color
  2422. if insertTokenM10() then
  2423. startLuaCoroutine(self, "playM10")
  2424. else
  2425. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2426. end
  2427. end
  2428.  
  2429. function insertTokenM10()
  2430.  
  2431. for i, obj in pairs(self.getObjects()) do
  2432. if obj.name == "Medium Prize Token" then
  2433. local params = {}
  2434. params.guid = obj.guid
  2435. params.smooth = true
  2436. params.position = self.getPosition()
  2437. params.position.y = params.position.y + 4
  2438. takenObject = self.takeObject(params)
  2439. takenObject.destruct()
  2440. return true
  2441. end
  2442. end
  2443. return false
  2444. end
  2445. function playM10 ()
  2446. local params = {}
  2447. local p = self.getPosition()
  2448. local r = self.getRotation()
  2449. local s = self.getScale()
  2450. local yoffset = 0.0825
  2451. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2452. yoffset = yoffset + 0.165
  2453. params.smooth = false
  2454. Snorlax.takeObject(params)
  2455. return 1
  2456. end
  2457.  
  2458. function Dugtriofunc(container, color)
  2459. col = color
  2460. if insertTokenM11() then
  2461. startLuaCoroutine(self, "playM11")
  2462. else
  2463. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2464. end
  2465. end
  2466.  
  2467. function insertTokenM11()
  2468.  
  2469. for i, obj in pairs(self.getObjects()) do
  2470. if obj.name == "Medium Prize Token" then
  2471. local params = {}
  2472. params.guid = obj.guid
  2473. params.smooth = true
  2474. params.position = self.getPosition()
  2475. params.position.y = params.position.y + 4
  2476. takenObject = self.takeObject(params)
  2477. takenObject.destruct()
  2478. return true
  2479. end
  2480. end
  2481. return false
  2482. end
  2483. function playM11 ()
  2484. local params = {}
  2485. local p = self.getPosition()
  2486. local r = self.getRotation()
  2487. local s = self.getScale()
  2488. local yoffset = 0.0825
  2489. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2490. yoffset = yoffset + 0.165
  2491. params.smooth = false
  2492. Dugtrio.takeObject(params)
  2493. return 1
  2494. end
  2495.  
  2496. function Wartortlefunc(container, color)
  2497. col = color
  2498. if insertTokenM12() then
  2499. startLuaCoroutine(self, "playM12")
  2500. else
  2501. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2502. end
  2503. end
  2504.  
  2505. function insertTokenM12()
  2506.  
  2507. for i, obj in pairs(self.getObjects()) do
  2508. if obj.name == "Medium Prize Token" then
  2509. local params = {}
  2510. params.guid = obj.guid
  2511. params.smooth = true
  2512. params.position = self.getPosition()
  2513. params.position.y = params.position.y + 4
  2514. takenObject = self.takeObject(params)
  2515. takenObject.destruct()
  2516. return true
  2517. end
  2518. end
  2519. return false
  2520. end
  2521. function playM12 ()
  2522. local params = {}
  2523. local p = self.getPosition()
  2524. local r = self.getRotation()
  2525. local s = self.getScale()
  2526. local yoffset = 0.0825
  2527. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2528. yoffset = yoffset + 0.165
  2529. params.smooth = false
  2530. Wartortle.takeObject(params)
  2531. return 1
  2532. end
  2533.  
  2534. function nextsideM1()
  2535. self.clearButtons()
  2536. self.clearInputs()
  2537. self.createButton({click_function = 'backM1', function_owner = self, label = 'Back', position = {-2,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  2538. self.createButton({click_function = 'nextsideM2', function_owner = self, label = 'Next', position = {6,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  2539. self.createButton({label="Masterball", click_function="Masterballfunc", function_owner=self, position={-2,0.25,2}, width = 1600, height = 380, font_size = 200})
  2540. self.createButton({label="Safariball", click_function="Safariballfunc", function_owner=self, position={-2,0.25,3}, width = 1600, height = 380, font_size = 200})
  2541. self.createButton({label="Pokeball", click_function="Pokeballfunc", function_owner=self, position={-2,0.25,4}, width = 1600, height = 380, font_size = 200})
  2542. self.createButton({label="Levelball", click_function="Levelballfunc", function_owner=self, position={-2,0.25,5}, width = 1600, height = 380, font_size = 200})
  2543. self.createButton({label="Cloneball", click_function="Cloneballfunc", function_owner=self, position={2,0.25,2}, width = 1600, height = 380, font_size = 200})
  2544. self.createButton({label="Ultraball", click_function="Ultraballfunc", function_owner=self, position={2,0.25,3}, width = 1600, height = 380, font_size = 200})
  2545. self.createButton({label="Premierball", click_function="Premierballfunc", function_owner=self, position={2,0.25,4}, width = 1600, height = 380, font_size = 200})
  2546. self.createButton({label="Loveball", click_function="Loveballfunc", function_owner=self, position={2,0.25,5}, width = 1600, height = 380, font_size = 200})
  2547. self.createButton({label="Greatball", click_function="Greatballfunc", function_owner=self, position={6,0.25,2}, width = 1600, height = 380, font_size = 200})
  2548. self.createButton({label="Cherishball", click_function="Cherishballfunc", function_owner=self, position={6,0.25,3}, width = 1600, height = 380, font_size = 200})
  2549. self.createButton({label="Lureball", click_function="Lureballfunc", function_owner=self, position={6,0.25,4}, width = 1600, height = 380, font_size = 200})
  2550. self.createButton({label="[FFFF00]Ambrosia", click_function="Ambrosiafunc", function_owner=self, position={6,0.25,5}, width = 1600, height = 380, font_size = 200})
  2551. end
  2552.  
  2553. function backM1()
  2554. if lista ~= nil then
  2555. lista = nil
  2556. end
  2557. if partList ~= nil then
  2558. partList = nil
  2559. end
  2560. mediumprizes1()
  2561. end
  2562.  
  2563. function Masterballfunc(container, color)
  2564. col = color
  2565. if insertTokenM13() then
  2566. startLuaCoroutine(self, "playM13")
  2567. else
  2568. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2569. end
  2570. end
  2571.  
  2572. function insertTokenM13()
  2573.  
  2574. for i, obj in pairs(self.getObjects()) do
  2575. if obj.name == "Medium Prize Token" then
  2576. local params = {}
  2577. params.guid = obj.guid
  2578. params.smooth = true
  2579. params.position = self.getPosition()
  2580. params.position.y = params.position.y + 4
  2581. takenObject = self.takeObject(params)
  2582. takenObject.destruct()
  2583. return true
  2584. end
  2585. end
  2586. return false
  2587. end
  2588. function playM13 ()
  2589. local params = {}
  2590. local p = self.getPosition()
  2591. local r = self.getRotation()
  2592. local s = self.getScale()
  2593. local yoffset = 0.0825
  2594. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2595. yoffset = yoffset + 0.165
  2596. params.smooth = false
  2597. Masterball.takeObject(params)
  2598. return 1
  2599. end
  2600.  
  2601. function Safariballfunc(container, color)
  2602. col = color
  2603. if insertTokenM14() then
  2604. startLuaCoroutine(self, "playM14")
  2605. else
  2606. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2607. end
  2608. end
  2609.  
  2610. function insertTokenM14()
  2611.  
  2612. for i, obj in pairs(self.getObjects()) do
  2613. if obj.name == "Medium Prize Token" then
  2614. local params = {}
  2615. params.guid = obj.guid
  2616. params.smooth = true
  2617. params.position = self.getPosition()
  2618. params.position.y = params.position.y + 4
  2619. takenObject = self.takeObject(params)
  2620. takenObject.destruct()
  2621. return true
  2622. end
  2623. end
  2624. return false
  2625. end
  2626. function playM14 ()
  2627. local params = {}
  2628. local p = self.getPosition()
  2629. local r = self.getRotation()
  2630. local s = self.getScale()
  2631. local yoffset = 0.0825
  2632. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2633. yoffset = yoffset + 0.165
  2634. params.smooth = false
  2635. Safariball.takeObject(params)
  2636. return 1
  2637. end
  2638.  
  2639. function Pokeballfunc(container, color)
  2640. col = color
  2641. if insertTokenM15() then
  2642. startLuaCoroutine(self, "playM15")
  2643. else
  2644. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2645. end
  2646. end
  2647.  
  2648. function insertTokenM15()
  2649.  
  2650. for i, obj in pairs(self.getObjects()) do
  2651. if obj.name == "Medium Prize Token" then
  2652. local params = {}
  2653. params.guid = obj.guid
  2654. params.smooth = true
  2655. params.position = self.getPosition()
  2656. params.position.y = params.position.y + 4
  2657. takenObject = self.takeObject(params)
  2658. takenObject.destruct()
  2659. return true
  2660. end
  2661. end
  2662. return false
  2663. end
  2664. function playM15 ()
  2665. local params = {}
  2666. local p = self.getPosition()
  2667. local r = self.getRotation()
  2668. local s = self.getScale()
  2669. local yoffset = 0.0825
  2670. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2671. yoffset = yoffset + 0.165
  2672. params.smooth = false
  2673. Pokeball.takeObject(params)
  2674. return 1
  2675. end
  2676.  
  2677. function Levelballfunc(container, color)
  2678. col = color
  2679. if insertTokenM16() then
  2680. startLuaCoroutine(self, "playM16")
  2681. else
  2682. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2683. end
  2684. end
  2685.  
  2686. function insertTokenM16()
  2687.  
  2688. for i, obj in pairs(self.getObjects()) do
  2689. if obj.name == "Medium Prize Token" then
  2690. local params = {}
  2691. params.guid = obj.guid
  2692. params.smooth = true
  2693. params.position = self.getPosition()
  2694. params.position.y = params.position.y + 4
  2695. takenObject = self.takeObject(params)
  2696. takenObject.destruct()
  2697. return true
  2698. end
  2699. end
  2700. return false
  2701. end
  2702. function playM16 ()
  2703. local params = {}
  2704. local p = self.getPosition()
  2705. local r = self.getRotation()
  2706. local s = self.getScale()
  2707. local yoffset = 0.0825
  2708. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2709. yoffset = yoffset + 0.165
  2710. params.smooth = false
  2711. Levelball.takeObject(params)
  2712. return 1
  2713. end
  2714.  
  2715. function Cloneballfunc(container, color)
  2716. col = color
  2717. if insertTokenM17() then
  2718. startLuaCoroutine(self, "playM17")
  2719. else
  2720. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2721. end
  2722. end
  2723.  
  2724. function insertTokenM17()
  2725.  
  2726. for i, obj in pairs(self.getObjects()) do
  2727. if obj.name == "Medium Prize Token" then
  2728. local params = {}
  2729. params.guid = obj.guid
  2730. params.smooth = true
  2731. params.position = self.getPosition()
  2732. params.position.y = params.position.y + 4
  2733. takenObject = self.takeObject(params)
  2734. takenObject.destruct()
  2735. return true
  2736. end
  2737. end
  2738. return false
  2739. end
  2740. function playM17 ()
  2741. local params = {}
  2742. local p = self.getPosition()
  2743. local r = self.getRotation()
  2744. local s = self.getScale()
  2745. local yoffset = 0.0825
  2746. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2747. yoffset = yoffset + 0.165
  2748. params.smooth = false
  2749. Cloneball.takeObject(params)
  2750. return 1
  2751. end
  2752.  
  2753. function Ultraballfunc(container, color)
  2754. col = color
  2755. if insertTokenM18() then
  2756. startLuaCoroutine(self, "playM18")
  2757. else
  2758. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2759. end
  2760. end
  2761.  
  2762. function insertTokenM18()
  2763.  
  2764. for i, obj in pairs(self.getObjects()) do
  2765. if obj.name == "Medium Prize Token" then
  2766. local params = {}
  2767. params.guid = obj.guid
  2768. params.smooth = true
  2769. params.position = self.getPosition()
  2770. params.position.y = params.position.y + 4
  2771. takenObject = self.takeObject(params)
  2772. takenObject.destruct()
  2773. return true
  2774. end
  2775. end
  2776. return false
  2777. end
  2778. function playM18 ()
  2779. local params = {}
  2780. local p = self.getPosition()
  2781. local r = self.getRotation()
  2782. local s = self.getScale()
  2783. local yoffset = 0.0825
  2784. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2785. yoffset = yoffset + 0.165
  2786. params.smooth = false
  2787. Ultraball.takeObject(params)
  2788. return 1
  2789. end
  2790.  
  2791. function Premierballfunc(container, color)
  2792. col = color
  2793. if insertTokenM19() then
  2794. startLuaCoroutine(self, "playM19")
  2795. else
  2796. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2797. end
  2798. end
  2799.  
  2800. function insertTokenM19()
  2801.  
  2802. for i, obj in pairs(self.getObjects()) do
  2803. if obj.name == "Medium Prize Token" then
  2804. local params = {}
  2805. params.guid = obj.guid
  2806. params.smooth = true
  2807. params.position = self.getPosition()
  2808. params.position.y = params.position.y + 4
  2809. takenObject = self.takeObject(params)
  2810. takenObject.destruct()
  2811. return true
  2812. end
  2813. end
  2814. return false
  2815. end
  2816. function playM19 ()
  2817. local params = {}
  2818. local p = self.getPosition()
  2819. local r = self.getRotation()
  2820. local s = self.getScale()
  2821. local yoffset = 0.0825
  2822. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2823. yoffset = yoffset + 0.165
  2824. params.smooth = false
  2825. Premierball.takeObject(params)
  2826. return 1
  2827. end
  2828.  
  2829. function Loveballfunc(container, color)
  2830. col = color
  2831. if insertTokenM20() then
  2832. startLuaCoroutine(self, "playM20")
  2833. else
  2834. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2835. end
  2836. end
  2837.  
  2838. function insertTokenM20()
  2839.  
  2840. for i, obj in pairs(self.getObjects()) do
  2841. if obj.name == "Medium Prize Token" then
  2842. local params = {}
  2843. params.guid = obj.guid
  2844. params.smooth = true
  2845. params.position = self.getPosition()
  2846. params.position.y = params.position.y + 4
  2847. takenObject = self.takeObject(params)
  2848. takenObject.destruct()
  2849. return true
  2850. end
  2851. end
  2852. return false
  2853. end
  2854. function playM20 ()
  2855. local params = {}
  2856. local p = self.getPosition()
  2857. local r = self.getRotation()
  2858. local s = self.getScale()
  2859. local yoffset = 0.0825
  2860. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2861. yoffset = yoffset + 0.165
  2862. params.smooth = false
  2863. Loveball.takeObject(params)
  2864. return 1
  2865. end
  2866.  
  2867. function Greatballfunc(container, color)
  2868. col = color
  2869. if insertTokenM21() then
  2870. startLuaCoroutine(self, "playM21")
  2871. else
  2872. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2873. end
  2874. end
  2875.  
  2876. function insertTokenM21()
  2877.  
  2878. for i, obj in pairs(self.getObjects()) do
  2879. if obj.name == "Medium Prize Token" then
  2880. local params = {}
  2881. params.guid = obj.guid
  2882. params.smooth = true
  2883. params.position = self.getPosition()
  2884. params.position.y = params.position.y + 4
  2885. takenObject = self.takeObject(params)
  2886. takenObject.destruct()
  2887. return true
  2888. end
  2889. end
  2890. return false
  2891. end
  2892. function playM21 ()
  2893. local params = {}
  2894. local p = self.getPosition()
  2895. local r = self.getRotation()
  2896. local s = self.getScale()
  2897. local yoffset = 0.0825
  2898. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2899. yoffset = yoffset + 0.165
  2900. params.smooth = false
  2901. Greatball.takeObject(params)
  2902. return 1
  2903. end
  2904.  
  2905. function Cherishballfunc(container, color)
  2906. col = color
  2907. if insertTokenM22() then
  2908. startLuaCoroutine(self, "playM22")
  2909. else
  2910. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2911. end
  2912. end
  2913.  
  2914. function insertTokenM22()
  2915.  
  2916. for i, obj in pairs(self.getObjects()) do
  2917. if obj.name == "Medium Prize Token" then
  2918. local params = {}
  2919. params.guid = obj.guid
  2920. params.smooth = true
  2921. params.position = self.getPosition()
  2922. params.position.y = params.position.y + 4
  2923. takenObject = self.takeObject(params)
  2924. takenObject.destruct()
  2925. return true
  2926. end
  2927. end
  2928. return false
  2929. end
  2930. function playM22 ()
  2931. local params = {}
  2932. local p = self.getPosition()
  2933. local r = self.getRotation()
  2934. local s = self.getScale()
  2935. local yoffset = 0.0825
  2936. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2937. yoffset = yoffset + 0.165
  2938. params.smooth = false
  2939. Cherishball.takeObject(params)
  2940. return 1
  2941. end
  2942.  
  2943. function Lureballfunc(container, color)
  2944. col = color
  2945. if insertTokenM23() then
  2946. startLuaCoroutine(self, "playM23")
  2947. else
  2948. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2949. end
  2950. end
  2951.  
  2952. function insertTokenM23()
  2953.  
  2954. for i, obj in pairs(self.getObjects()) do
  2955. if obj.name == "Medium Prize Token" then
  2956. local params = {}
  2957. params.guid = obj.guid
  2958. params.smooth = true
  2959. params.position = self.getPosition()
  2960. params.position.y = params.position.y + 4
  2961. takenObject = self.takeObject(params)
  2962. takenObject.destruct()
  2963. return true
  2964. end
  2965. end
  2966. return false
  2967. end
  2968. function playM23 ()
  2969. local params = {}
  2970. local p = self.getPosition()
  2971. local r = self.getRotation()
  2972. local s = self.getScale()
  2973. local yoffset = 0.0825
  2974. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  2975. yoffset = yoffset + 0.165
  2976. params.smooth = false
  2977. Lureball.takeObject(params)
  2978. return 1
  2979. end
  2980.  
  2981. function Ambrosiafunc(container, color)
  2982. col = color
  2983. if insertTokenM24() then
  2984. startLuaCoroutine(self, "playM24")
  2985. else
  2986. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  2987. end
  2988. end
  2989.  
  2990. function insertTokenM24()
  2991.  
  2992. for i, obj in pairs(self.getObjects()) do
  2993. if obj.name == "Medium Prize Token" then
  2994. local params = {}
  2995. params.guid = obj.guid
  2996. params.smooth = true
  2997. params.position = self.getPosition()
  2998. params.position.y = params.position.y + 4
  2999. takenObject = self.takeObject(params)
  3000. takenObject.destruct()
  3001. return true
  3002. end
  3003. end
  3004. return false
  3005. end
  3006. function playM24 ()
  3007. local params = {}
  3008. local p = self.getPosition()
  3009. local r = self.getRotation()
  3010. local s = self.getScale()
  3011. local yoffset = 0.0825
  3012. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3013. yoffset = yoffset + 0.165
  3014. params.smooth = false
  3015. Ambrosia.takeObject(params)
  3016. return 1
  3017. end
  3018.  
  3019. function nextsideM2()
  3020. self.clearButtons()
  3021. self.clearInputs()
  3022. self.createButton({click_function = 'backM2', function_owner = self, label = 'Back', position = {-2,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  3023. self.createButton({click_function = 'nextsideM3', function_owner = self, label = 'Next', position = {6,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  3024. self.createButton({label="Slurm", click_function="Slurmfunc", function_owner=self, position={-2,0.25,2}, width = 1600, height = 380, font_size = 200})
  3025. self.createButton({label="Duff", click_function="Dufffunc", function_owner=self, position={-2,0.25,3}, width = 1600, height = 380, font_size = 200})
  3026. self.createButton({label="Pokegear blue", click_function="Pokegearbluefunc", function_owner=self, position={-2,0.25,4}, width = 1600, height = 380, font_size = 200})
  3027. self.createButton({label="Pokegear pink", click_function="Pokegearpinkfunc", function_owner=self, position={-2,0.25,5}, width = 1600, height = 380, font_size = 200})
  3028. self.createButton({label="Gameboy", click_function="Gameboyfunc", function_owner=self, position={2,0.25,2}, width = 1600, height = 380, font_size = 200})
  3029. self.createButton({label="Cooler", click_function="Coolerfunc", function_owner=self, position={2,0.25,3}, width = 1600, height = 380, font_size = 200})
  3030. self.createButton({label="Pokecenter", click_function="Pokecenterfunc", function_owner=self, position={2,0.25,4}, width = 1600, height = 380, font_size = 200})
  3031. self.createButton({label="Skyrim Logo Bag", click_function="Skyrimfunc", function_owner=self, position={2,0.25,5}, width = 1600, height = 380, font_size = 200})
  3032. self.createButton({label="Probedroid", click_function="Probedroidfunc", function_owner=self, position={6,0.25,2}, width = 1600, height = 380, font_size = 200})
  3033. self.createButton({label="Useless Device", click_function="Uselessdevicefunc", function_owner=self, position={6,0.25,3}, width = 1600, height = 380, font_size = 200})
  3034. self.createButton({label="[1CE055]Rupeebag[-]", click_function="Rupeebagfunc", function_owner=self, position={6,0.25,4}, width = 1600, height = 380, font_size = 200})
  3035. self.createButton({label="Brain", click_function="Brainfunc", function_owner=self, position={6,0.25,5}, width = 1600, height = 380, font_size = 200})
  3036. end
  3037.  
  3038. function backM2()
  3039. if lista ~= nil then
  3040. lista = nil
  3041. end
  3042. if partList ~= nil then
  3043. partList = nil
  3044. end
  3045. nextsideM1()
  3046. end
  3047.  
  3048. function Slurmfunc(container, color)
  3049. col = color
  3050. if insertTokenM25() then
  3051. startLuaCoroutine(self, "playM25")
  3052. else
  3053. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3054. end
  3055. end
  3056.  
  3057. function insertTokenM25()
  3058.  
  3059. for i, obj in pairs(self.getObjects()) do
  3060. if obj.name == "Medium Prize Token" then
  3061. local params = {}
  3062. params.guid = obj.guid
  3063. params.smooth = true
  3064. params.position = self.getPosition()
  3065. params.position.y = params.position.y + 4
  3066. takenObject = self.takeObject(params)
  3067. takenObject.destruct()
  3068. return true
  3069. end
  3070. end
  3071. return false
  3072. end
  3073. function playM25 ()
  3074. local params = {}
  3075. local p = self.getPosition()
  3076. local r = self.getRotation()
  3077. local s = self.getScale()
  3078. local yoffset = 0.0825
  3079. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3080. yoffset = yoffset + 0.165
  3081. params.smooth = false
  3082. Slurm.takeObject(params)
  3083. return 1
  3084. end
  3085.  
  3086. function Dufffunc(container, color)
  3087. col = color
  3088. if insertTokenM26() then
  3089. startLuaCoroutine(self, "playM26")
  3090. else
  3091. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3092. end
  3093. end
  3094.  
  3095. function insertTokenM26()
  3096.  
  3097. for i, obj in pairs(self.getObjects()) do
  3098. if obj.name == "Medium Prize Token" then
  3099. local params = {}
  3100. params.guid = obj.guid
  3101. params.smooth = true
  3102. params.position = self.getPosition()
  3103. params.position.y = params.position.y + 4
  3104. takenObject = self.takeObject(params)
  3105. takenObject.destruct()
  3106. return true
  3107. end
  3108. end
  3109. return false
  3110. end
  3111. function playM26 ()
  3112. local params = {}
  3113. local p = self.getPosition()
  3114. local r = self.getRotation()
  3115. local s = self.getScale()
  3116. local yoffset = 0.0825
  3117. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3118. yoffset = yoffset + 0.165
  3119. params.smooth = false
  3120. Duff.takeObject(params)
  3121. return 1
  3122. end
  3123.  
  3124. function Pokegearbluefunc(container, color)
  3125. col = color
  3126. if insertTokenM27() then
  3127. startLuaCoroutine(self, "playM27")
  3128. else
  3129. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3130. end
  3131. end
  3132.  
  3133. function insertTokenM27()
  3134.  
  3135. for i, obj in pairs(self.getObjects()) do
  3136. if obj.name == "Medium Prize Token" then
  3137. local params = {}
  3138. params.guid = obj.guid
  3139. params.smooth = true
  3140. params.position = self.getPosition()
  3141. params.position.y = params.position.y + 4
  3142. takenObject = self.takeObject(params)
  3143. takenObject.destruct()
  3144. return true
  3145. end
  3146. end
  3147. return false
  3148. end
  3149. function playM27 ()
  3150. local params = {}
  3151. local p = self.getPosition()
  3152. local r = self.getRotation()
  3153. local s = self.getScale()
  3154. local yoffset = 0.0825
  3155. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3156. yoffset = yoffset + 0.165
  3157. params.smooth = false
  3158. Pokegearblue.takeObject(params)
  3159. return 1
  3160. end
  3161.  
  3162. function Pokegearpinkfunc(container, color)
  3163. col = color
  3164. if insertTokenM28() then
  3165. startLuaCoroutine(self, "playM28")
  3166. else
  3167. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3168. end
  3169. end
  3170.  
  3171. function insertTokenM28()
  3172.  
  3173. for i, obj in pairs(self.getObjects()) do
  3174. if obj.name == "Medium Prize Token" then
  3175. local params = {}
  3176. params.guid = obj.guid
  3177. params.smooth = true
  3178. params.position = self.getPosition()
  3179. params.position.y = params.position.y + 4
  3180. takenObject = self.takeObject(params)
  3181. takenObject.destruct()
  3182. return true
  3183. end
  3184. end
  3185. return false
  3186. end
  3187. function playM28 ()
  3188. local params = {}
  3189. local p = self.getPosition()
  3190. local r = self.getRotation()
  3191. local s = self.getScale()
  3192. local yoffset = 0.0825
  3193. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3194. yoffset = yoffset + 0.165
  3195. params.smooth = false
  3196. Pokegearpink.takeObject(params)
  3197. return 1
  3198. end
  3199.  
  3200. function Gameboyfunc(container, color)
  3201. col = color
  3202. if insertTokenM29() then
  3203. startLuaCoroutine(self, "playM29")
  3204. else
  3205. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3206. end
  3207. end
  3208.  
  3209. function insertTokenM29()
  3210.  
  3211. for i, obj in pairs(self.getObjects()) do
  3212. if obj.name == "Medium Prize Token" then
  3213. local params = {}
  3214. params.guid = obj.guid
  3215. params.smooth = true
  3216. params.position = self.getPosition()
  3217. params.position.y = params.position.y + 4
  3218. takenObject = self.takeObject(params)
  3219. takenObject.destruct()
  3220. return true
  3221. end
  3222. end
  3223. return false
  3224. end
  3225. function playM29 ()
  3226. local params = {}
  3227. local p = self.getPosition()
  3228. local r = self.getRotation()
  3229. local s = self.getScale()
  3230. local yoffset = 0.0825
  3231. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3232. yoffset = yoffset + 0.165
  3233. params.smooth = false
  3234. Gameboy.takeObject(params)
  3235. return 1
  3236. end
  3237.  
  3238. function Coolerfunc(container, color)
  3239. col = color
  3240. if insertTokenM30() then
  3241. startLuaCoroutine(self, "playM30")
  3242. else
  3243. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3244. end
  3245. end
  3246.  
  3247. function insertTokenM30()
  3248.  
  3249. for i, obj in pairs(self.getObjects()) do
  3250. if obj.name == "Medium Prize Token" then
  3251. local params = {}
  3252. params.guid = obj.guid
  3253. params.smooth = true
  3254. params.position = self.getPosition()
  3255. params.position.y = params.position.y + 4
  3256. takenObject = self.takeObject(params)
  3257. takenObject.destruct()
  3258. return true
  3259. end
  3260. end
  3261. return false
  3262. end
  3263. function playM30 ()
  3264. local params = {}
  3265. local p = self.getPosition()
  3266. local r = self.getRotation()
  3267. local s = self.getScale()
  3268. local yoffset = 0.0825
  3269. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3270. yoffset = yoffset + 0.165
  3271. params.smooth = false
  3272. Cooler.takeObject(params)
  3273. return 1
  3274. end
  3275.  
  3276. function Pokecenterfunc(container, color)
  3277. col = color
  3278. if insertTokenM31() then
  3279. startLuaCoroutine(self, "playM31")
  3280. else
  3281. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3282. end
  3283. end
  3284.  
  3285. function insertTokenM31()
  3286.  
  3287. for i, obj in pairs(self.getObjects()) do
  3288. if obj.name == "Medium Prize Token" then
  3289. local params = {}
  3290. params.guid = obj.guid
  3291. params.smooth = true
  3292. params.position = self.getPosition()
  3293. params.position.y = params.position.y + 4
  3294. takenObject = self.takeObject(params)
  3295. takenObject.destruct()
  3296. return true
  3297. end
  3298. end
  3299. return false
  3300. end
  3301. function playM31 ()
  3302. local params = {}
  3303. local p = self.getPosition()
  3304. local r = self.getRotation()
  3305. local s = self.getScale()
  3306. local yoffset = 0.0825
  3307. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3308. yoffset = yoffset + 0.165
  3309. params.smooth = false
  3310. Pokecenter.takeObject(params)
  3311. return 1
  3312. end
  3313.  
  3314. function Skyrimfunc(container, color)
  3315. col = color
  3316. if insertTokenM32() then
  3317. startLuaCoroutine(self, "playM32")
  3318. else
  3319. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3320. end
  3321. end
  3322.  
  3323. function insertTokenM32()
  3324.  
  3325. for i, obj in pairs(self.getObjects()) do
  3326. if obj.name == "Medium Prize Token" then
  3327. local params = {}
  3328. params.guid = obj.guid
  3329. params.smooth = true
  3330. params.position = self.getPosition()
  3331. params.position.y = params.position.y + 4
  3332. takenObject = self.takeObject(params)
  3333. takenObject.destruct()
  3334. return true
  3335. end
  3336. end
  3337. return false
  3338. end
  3339. function playM32 ()
  3340. local params = {}
  3341. local p = self.getPosition()
  3342. local r = self.getRotation()
  3343. local s = self.getScale()
  3344. local yoffset = 0.0825
  3345. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3346. yoffset = yoffset + 0.165
  3347. params.smooth = false
  3348. Skyrim.takeObject(params)
  3349. return 1
  3350. end
  3351.  
  3352. function Probedroidfunc(container, color)
  3353. col = color
  3354. if insertTokenM33() then
  3355. startLuaCoroutine(self, "playM33")
  3356. else
  3357. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3358. end
  3359. end
  3360.  
  3361. function insertTokenM33()
  3362.  
  3363. for i, obj in pairs(self.getObjects()) do
  3364. if obj.name == "Medium Prize Token" then
  3365. local params = {}
  3366. params.guid = obj.guid
  3367. params.smooth = true
  3368. params.position = self.getPosition()
  3369. params.position.y = params.position.y + 4
  3370. takenObject = self.takeObject(params)
  3371. takenObject.destruct()
  3372. return true
  3373. end
  3374. end
  3375. return false
  3376. end
  3377. function playM33 ()
  3378. local params = {}
  3379. local p = self.getPosition()
  3380. local r = self.getRotation()
  3381. local s = self.getScale()
  3382. local yoffset = 0.0825
  3383. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3384. yoffset = yoffset + 0.165
  3385. params.smooth = false
  3386. Probedroid.takeObject(params)
  3387. return 1
  3388. end
  3389.  
  3390. function Uselessdevicefunc(container, color)
  3391. col = color
  3392. if insertTokenM34() then
  3393. startLuaCoroutine(self, "playM34")
  3394. else
  3395. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3396. end
  3397. end
  3398.  
  3399. function insertTokenM34()
  3400.  
  3401. for i, obj in pairs(self.getObjects()) do
  3402. if obj.name == "Medium Prize Token" then
  3403. local params = {}
  3404. params.guid = obj.guid
  3405. params.smooth = true
  3406. params.position = self.getPosition()
  3407. params.position.y = params.position.y + 4
  3408. takenObject = self.takeObject(params)
  3409. takenObject.destruct()
  3410. return true
  3411. end
  3412. end
  3413. return false
  3414. end
  3415. function playM34 ()
  3416. local params = {}
  3417. local p = self.getPosition()
  3418. local r = self.getRotation()
  3419. local s = self.getScale()
  3420. local yoffset = 0.0825
  3421. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3422. yoffset = yoffset + 0.165
  3423. params.smooth = false
  3424. Uselessdevice.takeObject(params)
  3425. return 1
  3426. end
  3427.  
  3428. function Rupeebagfunc(container, color)
  3429. col = color
  3430. if insertTokenM35() then
  3431. startLuaCoroutine(self, "playM35")
  3432. else
  3433. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3434. end
  3435. end
  3436.  
  3437. function insertTokenM35()
  3438.  
  3439. for i, obj in pairs(self.getObjects()) do
  3440. if obj.name == "Medium Prize Token" then
  3441. local params = {}
  3442. params.guid = obj.guid
  3443. params.smooth = true
  3444. params.position = self.getPosition()
  3445. params.position.y = params.position.y + 4
  3446. takenObject = self.takeObject(params)
  3447. takenObject.destruct()
  3448. return true
  3449. end
  3450. end
  3451. return false
  3452. end
  3453. function playM35 ()
  3454. local params = {}
  3455. local p = self.getPosition()
  3456. local r = self.getRotation()
  3457. local s = self.getScale()
  3458. local yoffset = 0.0825
  3459. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3460. yoffset = yoffset + 0.165
  3461. params.smooth = false
  3462. Rupeebag.takeObject(params)
  3463. return 1
  3464. end
  3465.  
  3466. function Brainfunc(container, color)
  3467. col = color
  3468. if insertTokenM36() then
  3469. startLuaCoroutine(self, "playM36")
  3470. else
  3471. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3472. end
  3473. end
  3474.  
  3475. function insertTokenM36()
  3476.  
  3477. for i, obj in pairs(self.getObjects()) do
  3478. if obj.name == "Medium Prize Token" then
  3479. local params = {}
  3480. params.guid = obj.guid
  3481. params.smooth = true
  3482. params.position = self.getPosition()
  3483. params.position.y = params.position.y + 4
  3484. takenObject = self.takeObject(params)
  3485. takenObject.destruct()
  3486. return true
  3487. end
  3488. end
  3489. return false
  3490. end
  3491. function playM36 ()
  3492. local params = {}
  3493. local p = self.getPosition()
  3494. local r = self.getRotation()
  3495. local s = self.getScale()
  3496. local yoffset = 0.0825
  3497. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3498. yoffset = yoffset + 0.165
  3499. params.smooth = false
  3500. Brain.takeObject(params)
  3501. return 1
  3502. end
  3503.  
  3504. function nextsideM3()
  3505. self.clearButtons()
  3506. self.clearInputs()
  3507. self.createButton({click_function = 'backM3', function_owner = self, label = 'Back', position = {-2,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  3508. self.createButton({click_function = 'nextsideM4', function_owner = self, label = 'Next', position = {6,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  3509. self.createButton({label="Black Skeleton", click_function="BlackSkelefunc", function_owner=self, position={-2,0.25,2}, width = 1600, height = 380, font_size = 200})
  3510. self.createButton({label="Diamond", click_function="Diamondfunc", function_owner=self, position={-2,0.25,3}, width = 1600, height = 380, font_size = 200})
  3511. self.createButton({label="Skelenton/Bow", click_function="Skelebowfunc", function_owner=self, position={-2,0.25,4}, width = 1600, height = 380, font_size = 200})
  3512. self.createButton({label="Black Skeleton/Bow", click_function="Blackskelebowfunc", function_owner=self, position={-2,0.25,5}, width = 1600, height = 380, font_size = 200})
  3513. self.createButton({label="Dwarven Helmet", click_function="DwarvenHefunc", function_owner=self, position={2,0.25,2}, width = 1600, height = 380, font_size = 200})
  3514. self.createButton({label="Bonecrown", click_function="Bonecrownfunc", function_owner=self, position={2,0.25,3}, width = 1600, height = 380, font_size = 200})
  3515. self.createButton({label="Black Skull", click_function="BlackSkullfunc", function_owner=self, position={2,0.25,4}, width = 1600, height = 380, font_size = 200})
  3516. self.createButton({label="Kynareth", click_function="Kynarethfunc", function_owner=self, position={2,0.25,5}, width = 1600, height = 380, font_size = 200})
  3517. self.createButton({label="Stendarr", click_function="Stendarrfunc", function_owner=self, position={6,0.25,2}, width = 1600, height = 380, font_size = 200})
  3518. self.createButton({label="Talos", click_function="Talosfunc", function_owner=self, position={6,0.25,3}, width = 1600, height = 380, font_size = 200})
  3519. self.createButton({label="Dibella", click_function="Dibellafunc", function_owner=self, position={6,0.25,4}, width = 1600, height = 380, font_size = 200})
  3520. self.createButton({label="Akatosh", click_function="Akatoshfunc", function_owner=self, position={6,0.25,5}, width = 1600, height = 380, font_size = 200})
  3521. end
  3522.  
  3523. function backM3()
  3524. if lista ~= nil then
  3525. lista = nil
  3526. end
  3527. if partList ~= nil then
  3528. partList = nil
  3529. end
  3530. nextsideM2()
  3531. end
  3532.  
  3533. function BlackSkelefunc(container, color)
  3534. col = color
  3535. if insertTokenM37() then
  3536. startLuaCoroutine(self, "playM37")
  3537. else
  3538. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3539. end
  3540. end
  3541.  
  3542. function insertTokenM37()
  3543.  
  3544. for i, obj in pairs(self.getObjects()) do
  3545. if obj.name == "Medium Prize Token" then
  3546. local params = {}
  3547. params.guid = obj.guid
  3548. params.smooth = true
  3549. params.position = self.getPosition()
  3550. params.position.y = params.position.y + 4
  3551. takenObject = self.takeObject(params)
  3552. takenObject.destruct()
  3553. return true
  3554. end
  3555. end
  3556. return false
  3557. end
  3558. function playM37 ()
  3559. local params = {}
  3560. local p = self.getPosition()
  3561. local r = self.getRotation()
  3562. local s = self.getScale()
  3563. local yoffset = 0.0825
  3564. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3565. yoffset = yoffset + 0.165
  3566. params.smooth = false
  3567. BlackSkele.takeObject(params)
  3568. return 1
  3569. end
  3570.  
  3571. function Diamondfunc(container, color)
  3572. col = color
  3573. if insertTokenM38() then
  3574. startLuaCoroutine(self, "playM38")
  3575. else
  3576. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3577. end
  3578. end
  3579.  
  3580. function insertTokenM38()
  3581.  
  3582. for i, obj in pairs(self.getObjects()) do
  3583. if obj.name == "Medium Prize Token" then
  3584. local params = {}
  3585. params.guid = obj.guid
  3586. params.smooth = true
  3587. params.position = self.getPosition()
  3588. params.position.y = params.position.y + 4
  3589. takenObject = self.takeObject(params)
  3590. takenObject.destruct()
  3591. return true
  3592. end
  3593. end
  3594. return false
  3595. end
  3596. function playM38 ()
  3597. local params = {}
  3598. local p = self.getPosition()
  3599. local r = self.getRotation()
  3600. local s = self.getScale()
  3601. local yoffset = 0.0825
  3602. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3603. yoffset = yoffset + 0.165
  3604. params.smooth = false
  3605. Diamond.takeObject(params)
  3606. return 1
  3607. end
  3608.  
  3609. function Skelebowfunc(container, color)
  3610. col = color
  3611. if insertTokenM39() then
  3612. startLuaCoroutine(self, "playM39")
  3613. else
  3614. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3615. end
  3616. end
  3617.  
  3618. function insertTokenM39()
  3619.  
  3620. for i, obj in pairs(self.getObjects()) do
  3621. if obj.name == "Medium Prize Token" then
  3622. local params = {}
  3623. params.guid = obj.guid
  3624. params.smooth = true
  3625. params.position = self.getPosition()
  3626. params.position.y = params.position.y + 4
  3627. takenObject = self.takeObject(params)
  3628. takenObject.destruct()
  3629. return true
  3630. end
  3631. end
  3632. return false
  3633. end
  3634. function playM39 ()
  3635. local params = {}
  3636. local p = self.getPosition()
  3637. local r = self.getRotation()
  3638. local s = self.getScale()
  3639. local yoffset = 0.0825
  3640. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3641. yoffset = yoffset + 0.165
  3642. params.smooth = false
  3643. Skelebow.takeObject(params)
  3644. return 1
  3645. end
  3646.  
  3647. function Blackskelebowfunc(container, color)
  3648. col = color
  3649. if insertTokenM40() then
  3650. startLuaCoroutine(self, "playM40")
  3651. else
  3652. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3653. end
  3654. end
  3655.  
  3656. function insertTokenM40()
  3657.  
  3658. for i, obj in pairs(self.getObjects()) do
  3659. if obj.name == "Medium Prize Token" then
  3660. local params = {}
  3661. params.guid = obj.guid
  3662. params.smooth = true
  3663. params.position = self.getPosition()
  3664. params.position.y = params.position.y + 4
  3665. takenObject = self.takeObject(params)
  3666. takenObject.destruct()
  3667. return true
  3668. end
  3669. end
  3670. return false
  3671. end
  3672. function playM40 ()
  3673. local params = {}
  3674. local p = self.getPosition()
  3675. local r = self.getRotation()
  3676. local s = self.getScale()
  3677. local yoffset = 0.0825
  3678. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3679. yoffset = yoffset + 0.165
  3680. params.smooth = false
  3681. Blackskelebow.takeObject(params)
  3682. return 1
  3683. end
  3684.  
  3685. function DwarvenHefunc(container, color)
  3686. col = color
  3687. if insertTokenM41() then
  3688. startLuaCoroutine(self, "playM41")
  3689. else
  3690. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3691. end
  3692. end
  3693.  
  3694. function insertTokenM41()
  3695.  
  3696. for i, obj in pairs(self.getObjects()) do
  3697. if obj.name == "Medium Prize Token" then
  3698. local params = {}
  3699. params.guid = obj.guid
  3700. params.smooth = true
  3701. params.position = self.getPosition()
  3702. params.position.y = params.position.y + 4
  3703. takenObject = self.takeObject(params)
  3704. takenObject.destruct()
  3705. return true
  3706. end
  3707. end
  3708. return false
  3709. end
  3710. function playM41 ()
  3711. local params = {}
  3712. local p = self.getPosition()
  3713. local r = self.getRotation()
  3714. local s = self.getScale()
  3715. local yoffset = 0.0825
  3716. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3717. yoffset = yoffset + 0.165
  3718. params.smooth = false
  3719. DwarvenHe.takeObject(params)
  3720. return 1
  3721. end
  3722.  
  3723. function Bonecrownfunc(container, color)
  3724. col = color
  3725. if insertTokenM42() then
  3726. startLuaCoroutine(self, "playM42")
  3727. else
  3728. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3729. end
  3730. end
  3731.  
  3732. function insertTokenM42()
  3733.  
  3734. for i, obj in pairs(self.getObjects()) do
  3735. if obj.name == "Medium Prize Token" then
  3736. local params = {}
  3737. params.guid = obj.guid
  3738. params.smooth = true
  3739. params.position = self.getPosition()
  3740. params.position.y = params.position.y + 4
  3741. takenObject = self.takeObject(params)
  3742. takenObject.destruct()
  3743. return true
  3744. end
  3745. end
  3746. return false
  3747. end
  3748. function playM42 ()
  3749. local params = {}
  3750. local p = self.getPosition()
  3751. local r = self.getRotation()
  3752. local s = self.getScale()
  3753. local yoffset = 0.0825
  3754. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3755. yoffset = yoffset + 0.165
  3756. params.smooth = false
  3757. Bonecrown.takeObject(params)
  3758. return 1
  3759. end
  3760.  
  3761. function BlackSkullfunc(container, color)
  3762. col = color
  3763. if insertTokenM43() then
  3764. startLuaCoroutine(self, "playM43")
  3765. else
  3766. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3767. end
  3768. end
  3769.  
  3770. function insertTokenM43()
  3771.  
  3772. for i, obj in pairs(self.getObjects()) do
  3773. if obj.name == "Medium Prize Token" then
  3774. local params = {}
  3775. params.guid = obj.guid
  3776. params.smooth = true
  3777. params.position = self.getPosition()
  3778. params.position.y = params.position.y + 4
  3779. takenObject = self.takeObject(params)
  3780. takenObject.destruct()
  3781. return true
  3782. end
  3783. end
  3784. return false
  3785. end
  3786. function playM43 ()
  3787. local params = {}
  3788. local p = self.getPosition()
  3789. local r = self.getRotation()
  3790. local s = self.getScale()
  3791. local yoffset = 0.0825
  3792. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3793. yoffset = yoffset + 0.165
  3794. params.smooth = false
  3795. BlackSkull.takeObject(params)
  3796. return 1
  3797. end
  3798.  
  3799. function Kynarethfunc(container, color)
  3800. col = color
  3801. if insertTokenM44() then
  3802. startLuaCoroutine(self, "playM44")
  3803. else
  3804. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3805. end
  3806. end
  3807.  
  3808. function insertTokenM44()
  3809.  
  3810. for i, obj in pairs(self.getObjects()) do
  3811. if obj.name == "Medium Prize Token" then
  3812. local params = {}
  3813. params.guid = obj.guid
  3814. params.smooth = true
  3815. params.position = self.getPosition()
  3816. params.position.y = params.position.y + 4
  3817. takenObject = self.takeObject(params)
  3818. takenObject.destruct()
  3819. return true
  3820. end
  3821. end
  3822. return false
  3823. end
  3824. function playM44 ()
  3825. local params = {}
  3826. local p = self.getPosition()
  3827. local r = self.getRotation()
  3828. local s = self.getScale()
  3829. local yoffset = 0.0825
  3830. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3831. yoffset = yoffset + 0.165
  3832. params.smooth = false
  3833. Kynareth.takeObject(params)
  3834. return 1
  3835. end
  3836.  
  3837. function Stendarrfunc(container, color)
  3838. col = color
  3839. if insertTokenM45() then
  3840. startLuaCoroutine(self, "playM45")
  3841. else
  3842. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3843. end
  3844. end
  3845.  
  3846. function insertTokenM45()
  3847.  
  3848. for i, obj in pairs(self.getObjects()) do
  3849. if obj.name == "Medium Prize Token" then
  3850. local params = {}
  3851. params.guid = obj.guid
  3852. params.smooth = true
  3853. params.position = self.getPosition()
  3854. params.position.y = params.position.y + 4
  3855. takenObject = self.takeObject(params)
  3856. takenObject.destruct()
  3857. return true
  3858. end
  3859. end
  3860. return false
  3861. end
  3862. function playM45 ()
  3863. local params = {}
  3864. local p = self.getPosition()
  3865. local r = self.getRotation()
  3866. local s = self.getScale()
  3867. local yoffset = 0.0825
  3868. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3869. yoffset = yoffset + 0.165
  3870. params.smooth = false
  3871. Stendarr.takeObject(params)
  3872. return 1
  3873. end
  3874.  
  3875. function Talosfunc(container, color)
  3876. col = color
  3877. if insertTokenM46() then
  3878. startLuaCoroutine(self, "playM46")
  3879. else
  3880. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3881. end
  3882. end
  3883.  
  3884. function insertTokenM46()
  3885.  
  3886. for i, obj in pairs(self.getObjects()) do
  3887. if obj.name == "Medium Prize Token" then
  3888. local params = {}
  3889. params.guid = obj.guid
  3890. params.smooth = true
  3891. params.position = self.getPosition()
  3892. params.position.y = params.position.y + 4
  3893. takenObject = self.takeObject(params)
  3894. takenObject.destruct()
  3895. return true
  3896. end
  3897. end
  3898. return false
  3899. end
  3900. function playM46 ()
  3901. local params = {}
  3902. local p = self.getPosition()
  3903. local r = self.getRotation()
  3904. local s = self.getScale()
  3905. local yoffset = 0.0825
  3906. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3907. yoffset = yoffset + 0.165
  3908. params.smooth = false
  3909. Talos.takeObject(params)
  3910. return 1
  3911. end
  3912.  
  3913. function Dibellafunc(container, color)
  3914. col = color
  3915. if insertTokenM47() then
  3916. startLuaCoroutine(self, "playM47")
  3917. else
  3918. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3919. end
  3920. end
  3921.  
  3922. function insertTokenM47()
  3923.  
  3924. for i, obj in pairs(self.getObjects()) do
  3925. if obj.name == "Medium Prize Token" then
  3926. local params = {}
  3927. params.guid = obj.guid
  3928. params.smooth = true
  3929. params.position = self.getPosition()
  3930. params.position.y = params.position.y + 4
  3931. takenObject = self.takeObject(params)
  3932. takenObject.destruct()
  3933. return true
  3934. end
  3935. end
  3936. return false
  3937. end
  3938. function playM47 ()
  3939. local params = {}
  3940. local p = self.getPosition()
  3941. local r = self.getRotation()
  3942. local s = self.getScale()
  3943. local yoffset = 0.0825
  3944. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3945. yoffset = yoffset + 0.165
  3946. params.smooth = false
  3947. Dibella.takeObject(params)
  3948. return 1
  3949. end
  3950.  
  3951. function Akatoshfunc(container, color)
  3952. col = color
  3953. if insertTokenM48() then
  3954. startLuaCoroutine(self, "playM48")
  3955. else
  3956. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  3957. end
  3958. end
  3959.  
  3960. function insertTokenM48()
  3961.  
  3962. for i, obj in pairs(self.getObjects()) do
  3963. if obj.name == "Medium Prize Token" then
  3964. local params = {}
  3965. params.guid = obj.guid
  3966. params.smooth = true
  3967. params.position = self.getPosition()
  3968. params.position.y = params.position.y + 4
  3969. takenObject = self.takeObject(params)
  3970. takenObject.destruct()
  3971. return true
  3972. end
  3973. end
  3974. return false
  3975. end
  3976. function playM48 ()
  3977. local params = {}
  3978. local p = self.getPosition()
  3979. local r = self.getRotation()
  3980. local s = self.getScale()
  3981. local yoffset = 0.0825
  3982. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  3983. yoffset = yoffset + 0.165
  3984. params.smooth = false
  3985. Akatosh.takeObject(params)
  3986. return 1
  3987. end
  3988.  
  3989. function nextsideM4()
  3990. self.clearButtons()
  3991. self.clearInputs()
  3992. self.createButton({click_function = 'backM4', function_owner = self, label = 'Back', position = {-2,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  3993. --self.createButton({click_function = 'nextsideM5', function_owner = self, label = 'Next', position = {6,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  3994. self.createButton({label="Zenithar", click_function="Zenitharfunc", function_owner=self, position={-2,0.25,2}, width = 1600, height = 380, font_size = 200})
  3995. self.createButton({label="Mara", click_function="Marafunc", function_owner=self, position={-2,0.25,3}, width = 1600, height = 380, font_size = 200})
  3996. self.createButton({label="Julianos", click_function="Julianosfunc", function_owner=self, position={-2,0.25,4}, width = 1600, height = 380, font_size = 200})
  3997. self.createButton({label="Arkay", click_function="Arkayfunc", function_owner=self, position={-2,0.25,5}, width = 1600, height = 380, font_size = 200})
  3998. --self.createButton({label="A", click_function="Cloneballfunc", function_owner=self, position={2,0.25,2}, width = 1600, height = 380, font_size = 200})
  3999. --self.createButton({label="A", click_function="Ultraballfunc", function_owner=self, position={2,0.25,3}, width = 1600, height = 380, font_size = 200})
  4000. --self.createButton({label="?", click_function="Premierballfunc", function_owner=self, position={2,0.25,4}, width = 1600, height = 380, font_size = 200})
  4001. --self.createButton({label="?", click_function="Loveballfunc", function_owner=self, position={2,0.25,5}, width = 1600, height = 380, font_size = 200})
  4002. --self.createButton({label="?", click_function="Greatballfunc", function_owner=self, position={6,0.25,2}, width = 1600, height = 380, font_size = 200})
  4003. --self.createButton({label="?", click_function="Cherishballfunc", function_owner=self, position={6,0.25,3}, width = 1600, height = 380, font_size = 200})
  4004. --self.createButton({label="?", click_function="Lureballfunc", function_owner=self, position={6,0.25,4}, width = 1600, height = 380, font_size = 200})
  4005. --self.createButton({label="?", click_function="Ambrosiafunc", function_owner=self, position={6,0.25,5}, width = 1600, height = 380, font_size = 200})
  4006. end
  4007.  
  4008. function backM4()
  4009. if lista ~= nil then
  4010. lista = nil
  4011. end
  4012. if partList ~= nil then
  4013. partList = nil
  4014. end
  4015. nextsideM3()
  4016. end
  4017.  
  4018. function Zenitharfunc(container, color)
  4019. col = color
  4020. if insertTokenM49() then
  4021. startLuaCoroutine(self, "playM49")
  4022. else
  4023. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  4024. end
  4025. end
  4026.  
  4027. function insertTokenM49()
  4028.  
  4029. for i, obj in pairs(self.getObjects()) do
  4030. if obj.name == "Medium Prize Token" then
  4031. local params = {}
  4032. params.guid = obj.guid
  4033. params.smooth = true
  4034. params.position = self.getPosition()
  4035. params.position.y = params.position.y + 4
  4036. takenObject = self.takeObject(params)
  4037. takenObject.destruct()
  4038. return true
  4039. end
  4040. end
  4041. return false
  4042. end
  4043. function playM49 ()
  4044. local params = {}
  4045. local p = self.getPosition()
  4046. local r = self.getRotation()
  4047. local s = self.getScale()
  4048. local yoffset = 0.0825
  4049. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  4050. yoffset = yoffset + 0.165
  4051. params.smooth = false
  4052. Zenithar.takeObject(params)
  4053. return 1
  4054. end
  4055.  
  4056. function Marafunc(container, color)
  4057. col = color
  4058. if insertTokenM50() then
  4059. startLuaCoroutine(self, "playM50")
  4060. else
  4061. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  4062. end
  4063. end
  4064.  
  4065. function insertTokenM50()
  4066.  
  4067. for i, obj in pairs(self.getObjects()) do
  4068. if obj.name == "Medium Prize Token" then
  4069. local params = {}
  4070. params.guid = obj.guid
  4071. params.smooth = true
  4072. params.position = self.getPosition()
  4073. params.position.y = params.position.y + 4
  4074. takenObject = self.takeObject(params)
  4075. takenObject.destruct()
  4076. return true
  4077. end
  4078. end
  4079. return false
  4080. end
  4081. function playM50 ()
  4082. local params = {}
  4083. local p = self.getPosition()
  4084. local r = self.getRotation()
  4085. local s = self.getScale()
  4086. local yoffset = 0.0825
  4087. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  4088. yoffset = yoffset + 0.165
  4089. params.smooth = false
  4090. Mara.takeObject(params)
  4091. return 1
  4092. end
  4093.  
  4094. function Julianosfunc(container, color)
  4095. col = color
  4096. if insertTokenM51() then
  4097. startLuaCoroutine(self, "playM51")
  4098. else
  4099. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  4100. end
  4101. end
  4102.  
  4103. function insertTokenM51()
  4104.  
  4105. for i, obj in pairs(self.getObjects()) do
  4106. if obj.name == "Medium Prize Token" then
  4107. local params = {}
  4108. params.guid = obj.guid
  4109. params.smooth = true
  4110. params.position = self.getPosition()
  4111. params.position.y = params.position.y + 4
  4112. takenObject = self.takeObject(params)
  4113. takenObject.destruct()
  4114. return true
  4115. end
  4116. end
  4117. return false
  4118. end
  4119. function playM51 ()
  4120. local params = {}
  4121. local p = self.getPosition()
  4122. local r = self.getRotation()
  4123. local s = self.getScale()
  4124. local yoffset = 0.0825
  4125. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  4126. yoffset = yoffset + 0.165
  4127. params.smooth = false
  4128. Julianos.takeObject(params)
  4129. return 1
  4130. end
  4131.  
  4132. function Arkayfunc(container, color)
  4133. col = color
  4134. if insertTokenM52() then
  4135. startLuaCoroutine(self, "playM52")
  4136. else
  4137. broadcastToColor(tostring("Please insert 1x Medium Prize Token."),color, {1,0.25,0.25})
  4138. end
  4139. end
  4140.  
  4141. function insertTokenM52()
  4142.  
  4143. for i, obj in pairs(self.getObjects()) do
  4144. if obj.name == "Medium Prize Token" then
  4145. local params = {}
  4146. params.guid = obj.guid
  4147. params.smooth = true
  4148. params.position = self.getPosition()
  4149. params.position.y = params.position.y + 4
  4150. takenObject = self.takeObject(params)
  4151. takenObject.destruct()
  4152. return true
  4153. end
  4154. end
  4155. return false
  4156. end
  4157. function playM52 ()
  4158. local params = {}
  4159. local p = self.getPosition()
  4160. local r = self.getRotation()
  4161. local s = self.getScale()
  4162. local yoffset = 0.0825
  4163. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  4164. yoffset = yoffset + 0.165
  4165. params.smooth = false
  4166. Arkay.takeObject(params)
  4167. return 1
  4168. end
  4169.  
  4170. function largeprizes1()
  4171. self.clearButtons()
  4172. self.clearInputs()
  4173. self.createButton({click_function = 'FFGinitiate', function_owner = self, label = 'Back', position = {-2,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  4174. self.createButton({click_function = 'nextsideL1', function_owner = self, label = 'Next', position = {6,0.25,6}, width = 1600, height = 380, font_size = 200, scale = {1,1,1}})
  4175. self.createButton({label="Moltres", click_function="Moltresfunc", function_owner=self, position={-2,0.25,2}, width = 1600, height = 380, font_size = 200})
  4176. self.createButton({label="Zapdos", click_function="Zapdosfunc", function_owner=self, position={-2,0.25,3}, width = 1600, height = 380, font_size = 200})
  4177. self.createButton({label="Articuno", click_function="Articunofunc", function_owner=self, position={-2,0.25,4}, width = 1600, height = 380, font_size = 200})
  4178. self.createButton({label="Mewtwo", click_function="Mewtwofunc", function_owner=self, position={-2,0.25,5}, width = 1600, height = 380, font_size = 200})
  4179. self.createButton({label="Lady", click_function="Ladyfunc", function_owner=self, position={2,0.25,2}, width = 1600, height = 380, font_size = 200})
  4180. end
  4181.  
  4182. function FFGinitiate()
  4183. if lista ~= nil then
  4184. lista = nil
  4185. end
  4186. if partList ~= nil then
  4187. partList = nil
  4188. end
  4189. initiate()
  4190. end
  4191. function Moltresfunc(container, color)
  4192. col = color
  4193. if insertTokenL1() then
  4194. startLuaCoroutine(self, "playL1")
  4195. else
  4196. broadcastToColor(tostring("Please insert 1x Large Prize Token."),color, {1,0.25,0.25})
  4197. end
  4198. end
  4199.  
  4200. function insertTokenL1()
  4201.  
  4202. for i, obj in pairs(self.getObjects()) do
  4203. if obj.name == "Large Prize Token" then
  4204. local params = {}
  4205. params.guid = obj.guid
  4206. params.smooth = true
  4207. params.position = self.getPosition()
  4208. params.position.y = params.position.y + 4
  4209. takenObject = self.takeObject(params)
  4210. takenObject.destruct()
  4211. return true
  4212. end
  4213. end
  4214. return false
  4215. end
  4216. function playL1 ()
  4217. local params = {}
  4218. local p = self.getPosition()
  4219. local r = self.getRotation()
  4220. local s = self.getScale()
  4221. local yoffset = 0.0825
  4222. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  4223. yoffset = yoffset + 0.165
  4224. params.smooth = false
  4225. Moltres.takeObject(params)
  4226. return 1
  4227. end
  4228. function Zapdosfunc(container, color)
  4229. col = color
  4230. if insertTokenL2() then
  4231. startLuaCoroutine(self, "playL2")
  4232. else
  4233. broadcastToColor(tostring("Please insert 1x Large Prize Token."),color, {1,0.25,0.25})
  4234. end
  4235. end
  4236.  
  4237. function insertTokenL2()
  4238.  
  4239. for i, obj in pairs(self.getObjects()) do
  4240. if obj.name == "Large Prize Token" then
  4241. local params = {}
  4242. params.guid = obj.guid
  4243. params.smooth = true
  4244. params.position = self.getPosition()
  4245. params.position.y = params.position.y + 4
  4246. takenObject = self.takeObject(params)
  4247. takenObject.destruct()
  4248. return true
  4249. end
  4250. end
  4251. return false
  4252. end
  4253. function playL2 ()
  4254. local params = {}
  4255. local p = self.getPosition()
  4256. local r = self.getRotation()
  4257. local s = self.getScale()
  4258. local yoffset = 0.0825
  4259. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  4260. yoffset = yoffset + 0.165
  4261. params.smooth = false
  4262. Zapdos.takeObject(params)
  4263. return 1
  4264. end
  4265. function Articunofunc(container, color)
  4266. col = color
  4267. if insertTokenL3() then
  4268. startLuaCoroutine(self, "playL3")
  4269. else
  4270. broadcastToColor(tostring("Please insert 1x Large Prize Token."),color, {1,0.25,0.25})
  4271. end
  4272. end
  4273.  
  4274. function insertTokenL3()
  4275.  
  4276. for i, obj in pairs(self.getObjects()) do
  4277. if obj.name == "Large Prize Token" then
  4278. local params = {}
  4279. params.guid = obj.guid
  4280. params.smooth = true
  4281. params.position = self.getPosition()
  4282. params.position.y = params.position.y + 4
  4283. takenObject = self.takeObject(params)
  4284. takenObject.destruct()
  4285. return true
  4286. end
  4287. end
  4288. return false
  4289. end
  4290. function playL3 ()
  4291. local params = {}
  4292. local p = self.getPosition()
  4293. local r = self.getRotation()
  4294. local s = self.getScale()
  4295. local yoffset = 0.0825
  4296. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  4297. yoffset = yoffset + 0.165
  4298. params.smooth = false
  4299. Articuno.takeObject(params)
  4300. return 1
  4301. end
  4302. function Mewtwofunc(container, color)
  4303. col = color
  4304. if insertTokenL4() then
  4305. startLuaCoroutine(self, "playL4")
  4306. else
  4307. broadcastToColor(tostring("Please insert 1x Large Prize Token."),color, {1,0.25,0.25})
  4308. end
  4309. end
  4310.  
  4311. function insertTokenL4()
  4312.  
  4313. for i, obj in pairs(self.getObjects()) do
  4314. if obj.name == "Large Prize Token" then
  4315. local params = {}
  4316. params.guid = obj.guid
  4317. params.smooth = true
  4318. params.position = self.getPosition()
  4319. params.position.y = params.position.y + 4
  4320. takenObject = self.takeObject(params)
  4321. takenObject.destruct()
  4322. return true
  4323. end
  4324. end
  4325. return false
  4326. end
  4327. function playL4 ()
  4328. local params = {}
  4329. local p = self.getPosition()
  4330. local r = self.getRotation()
  4331. local s = self.getScale()
  4332. local yoffset = 0.0825
  4333. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  4334. yoffset = yoffset + 0.165
  4335. params.smooth = false
  4336. Mewtwo.takeObject(params)
  4337. return 1
  4338. end
  4339. function Ladyfunc(container, color)
  4340. col = color
  4341. if insertTokenL5() then
  4342. startLuaCoroutine(self, "playL5")
  4343. else
  4344. broadcastToColor(tostring("Please insert 1x Large Prize Token."),color, {1,0.25,0.25})
  4345. end
  4346. end
  4347.  
  4348. function insertTokenL5()
  4349.  
  4350. for i, obj in pairs(self.getObjects()) do
  4351. if obj.name == "Large Prize Token" then
  4352. local params = {}
  4353. params.guid = obj.guid
  4354. params.smooth = true
  4355. params.position = self.getPosition()
  4356. params.position.y = params.position.y + 4
  4357. takenObject = self.takeObject(params)
  4358. takenObject.destruct()
  4359. return true
  4360. end
  4361. end
  4362. return false
  4363. end
  4364. function playL5 ()
  4365. local params = {}
  4366. local p = self.getPosition()
  4367. local r = self.getRotation()
  4368. local s = self.getScale()
  4369. local yoffset = 0.0825
  4370. params.position = {p.x + math.cos(math.rad(r.y+90)) * (3 * s.x), p.y + yoffset, p.z - math.sin(math.rad(r.y+90)) * (3 * s.x)}
  4371. yoffset = yoffset + 0.165
  4372. params.smooth = false
  4373. Lady.takeObject(params)
  4374. return 1
  4375. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement