local xml = [[

]] -- ui start ---------------- -- local admin = "Or_this_variant#1234" local admin do local _,name = pcall(nil) admin = string.match(name, "(.-)%.") end ui.addTextArea(1,"

Play with checkpoints on?

",admin,300,60,200,100,0,0xDADADA,0.5,true) ui.addTextArea(2,"

Yes

",admin,305,115,90,40,0,0,0.5,true) ui.addTextArea(3,"

No

",admin,405,115,90,40,0,0,0.5,true) saveCode = {} saveCode_size = 5 -- ui start ---------------- --- colors --- colors = { pink = true, green = true, red = true, light_blue = true, yellow = true } --- colors --- -- sounds ------------------------------------------------- chekpoint_sounds = {"cite18/baguette0.mp3", "cite18/baguette1.mp3", "cite18/baguette2.mp3"} -- textAreaIds: 500 - invisible button -- 500 - sounds on / 501 - sounds off soundButtonsImageIDs = {500, 501} soundButtons_png = {"192dff43fc5.png", "192dff5e5c3.png"} defaultSoundVolume = 70 -- sounds ------------------------------------------------- -- music ------------------------------------------------- names_musics = {"cite18/musique/toundra1.mp3", "cite18/musique/toundra2.mp3"} -- textAreaIds: 600 - invisible button -- 600 - music on / 601 - music off musicButtonsImageIDs = {600, 601} musicButtons_png = {"192dff45759.png", "192dff5fd34.png"} defaultMusicVolume = 70 musicRarity = 100 musicCooldown = 240 -- music ------------------------------------------------- -- settings ------------------------------------------------- settings_png = "19020ddfd1c.png" -- textAreaIds: 404 - invisible button / 405 - textArea with save code textAreaIDs_settings = {404, 405} id_image_settings = -1 -- settings ------------------------------------------------- -- checkpoints ------------------------------------------------- checkpointsX = {98, 1118, 2457, 2596, 3023} checkpointsY = {728, 1130, 161, 875, 1011} -- (not used) (not used) (500) (501) (600) (601) (602) -- number, number, number, bool bool number number number number number -- id_teleport, id_image_object_ActivatedCheckpoint, id_ActivatedCheckpoint, checkpoint_withCheese, mice_withCheeseNow, id_imageSound, soundVolume, id_imageMusic, musicVolume, musicElapsedSeconds players_info = {} indexPlayerLeft = 100 -- players_info[100] -> .isPlayerLeft (bool) images_id = {"192dff64388.png", "192dff65afb.png"} checkpointCount = #checkpointsX id_image_objects_unactivatedCheckpoints = {} -- checkpoints ------------------------------------------------- gameIsRunning = false isCheckpointEnabled = false function runMaze(loadFromSave) if loadFromSave == false then for i = 1, saveCode_size do saveCode[i] = 0 end end gameIsRunning = true tfm.exec.disableAutoNewGame(true) tfm.exec.disableAfkDeath(true) tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoTimeLeft(true) tfm.exec.disablePhysicalConsumables(true) tfm.exec.newGame(xml) createTargetsImages() for name,v in next, tfm.get.room.playerList do eventNewPlayer(name) end end function updateSingleImage(id_image, name) if isCheckpointEnabled then if id_image == 1 then return tfm.exec.addImage(images_id[1], "_239", 98, 728, nil, 0.5, 0.5, 0, 1, 0.5, 0.5) elseif id_image == 2 then return tfm.exec.addImage(images_id[1], "_239", 1118, 1130, nil, 0.5, 0.5, 0, 1, 0.5, 0.5) elseif id_image == 3 then return tfm.exec.addImage(images_id[1], "_239", 2457, 161, nil, 0.5, 0.5, 0, 1, 0.5, 0.5) elseif id_image == 4 then return tfm.exec.addImage(images_id[1], "_239", 2596, 875, nil, 0.5, 0.5, 0, 1, 0.5, 0.5) elseif id_image == 5 then return tfm.exec.addImage(images_id[1], "_239", 3023, 1011, nil, 0.5, 0.5, 0, 1, 0.5, 0.5) -------- Activated checkpoints -------- elseif id_image == 6 then return tfm.exec.addImage(images_id[2], "_350", 98, 728, name, 0.5, 0.5, 0, 1, 0.5, 0.5) elseif id_image == 7 then return tfm.exec.addImage(images_id[2], "_350", 1118, 1130, name, 0.5, 0.5, 0, 1, 0.5, 0.5) elseif id_image == 8 then return tfm.exec.addImage(images_id[2], "_350", 2457, 161, name, 0.5, 0.5, 0, 1, 0.5, 0.5) elseif id_image == 9 then return tfm.exec.addImage(images_id[2], "_350", 2596, 875, name, 0.5, 0.5, 0, 1, 0.5, 0.5) elseif id_image == 10 then return tfm.exec.addImage(images_id[2], "_350", 3023, 1011, name, 0.5, 0.5, 0, 1, 0.5, 0.5) end end ----------- settings ----------- if id_image == textAreaIDs_settings[1] then t = tfm.exec.addImage(settings_png, "~1", 780, 45, nil, 1, 1, 0, 0.7, 0.5, 0.5) ui.removeTextArea(textAreaIDs_settings[1],nil) ui.addTextArea(textAreaIDs_settings[1],"

",nil,762,22, 40,40, 0,0,1,true) return t ----------- sounds ----------- elseif id_image == soundButtonsImageIDs[1] then t = tfm.exec.addImage(soundButtons_png[1], "~1", 745, 43, name, 0.3, 0.3, 0, 0.7, 0.5, 0.5) ui.removeTextArea(soundButtonsImageIDs[1],name) ui.addTextArea(soundButtonsImageIDs[1],"

",name,727,20, 40,40, 0,0,1,true) return t elseif id_image == soundButtonsImageIDs[2] then t = tfm.exec.addImage(soundButtons_png[2], "~1", 745, 43, name, 0.3, 0.3, 0, 0.7, 0.5, 0.5) ui.removeTextArea(soundButtonsImageIDs[1],name) ui.addTextArea(soundButtonsImageIDs[1],"

",name,727,20, 40,40, 0,0,1,true) return t ----------- music ----------- elseif id_image == musicButtonsImageIDs[1] then t = tfm.exec.addImage(musicButtons_png[1], "~1", 709, 42, name, 0.3, 0.3, 0, 0.7, 0.5, 0.5) ui.removeTextArea(musicButtonsImageIDs[1],name) ui.addTextArea(musicButtonsImageIDs[1],"

",name,691,19, 40,40, 0,0,1,true) return t elseif id_image == musicButtonsImageIDs[2] then t = tfm.exec.addImage(musicButtons_png[2], "~1", 709, 42, name, 0.3, 0.3, 0, 0.7, 0.5, 0.5) ui.removeTextArea(musicButtonsImageIDs[1],name) ui.addTextArea(musicButtonsImageIDs[1],"

",name,691,19, 40,40, 0,0,1,true) return t end end function createTargetsImages() id_image_settings = updateSingleImage(textAreaIDs_settings[1], nil) if isCheckpointEnabled then for i = 1, checkpointCount do table.insert(id_image_objects_unactivatedCheckpoints, updateSingleImage(i, nil)) end end end function updateTargetsImages(name) if id_image_settings ~= nil then tfm.exec.removeImage(id_image_settings) end id_image_settings = updateSingleImage(textAreaIDs_settings[1], nil) if isCheckpointEnabled then for i = 1, checkpointCount do cp = id_image_objects_unactivatedCheckpoints[i] if cp ~= nil then tfm.exec.removeImage(cp) end id_image_objects_unactivatedCheckpoints[i] = updateSingleImage(i, nil) end for name,v in next, tfm.get.room.playerList do if players_info[name] ~= nil then if players_info[name][2] ~= -1 then tfm.exec.removeImage(players_info[name][2]) end if players_info[name][3] ~= -1 then players_info[name][2] = updateSingleImage(players_info[name][3], name) end end end end end function setCheckpoint(id_activatedCheckpoint, name, hasCheese) if players_info[name][2] == -1 then players_info[name][2] = updateSingleImage(id_activatedCheckpoint, name) players_info[name][3] = id_activatedCheckpoint players_info[name][4] = hasCheese tfm.exec.playSound(chekpoint_sounds[math.random(#chekpoint_sounds)], players_info[name][soundButtonsImageIDs[2]], nil, nil, name) else if players_info[name][3] == id_activatedCheckpoint then if players_info[name][2] ~= nil then tfm.exec.removeImage(players_info[name][2]) end players_info[name][2] = -1 players_info[name][3] = -1 players_info[name][4] = false else if players_info[name][2] ~= nil then tfm.exec.removeImage(players_info[name][2]) end players_info[name][2] = updateSingleImage(id_activatedCheckpoint, name) players_info[name][3] = id_activatedCheckpoint players_info[name][4] = hasCheese tfm.exec.playSound(chekpoint_sounds[math.random(#chekpoint_sounds)], players_info[name][soundButtonsImageIDs[2]], nil, nil, name) end end end function updateSaveCode(deleting) if deleting == false then for name,v in next, tfm.get.room.playerList do ui.updateTextArea (textAreaIDs_settings[2], "

Save code:

" .. "

" .. table.concat(saveCode) .. "

", name) end else for name,v in next, tfm.get.room.playerList do ui.removeTextArea(textAreaIDs_settings[2], name) end end end function eventPlayerDied(name) tfm.exec.respawnPlayer(name) if players_info[name] ~= nil and players_info[name][1] ~= 0 then -- nothing else if gameIsRunning and isCheckpointEnabled then if players_info[name] ~= nil and players_info[name][2] ~= -1 then isWith_cp = true if (checkpointsX[players_info[name][3]-checkpointCount]) ~= nil and (checkpointsY[players_info[name][3]-checkpointCount]) ~= nil then tfm.exec.movePlayer(name, checkpointsX[players_info[name][3]-checkpointCount], checkpointsY[players_info[name][3]-checkpointCount], false, 0, 0, false) end if players_info[name][4] == true then tfm.exec.giveCheese(name) end end end end end function eventNewPlayer(name) tfm.exec.respawnPlayer(name) if gameIsRunning then eventPlayerDied(name) tfm.exec.removePhysicObject(13) tfm.exec.removePhysicObject(14) tfm.exec.addPhysicObject(13,886,317,{ type=13, color=16749824, restitution=0.2, friction=0.3, width=20, miceCollision=false, groundCollision=true }) tfm.exec.addPhysicObject(14,2579,1393,{ type=13, color=16749824, restitution=0.2, friction=0.3, width=20, miceCollision=false, groundCollision=true }) if colors.pink == true then tfm.exec.removePhysicObject(1) tfm.exec.removePhysicObject(3) tfm.exec.removePhysicObject(40) tfm.exec.addPhysicObject(1,616,207,{ type=12, color=16187647, angle=45, restitution=0.2, friction=0.3, width=30, height=30, miceCollision=false, groundCollision=true }) tfm.exec.addPhysicObject(3,532,959,{ type=12, color=16187647, restitution=0.2, friction=0.3, width=100, height=10, groundCollision=true }) tfm.exec.addPhysicObject(40,600,860,{type=12,color=16187647,restitution=0.2,friction=0.3,width=10,height=112,groundCollision=true}) end if colors.green == true then tfm.exec.removePhysicObject(2) tfm.exec.removePhysicObject(8) tfm.exec.removePhysicObject(41) tfm.exec.addPhysicObject(2,85,899,{ type=12, color=1769216, angle=45, restitution=0.2, friction=0.3, width=30, height=30, miceCollision=false, groundCollision=true }) tfm.exec.addPhysicObject(8,2041,107,{ type=12, color=1769216, restitution=0.2, friction=0.3, width=43, height=10, groundCollision=true }) tfm.exec.addPhysicObject(41,2004,66,{type=12,color=1769216,restitution=0.2,friction=0.3,width=10,height=44,groundCollision=true}) end if colors.red == true then tfm.exec.removePhysicObject(4) tfm.exec.removePhysicObject(6) tfm.exec.removePhysicObject(9) tfm.exec.addPhysicObject(4,1800,1370,{ type=12, color=16711937, angle=45, restitution=0.2, friction=0.3, width=30, height=30, miceCollision=false, groundCollision=true }) tfm.exec.addPhysicObject(6,1901,1097,{ type=12, color=16711937, restitution=0.2, friction=0.3, width=396, height=10, groundCollision=true }) tfm.exec.addPhysicObject(9,2268,202,{ type=12, color=16711937, restitution=0.2, friction=0.3, width=179, height=10, groundCollision=true }) end if colors.light_blue == true then tfm.exec.removePhysicObject(5) tfm.exec.removePhysicObject(7) tfm.exec.removePhysicObject(10) tfm.exec.addPhysicObject(5,1530,841,{ type=12, color=65529, angle=45, restitution=0.2, friction=0.3, width=30, height=30, miceCollision=false, groundCollision=true }) tfm.exec.addPhysicObject(7,1927,1160,{ type=12, color=65529, restitution=0.2, friction=0.3, width=49, height=10, groundCollision=true }) tfm.exec.addPhysicObject(10,2268,220,{ type=12, color=65529, restitution=0.2, friction=0.3, width=179, height=10, groundCollision=true }) end if colors.yellow == true then tfm.exec.removePhysicObject(11) tfm.exec.removePhysicObject(12) tfm.exec.addPhysicObject(11,2329,554,{ type=12, color=16774400, angle=45, restitution=0.2, friction=0.3, width=30, height=30, miceCollision=false, groundCollision=true }) tfm.exec.addPhysicObject(12,335,1250,{ type=12, color=16774400, restitution=0.2, friction=0.3, width=10, height=92, groundCollision=true }) end tfm.exec.bindKeyboard(name, 40, true, true) tfm.exec.bindKeyboard(name, 83, true, true) tfm.exec.bindKeyboard(name, 98, true, true) if players_info[name] == nil then players_info[name] = {0, -1, -1, false, false} players_info[name][indexPlayerLeft] = false -- [100] players_info[name][soundButtonsImageIDs[1]] = -1 -- [500] players_info[name][soundButtonsImageIDs[2]] = defaultSoundVolume -- [501] players_info[name][musicButtonsImageIDs[1]] = -1 -- [600] players_info[name][musicButtonsImageIDs[2]] = defaultMusicVolume -- [601] players_info[name][musicButtonsImageIDs[2] + 1] = 0 -- [602] end players_info[name][indexPlayerLeft] = false if isCheckpointEnabled then if players_info[name][2] ~= -1 then if (checkpointsX[players_info[name][3]-checkpointCount]) ~= nil and (checkpointsY[players_info[name][3]-checkpointCount]) ~= nil then tfm.exec.movePlayer(name, checkpointsX[players_info[name][3]-checkpointCount], checkpointsY[players_info[name][3]-checkpointCount], false, 0, 0, false) end if players_info[name][4] == true then tfm.exec.giveCheese(name) end end end updateTargetsImages(name) end end function eventKeyboard(playerName, keyCode, down, xPlayerPosition,yPlayerPosition) if gameIsRunning then if keyCode==40 or keyCode==83 or keyCode==98 then if xPlayerPosition >= 601 and xPlayerPosition <= 631 and yPlayerPosition >= 192 and yPlayerPosition <= 222 then colors.pink = false tfm.exec.removePhysicObject(1) tfm.exec.removePhysicObject(3) tfm.exec.removePhysicObject(40) saveCode[1] = "1" elseif xPlayerPosition >= 70 and xPlayerPosition <= 100 and yPlayerPosition >= 884 and yPlayerPosition <= 914 then colors.green = false tfm.exec.removePhysicObject(2) tfm.exec.removePhysicObject(8) tfm.exec.removePhysicObject(41) saveCode[2] = "1" elseif xPlayerPosition >= 1785 and xPlayerPosition <= 1815 and yPlayerPosition >= 1355 and yPlayerPosition <= 1385 then colors.red = false tfm.exec.removePhysicObject(4) tfm.exec.removePhysicObject(6) tfm.exec.removePhysicObject(9) saveCode[3] = "1" elseif xPlayerPosition >= 1515 and xPlayerPosition <= 1545 and yPlayerPosition >= 826 and yPlayerPosition <= 856 then colors.light_blue = false tfm.exec.removePhysicObject(5) tfm.exec.removePhysicObject(7) tfm.exec.removePhysicObject(10) saveCode[4] = "1" elseif xPlayerPosition >= 2314 and xPlayerPosition <= 2344 and yPlayerPosition >= 539 and yPlayerPosition <= 569 then colors.yellow = false tfm.exec.removePhysicObject(11) tfm.exec.removePhysicObject(12) saveCode[5] = "1" end if xPlayerPosition >= 871 and xPlayerPosition <= 901 and yPlayerPosition >= 302 and yPlayerPosition <= 332 then tfm.exec.movePlayer(playerName,2579,1393,false,0,0,true) end if xPlayerPosition >= 2564 and xPlayerPosition <= 2594 and yPlayerPosition >= 1378 and yPlayerPosition <= 1408 then tfm.exec.movePlayer(playerName,886,317,false,0,0,true) end if isCheckpointEnabled then ------------- checkpoints ------------- if xPlayerPosition >= 83 and xPlayerPosition <= 113 and yPlayerPosition >= 713 and yPlayerPosition <= 743 then setCheckpoint(1+checkpointCount, playerName, tfm.get.room.playerList[playerName].hasCheese == true) elseif xPlayerPosition >= 1103 and xPlayerPosition <= 1133 and yPlayerPosition >= 1115 and yPlayerPosition <= 1145 then setCheckpoint(2+checkpointCount, playerName, tfm.get.room.playerList[playerName].hasCheese == true) elseif xPlayerPosition >= 2442 and xPlayerPosition <= 2472 and yPlayerPosition >= 146 and yPlayerPosition <= 176 then setCheckpoint(3+checkpointCount, playerName, tfm.get.room.playerList[playerName].hasCheese == true) elseif xPlayerPosition >= 2581 and xPlayerPosition <= 2611 and yPlayerPosition >= 860 and yPlayerPosition <= 890 then setCheckpoint(4+checkpointCount, playerName, tfm.get.room.playerList[playerName].hasCheese == true) elseif xPlayerPosition >= 3008 and xPlayerPosition <= 3038 and yPlayerPosition >= 996 and yPlayerPosition <= 1026 then setCheckpoint(5+checkpointCount, playerName, tfm.get.room.playerList[playerName].hasCheese == true) end end ------------- checkpoints ------------- updateSaveCode(false) end end end function eventTextAreaCallback(textAreaID, playerName, callback) if gameIsRunning then if players_info[playerName] ~= nil then if textAreaID == textAreaIDs_settings[1] then if players_info[playerName][soundButtonsImageIDs[1]] == -1 then ui.addTextArea(textAreaIDs_settings[2],"

Save code:

" .. "

" .. table.concat(saveCode) .. "

", playerName, 600, 70, 190, 50, 0, 0xDADADA, 0.5, true) if players_info[playerName][soundButtonsImageIDs[2]] ~= 0 then players_info[playerName][soundButtonsImageIDs[1]] = updateSingleImage(soundButtonsImageIDs[1], playerName) else players_info[playerName][soundButtonsImageIDs[1]] = updateSingleImage(soundButtonsImageIDs[2], playerName) end if players_info[playerName][musicButtonsImageIDs[2]] ~= 0 then players_info[playerName][musicButtonsImageIDs[1]] = updateSingleImage(musicButtonsImageIDs[1], playerName) else players_info[playerName][musicButtonsImageIDs[1]] = updateSingleImage(musicButtonsImageIDs[2], playerName) end else if players_info[playerName][soundButtonsImageIDs[1]] ~= nil then tfm.exec.removeImage(players_info[playerName][soundButtonsImageIDs[1]]) end if players_info[playerName][musicButtonsImageIDs[1]] ~= nil then tfm.exec.removeImage(players_info[playerName][musicButtonsImageIDs[1]]) end ui.removeTextArea(soundButtonsImageIDs[1], playerName) ui.removeTextArea(musicButtonsImageIDs[1], playerName) ui.removeTextArea(textAreaIDs_settings[2], playerName) ui.removeTextArea(indexPlayerLeft, playerName) players_info[playerName][soundButtonsImageIDs[1]] = -1 players_info[playerName][musicButtonsImageIDs[1]] = -1 end elseif textAreaID == textAreaIDs_settings[2] then if tfm.get.room.isTribeHouse == false then tfm.exec.chatMessage("Save code: " .. "" .. table.concat(saveCode) .. "", playerName) end ui.removeTextArea(textAreaIDs_settings[2], playerName) print("Save code: " .. table.concat(saveCode)) elseif textAreaID == soundButtonsImageIDs[1] then tfm.exec.removeImage(players_info[playerName][soundButtonsImageIDs[1]]) if players_info[playerName][soundButtonsImageIDs[2]] ~= 0 then players_info[playerName][soundButtonsImageIDs[2]] = 0 players_info[playerName][soundButtonsImageIDs[1]] = updateSingleImage(soundButtonsImageIDs[2], playerName) else players_info[playerName][soundButtonsImageIDs[2]] = defaultSoundVolume players_info[playerName][soundButtonsImageIDs[1]] = updateSingleImage(soundButtonsImageIDs[1], playerName) end elseif textAreaID == musicButtonsImageIDs[1] then tfm.exec.removeImage(players_info[playerName][musicButtonsImageIDs[1]]) if players_info[playerName][musicButtonsImageIDs[2]] ~= 0 then players_info[playerName][musicButtonsImageIDs[2]] = 0 players_info[playerName][musicButtonsImageIDs[1]] = updateSingleImage(musicButtonsImageIDs[2], playerName) ui.addTextArea(indexPlayerLeft,"

From this moment on, the music will no longer start automatically.

",playerName,215,30,370,40,0,0xDADADA,0.5,true) else players_info[playerName][musicButtonsImageIDs[2]] = defaultMusicVolume players_info[playerName][musicButtonsImageIDs[1]] = updateSingleImage(musicButtonsImageIDs[1], playerName) ui.removeTextArea(indexPlayerLeft, playerName) end elseif textAreaID == indexPlayerLeft then ui.removeTextArea(indexPlayerLeft, playerName) end end else ui.removeTextArea(4, playerName) ui.removeTextArea(4, playerName) ui.addTextArea(4,"

Start new game

",admin,20,190,200,30,0,0xDADADA,0.5,true) ui.addTextArea(5,"

Continue saved game

",admin,20,230,200,30,0,0xDADADA,0.5,true) if textAreaID == 5 then ui.addPopup (0, 2, "

Load Level from Code

", admin, 20, 300, 200, true) elseif textAreaID == 4 then ui.removeTextArea(1, playerName) ui.removeTextArea(2, playerName) ui.removeTextArea(3, playerName) ui.removeTextArea(4, playerName) ui.removeTextArea(5, playerName) runMaze(false) elseif textAreaID == 2 then isCheckpointEnabled = true ui.removeTextArea(2, playerName) ui.addTextArea(2,"

Yes

",admin,305,115,90,40,0,0x71B82B,0.5,true) ui.removeTextArea(3, playerName) ui.addTextArea(3,"

No

",admin,405,115,90,40,0,0,0.5,true) elseif textAreaID == 3 then isCheckpointEnabled = false ui.removeTextArea(3, playerName) ui.addTextArea(3,"

No

",admin,405,115,90,40,0,0xDD3C3C,0.5,true) ui.removeTextArea(2, playerName) ui.addTextArea(2,"

Yes

",admin,305,115,90,40,0,0,0.5,true) end end end function eventPopupAnswer (popupId, playerName, answer) if gameIsRunning == false then isCode = true for i = 1, #answer do saveCode[i] = string.sub(answer, i, i) if saveCode[i] < "0" or saveCode[i] > "1" then isCode = false end end if #answer ~= saveCode_size or isCode == false then ui.addPopup (0, 2, "

Load Level from Code

", admin, 20, 300, 200, true) saveCode = {} else if saveCode[1] == "1" then colors.pink = false end if saveCode[2] == "1" then colors.green = false end if saveCode[3] == "1" then colors.red = false end if saveCode[4] == "1" then colors.light_blue = false end if saveCode[5] == "1" then colors.yellow = false end ui.removeTextArea(1, playerName) ui.removeTextArea(2, playerName) ui.removeTextArea(3, playerName) ui.removeTextArea(4, playerName) ui.removeTextArea(5, playerName) runMaze(true) end end end function eventLoop(elapsedTime, remainingTime) for name,v in next, tfm.get.room.playerList do if (players_info[name] ~= nil) and (players_info[name][indexPlayerLeft] == false) then local t = musicButtonsImageIDs[2]+1 if ((players_info[name][t] > musicCooldown) or (players_info[name][t] == 0)) and (players_info[name][t-1] ~= 0) then a = math.random(musicRarity) if a == musicRarity then players_info[name][t] = 0.5 tfm.exec.playSound(names_musics[math.random(#names_musics)], players_info[name][t-1], nil, nil, name) end elseif players_info[name][t-1] ~= 0 then players_info[name][t] = players_info[name][t] + 0.5 end end end end function eventPlayerLeft(playerName) players_info[playerName][indexPlayerLeft] = true end