Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- noninteractable = {
- '353f1c','62e874','211b2e','f01594',
- '3d4319','5079c8','a9cc56','98b2ad',
- 'f780a9','aa46d9','73ebce','27cdec'
- }
- function setNoninteract()
- for _,v in pairs(noninteractable) do
- getObjectFromGUID(v).interactable = false
- end
- end
- currentOmenTile = "nil"
- currentOmenCard = "nil"
- currentPlayer = "White"
- cards = {"Bite", "Bloodstone", "Book","Box","Cat","Crystal Ball",
- "Dog", "Girl", "Holy Symbol", "Key","Letter","Madman", "Mask",
- "Medallion","Photograph", "Ring","Rope", "Skull", "Spear", "Spirit Board", "Vial"}
- rooms = {"Abandoned Room", "Balcony", "Catacombs", "Charred Room", "Dining Room",
- "Dungeon","Furnace Room", "Gallery", "Gymnasium", "Junk Room",
- "Kitchen", "Master Bedroom", "Nursery","Pentagram Chamber", "Rookery",
- "Servants' Quarters","Study","Theater"}
- takenCards = {}
- haunts = {}
- haunts[1] = {18,96, 7,63, 88,12,38, 1, 9, 96,100,45,42,49, 96,28,86,34,43,48,96}
- haunts[2] = {24,67, 7,63, 88,32, 5,16, 6, 90, 87,11,25,49, 89,20,71,47,39, 2,70}
- haunts[3] = { 4,59, 7,61, 88,23,46, 1,13, 53, 83,10,25,49, 94,41,69,37,43,48,91}
- haunts[4] = {24,79,33,63,101,23,38,30,13,101, 83,31,48,44,101,20,69,47,15, 8,101}
- haunts[5] = {24,67, 3,99, 60,27, 5,16, 6, 70, 54,45,42,21, 89,20,82,37,39,40,91}
- haunts[6] = {97,55,55,61, 55,84,72,55,66, 53,100,56,55,77, 89,85,69,73,65,64,80}
- haunts[7] = { 4,59,33,61, 75,32,38,30,13, 75, 83,10,42,36, 75,28,75,34,15, 2,91}
- haunts[8] = {18,79, 3,52, 88,19,19,19,22, 53, 54,10,25,36, 76,41,71,37,15, 8,70}
- haunts[9] = {35,79,29,52, 92,12,46, 1,22, 92,100,11,22,21, 92,41,86,47,43,48,92}
- haunts[10] ={ 4,79,33,52, 88,27,46, 1, 9, 68,100,11,25,44, 76,17,71,17,17,40,91}
- haunts[11] ={18,67, 3,99, 60,23,46,16,22, 53, 87,31,32,36, 89,41,82,37,39, 2,80}
- haunts[12] ={35,98,29,98, 98,27, 5,16, 6, 90, 54,10,35,44, 76,20,82,47,43, 2,98}
- haunts[13] ={74,67,95,99, 74,84,72,58,66, 68, 87,74,74,95, 95,85,86,73,65,95,80}
- haunts[14] ={26,57,50,61, 81,32,50,26,26, 81, 83,45,14,14, 94,26,81,14,50,40,81}
- haunts[15] ={97,93,93,57, 57,93,57,58,66, 93, 87,56,57,77, 94,85,86,73,65,64,70}
- haunts[16] ={35,59,29,52, 60,12, 5,30, 9, 68, 54,31,42,21, 94,28,71,34,15, 8,80}
- haunts[17] ={97,59,78,99, 78,84,72,58,78, 90, 78,56,78,77, 76,85,82,73,65,64,70}
- haunts[18] ={97,62,51,63, 60,84,72,58,66, 68, 51,56,62,77, 51,51,69,62,62,64,62}
- button_parameters = {}
- button_parameters.click_function = 'startHaunt'
- button_parameters.function_owner = nil
- button_parameters.label = 'Start Haunt'
- button_parameters.position = {0,0.1,-1}
- button_parameters.rotation = {0,0,0}
- button_parameters.scale = {0.2, 1, 0.2}
- button_parameters.width = 3000
- button_parameters.height = 400
- button_parameters.font_size = 400
- button_parameters2 = {}
- button_parameters2.click_function = 'startHaunt'
- button_parameters2.function_owner = nil
- button_parameters2.label = 'Start Haunt'
- button_parameters2.position = {0,0.1,0.4}
- button_parameters2.rotation = {0,180,0}
- button_parameters2.width = 400
- button_parameters2.height = 50
- button_parameters2.font_size = 60
- devbutton_parameters = {}
- devbutton_parameters.click_function = 'devFunction'
- devbutton_parameters.function_owner = nil
- devbutton_parameters.label = 'Dev'
- devbutton_parameters.position = {0,0.1,-3}
- devbutton_parameters.rotation = {0,0,0}
- devbutton_parameters.width = 300
- devbutton_parameters.height = 30
- devbutton_parameters.font_size = 100
- greyTratiorZone = nil
- greySurvivorZone = nil
- whiteTratiorZone = nil
- whiteSurvivorZone = nil
- redTratiorZone = nil
- redSurvivorZone = nil
- orangeTratiorZone = nil
- orangeSurvivorZone = nil
- greenTratiorZone = nil
- greenSurvivorZone = nil
- blueTratiorZone = nil
- blueSurvivorZone = nil
- purpleTratiorZone = nil
- purpleSurvivorZone = nil
- revwhiteTratiorZone = nil
- revwhiteSurvivorZone = nil
- revredTratiorZone = nil
- revredSurvivorZone = nil
- revorangeTratiorZone = nil
- revorangeSurvivorZone = nil
- revgreenTratiorZone = nil
- revgreenSurvivorZone = nil
- revblueTratiorZone = nil
- revblueSurvivorZone = nil
- revpurpleTratiorZone = nil
- revpurpleSurvivorZone = nil
- whiteOmen = 0
- redOmen = 0
- orangeOmen = 0
- greenOmen = 0
- blueOmen = 0
- purpleOmen = 0
- whiteItem = 0
- redItem = 0
- orangeItem = 0
- greenItem = 0
- blueItem = 0
- purpleItem = 0
- survivalbook = 'a6b2ba'
- traitorbook = 'a68e3d'
- function onLoad(data)
- if data ~= nil and data ~= "" then
- local allData = JSON.decode(data)
- visitedRooms = allData.visitedRooms
- end
- --Shuffling Cards
- getObjectFromGUID('1c4dca').shuffle()
- getObjectFromGUID('aa006b').shuffle()
- getObjectFromGUID('c2ef1b').shuffle()
- getObjectFromGUID('a0f614').shuffle()
- checker = getObjectFromGUID('353f1c')
- checker.createButton(button_parameters)
- --checker.createButton(devbutton_parameters)
- counter = getObjectFromGUID('81361c')
- greyTratiorZone = getObjectFromGUID("094f74")
- greySurvivorZone = getObjectFromGUID("d75522")
- whiteTratiorZone = getObjectFromGUID("a8ba7e")
- whiteSurvivorZone = getObjectFromGUID("f18f6d")
- redTratiorZone = getObjectFromGUID("65fb3b")
- redSurvivorZone = getObjectFromGUID("aef035")
- orangeTratiorZone = getObjectFromGUID("419515")
- orangeSurvivorZone = getObjectFromGUID("d3b7c4")
- greenTratiorZone = getObjectFromGUID("7c7a62")
- greenSurvivorZone = getObjectFromGUID("3e7084")
- blueTratiorZone = getObjectFromGUID("9e91fc")
- blueSurvivorZone = getObjectFromGUID("befe0b")
- purpleTratiorZone = getObjectFromGUID("5d4df3")
- purpleSurvivorZone = getObjectFromGUID("362ac7")
- itemStat = getObjectFromGUID('434c69')
- if itemStat.getName() == 'Item count' then
- values = split(itemStat.getDescription(), ";")
- whiteOmen = tonumber(values[0])
- redOmen = tonumber(values[1])
- orangeOmen = tonumber(values[2])
- greenOmen = tonumber(values[3])
- blueOmen = tonumber(values[4])
- purpleOmen = tonumber(values[5])
- whiteItem = tonumber(values[6])
- redItem = tonumber(values[7])
- orangeItem = tonumber(values[8])
- greenItem = tonumber(values[9])
- blueItem = tonumber(values[10])
- purpleItem = tonumber(values[11])
- else
- updateStats()
- end
- setNoninteract()
- end
- function updateStats()
- itemStat = getObjectFromGUID('434c69')
- itemStat.setName('Item count')
- itemStat.setDescription(whiteOmen .. ";" .. redOmen.. ";" .. orangeOmen .. ";" .. greenOmen .. ";" .. blueOmen .. ";" .. purpleOmen .. ";" .. whiteItem .. ";" .. redItem .. ";" .. orangeItem .. ";" .. greenItem .. ";" .. blueItem .. ";" .. purpleItem)
- end
- function onObjectEnterScriptingZone(zone, enter_object)
- if zone.getGUID() == '7b23b8' and enter_object.getDescription() == "Secrets of Survial" then
- survivalbook = enter_object.getGUID()
- end
- if zone.getGUID() == '294ff9' and enter_object.getDescription() == "Traitor's Tome" then
- traitorbook = enter_object.getGUID()
- end
- if zone.getGUID() == '0de295' or zone.getGUID() == 'b8eaa1' then
- i = 0
- if not enter_object.getName() then
- return
- end
- for k, v in pairs(takenCards) do
- i = i + 1
- if v == enter_object.getName() then
- if enter_object.getDescription() == "Omen" and zone.getGUID() == 'b8eaa1' then
- takenCards[i] = "X"
- getObjectFromGUID('81361c').Counter.decrement()
- if currentPlayer == "White" then
- whiteOmen = whiteOmen - 1
- end
- if currentPlayer == "Red" then
- redOmen = redOmen - 1
- end
- if currentPlayer == "Orange" then
- orangeOmen = orangeOmen - 1
- end
- if currentPlayer == "Green" then
- greenOmen = greenOmen - 1
- end
- if currentPlayer == "Blue" then
- blueOmen = blueOmen - 1
- end
- if currentPlayer == "Purple" then
- purpleOmen = purpleOmen - 1
- end
- end
- if enter_object.getDescription() == "Item" and zone.getGUID() == '0de295' then
- takenCards[i] = "X"
- if currentPlayer == "White" then
- whiteItem = whiteItem - 1
- end
- if currentPlayer == "Red" then
- redItem = redItem - 1
- end
- if currentPlayer == "Orange" then
- orangeItem = orangeItem - 1
- end
- if currentPlayer == "Green" then
- greenItem = greenItem - 1
- end
- if currentPlayer == "Blue" then
- blueItem = blueItem - 1
- end
- if currentPlayer == "Purple" then
- purpleItem = purpleItem - 1
- end
- end
- end
- end
- end
- end
- function deconLeaveScriptingZone(data)
- onObjectLeaveScriptingZone(data[1], data[2])
- end
- function onObjectLeaveScriptingZone(zone, leave_object)
- for k, v in pairs(rooms) do
- if not leave_object.getName() then
- return
- end
- if v == leave_object.getName() and zone.getGUID() == '24ffd6' then
- currentOmenTile = leave_object
- end
- end
- for k, v in pairs(cards) do
- if not leave_object.getName() then
- return
- end
- if v == leave_object.getName() and zone.getGUID() == 'b8eaa1' then
- currentOmenCard = leave_object
- takenCards[#takenCards + 1] = leave_object.getName()
- getObjectFromGUID('81361c').Counter.increment()
- if currentPlayer == "White" then
- whiteOmen = whiteOmen + 1
- end
- if currentPlayer == "Red" then
- redOmen = redOmen + 1
- end
- if currentPlayer == "Orange" then
- orangeOmen = orangeOmen + 1
- end
- if currentPlayer == "Green" then
- greenOmen = greenOmen + 1
- end
- if currentPlayer == "Blue" then
- blueOmen = blueOmen + 1
- end
- if currentPlayer == "Purple" then
- purpleOmen = purpleOmen + 1
- end
- end
- end
- if zone.getGUID() == '0de295' and leave_object.getDescription() == "Item" then
- if not leave_object.getName() then
- return
- end
- takenCards[#takenCards + 1] = leave_object.getName()
- if currentPlayer == "White" then
- whiteItem = whiteItem + 1
- end
- if currentPlayer == "Red" then
- redItem = redItem + 1
- end
- if currentPlayer == "Orange" then
- orangeItem = orangeItem + 1
- end
- if currentPlayer == "Green" then
- greenItem = greenItem + 1
- end
- if currentPlayer == "Blue" then
- blueItem = blueItem + 1
- end
- if currentPlayer == "Purple" then
- purpleItem = purpleItem + 1
- end
- end
- end
- function onSave()
- local data = {}
- data.visitedRooms = visitedRooms
- return JSON.encode_pretty(data)
- end
- visitedRooms = {{'Study'}, {'Larder'}, {'Library'}, {'Gymnasium'}, {'Menagerie'}, {'Chapel'}}
- function onPlayerTurnStart(player_color_start, player_color_previous)
- updateStats()
- currentPlayer = player_color_start
- currentTile = nil
- if player_color_previous == "White" then
- if getObjectFromGUID('048bc4') ~= nil then
- currentTile = getObjectFromGUID('048bc4').getVar('currentTile')
- elseif getObjectFromGUID('ad6842') ~= nil then
- currentTile = getObjectFromGUID('ad6842').getVar('currentTile')
- end
- elseif player_color_previous == "Red" then
- if getObjectFromGUID('2599a6') ~= nil then
- currentTile = getObjectFromGUID('2599a6').getVar('currentTile')
- elseif getObjectFromGUID('567964') ~= nil then
- currentTile = getObjectFromGUID('567964').getVar('currentTile')
- end
- elseif player_color_previous == "Orange" then
- if getObjectFromGUID('15aad7') ~= nil then
- currentTile = getObjectFromGUID('15aad7').getVar('currentTile')
- elseif getObjectFromGUID('eb1a2d') ~= nil then
- currentTile = getObjectFromGUID('eb1a2d').getVar('currentTile')
- end
- elseif player_color_previous == "Green" then
- if getObjectFromGUID('136efb') ~= nil then
- currentTile = getObjectFromGUID('136efb').getVar('currentTile')
- elseif getObjectFromGUID('87329f') ~= nil then
- currentTile = getObjectFromGUID('87329f').getVar('currentTile')
- end
- elseif player_color_previous == "Blue" then
- if getObjectFromGUID('fe6895') ~= nil then
- currentTile = getObjectFromGUID('fe6895').getVar('currentTile')
- elseif getObjectFromGUID('5d5181') ~= nil then
- currentTile = getObjectFromGUID('5d5181').getVar('currentTile')
- end
- elseif player_color_previous == "Purple" then
- if getObjectFromGUID('44219e') ~= nil then
- currentTile = getObjectFromGUID('44219e').getVar('currentTile')
- elseif getObjectFromGUID('026011') ~= nil then
- currentTile = getObjectFromGUID('026011').getVar('currentTile')
- end
- end
- done = false
- for k, v in pairs(visitedRooms) do
- if v[1] == currentTile then
- for j in pairs(v) do
- if v[j] == player_color_previous then
- done = true
- end
- end
- if done == false then
- v[#v + 1] = player_color_previous
- end
- end
- end
- notebook = ''
- for k, v in pairs(visitedRooms) do
- if v[2] ~= nil then
- for j in pairs(v) do
- ending = ''
- color = ''
- if v[j] == 'White' then
- color = '[ffffff]'
- elseif v[j] == 'Red' then
- color = '[DA1918]'
- elseif v[j] == 'Orange' then
- color = '[F4641D]'
- elseif v[j] == 'Green' then
- color = '[31B22B]'
- elseif v[j] == 'Blue' then
- color = '[1E87FF]'
- elseif v[j] == 'Purple' then
- color = '[A027F0]'
- elseif v[j] ~= '' then
- color = '[00ccff]'
- ending = ': '
- end
- notebook = notebook .. color .. v[j] .. ending .. '[ffffff] '
- end
- notebook = notebook .. '\n'
- end
- end
- if notebook ~= '' then
- notebook = 'Visited Stat Rooms:\n-----------------------\n\n' .. notebook .. '\n-----------------------'
- setNotes(notebook)
- end
- end
- function startHaunt()
- if currentOmenTile ~= "nil" and currentOmenCard ~= "nil" then
- printToAll("-------------------------------", {1,1,1})
- printToAll(" ", {1,1,1})
- printToAll("The Haunt is...", {1,1,1})
- colorText = {0.7, 0, 0}
- traitor = nil
- cardNumber = 1
- roomNumber = 1
- while cards[cardNumber] ~= currentOmenCard.getName() do
- cardNumber = cardNumber + 1
- end
- while rooms[roomNumber] ~= currentOmenTile.getName() do
- roomNumber = roomNumber + 1
- end
- local haunt_highlight_room = {click_function = "derp", label = "", position = {0,0.1,-0.775 + ((roomNumber - 1) * 0.0425)}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 12000, height = 200}
- checker.createButton(haunt_highlight_room)
- local highlight_buttons = {}
- highlight_buttons[1] = {click_function = "derp", label = "", position = {-0.935,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 400, height = 4000}
- highlight_buttons[2] = {click_function = "derp", label = "", position = {-0.815,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 700, height = 4000}
- highlight_buttons[3] = {click_function = "derp", label = "", position = {-0.69,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 400, height = 4000}
- highlight_buttons[4] = {click_function = "derp", label = "", position = {-0.6,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 400, height = 4000}
- highlight_buttons[5] = {click_function = "derp", label = "", position = {-0.515,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 400, height = 4000}
- highlight_buttons[6] = {click_function = "derp", label = "", position = {-0.418,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 500, height = 4000}
- highlight_buttons[7] = {click_function = "derp", label = "", position = {-0.32,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 400, height = 4000}
- highlight_buttons[8] = {click_function = "derp", label = "", position = {-0.24,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 350, height = 4000}
- highlight_buttons[9] = {click_function = "derp", label = "", position = {-0.143,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 500, height = 4000}
- highlight_buttons[10] = {click_function = "derp", label = "", position = {-0.035,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 440, height = 4000}
- highlight_buttons[11] = {click_function = "derp", label = "", position = {0.07,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 500, height = 4000}
- highlight_buttons[12] = {click_function = "derp", label = "", position = {0.193,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 600, height = 4000}
- highlight_buttons[13] = {click_function = "derp", label = "", position = {0.305,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 450, height = 4000}
- highlight_buttons[14] = {click_function = "derp", label = "", position = {0.427,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 650, height = 4000}
- highlight_buttons[15] = {click_function = "derp", label = "", position = {0.582,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 700, height = 4000}
- highlight_buttons[16] = {click_function = "derp", label = "", position = {0.707,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 400, height = 4000}
- highlight_buttons[17] = {click_function = "derp", label = "", position = {0.799,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 400, height = 4000}
- highlight_buttons[18] = {click_function = "derp", label = "", position = {0.89,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 400, height = 4000}
- highlight_buttons[19] = {click_function = "derp", label = "", position = {0.989,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 450, height = 4000}
- highlight_buttons[20] = {click_function = "derp", label = "", position = {1.1,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 550, height = 4000}
- highlight_buttons[21] = {click_function = "derp", label = "", position = {1.202,0.1,-0.445}, color = {1,1,1,0.5}, scale = {0.1,1,0.1}, width = 400, height = 4000}
- checker.createButton(highlight_buttons[cardNumber])
- hauntNumber = haunts[roomNumber][cardNumber]
- if hauntNumber <= 50 then
- if hauntNumber == 1 then
- printToAll("The Mummy Walks - 1", colorText)
- --tratiorDeck.takeObject({tag = "Haunt 1"})
- --survivorDeck.takeObject({index = 1})
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 2 then
- printToAll("The Seance - 2", colorText)
- --tratiorDeck.takeObject({index = '7c6b2c'})
- --survivorDeck.takeObject({index = 3})
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 3 then
- printToAll("Frog-Leg Stew - 3", colorText)
- --tratiorDeck.takeObject({index = 'e9f097'})
- --survivorDeck.takeObject({index = 4})
- traitor = checkStats(currentPlayer, 'knowledgeStat', true, false)
- end
- if hauntNumber == 4 then
- printToAll("The Web of Destiny - 4", colorText)
- --tratiorDeck.takeObject({index = '8526b7'})
- --survivorDeck.takeObject({index =5})
- traitor = checkStats(currentPlayer, 'mightStat', false, false)
- end
- if hauntNumber == 5 then
- printToAll("I Was a Teenage Lycanthrope - 5", colorText)
- --tratiorDeck.takeObject({index = 'e8f574'})
- --survivorDeck.takeObject({index = 6})
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 6 then
- printToAll("The Floating Eye - 6", colorText)
- --tratiorDeck.takeObject({index = '5bc157'})
- --survivorDeck.takeObject({index = 7})
- traitor = checkStats(currentPlayer, 'sanityStat', true, true)
- end
- if hauntNumber == 7 then
- printToAll("Carnivorous Ivy - 7", colorText)
- --tratiorDeck.takeObject({index = 'c90a6f'})
- --survivorDeck.takeObject({index = 8})
- if getObjectFromGUID('327a8c') ~= nil and Player.White.seated then
- traitor = getObjectFromGUID('327a8c')
- else
- traitor = checkStats(currentPlayer, 'sanityStat', false, true)
- end
- end
- if hauntNumber == 8 then
- printToAll("Wall of the Banshee - 8", colorText)
- --tratiorDeck.takeObject({index = '581c1e'})
- --survivorDeck.takeObject({index = 9})
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 9 then
- printToAll("The Dance of Death - 9", colorText)
- --tratiorDeck.takeObject({index = '9badba'})
- --survivorDeck.takeObject({index = 10})
- printToAll("There is no traitor..." , {0, 1, 200})
- printToAll("yet", {1,0,0})
- end
- if hauntNumber == 10 then
- printToAll("Family Gathering - 10", colorText)
- --tratiorDeck.takeObject({index = '05ac91'})
- --survivorDeck.takeObject({index = 11})
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 11 then
- printToAll("Let Them In - 11", colorText)
- --tratiorDeck.takeObject({index = '44243f'})
- --survivorDeck.takeObject({index = 12})
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 12 then
- printToAll("Fleshwalkers - 12", colorText)
- --survivorDeck.takeObject({index = 13})
- printToAll("There is no traitor", {0, 1, 200})
- end
- if hauntNumber == 13 then
- printToAll("Perchance to Dream - 13", colorText)
- --tratiorDeck.takeObject({index = '486de5'})
- --survivorDeck.takeObject({index = 14})
- traitor = checkStats(currentPlayer, 'sanityStat', true, false)
- end
- if hauntNumber == 14 then
- printToAll("The Stars Are Right - 14", colorText)
- --tratiorDeck.takeObject({index = '379778'})
- --survivorDeck.takeObject({index = 15})
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 15 then
- printToAll("Here There Be Dragons - 15", colorText)
- --tratiorDeck.takeObject({index = '192886'})
- --survivorDeck.takeObject({index = 16})
- traitor = checkStats(currentPlayer, 'speedStat', true, false)
- end
- if hauntNumber == 16 then
- printToAll("The Phantom's Embrace - 16", colorText)
- --tratiorDeck.takeObject({index = 'ab97b3'})
- --survivorDeck.takeObject({index = 17})
- traitor = getNextPlayer()
- end
- if hauntNumber == 17 then
- printToAll("A Breath of Wind - 17", colorText)
- --tratiorDeck.takeObject({index = 'dcaf53'})
- --survivorDeck.takeObject({index = 18})
- traitor = getNextPlayer()
- end
- if hauntNumber == 18 then
- printToAll("United We Stand - 18", colorText)
- --tratiorDeck.takeObject({index = '62e869'})
- --survivorDeck.takeObject({index = 19})
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 19 then
- printToAll("A Friend for the Ages - 19", colorText)
- --tratiorDeck.takeObject({index = '420aec'})
- --survivorDeck.takeObject({index = 20})
- traitor = getNextPlayer()
- end
- if hauntNumber == 20 then
- printToAll("Ghost Bride - 20", colorText)
- --tratiorDeck.takeObject({index = '015c71'})
- --survivorDeck.takeObject({index = 21})
- if getObjectFromGUID('84dd50') ~= nil and Player.Blue.seated then
- traitor = getObjectFromGUID('84dd50')
- else
- traitor = getNextPlayer()
- end
- end
- if hauntNumber == 21 then
- printToAll("House of the Living Dead - 21", colorText)
- --tratiorDeck.takeObject({index = 'dac4e9'})
- --survivorDeck.takeObject({index = 22})
- if Player.White.seated and currentPlayer ~= "White" then
- traitor = getCurrentPlayerObject("White")
- elseif Player.Blue.seated and currentPlayer ~= "Blue" then
- traitor = getCurrentPlayerObject("Blue")
- elseif Player.Red.seated and getObjectFromGUID('3878fc') ~= nil and currentPlayer ~= "Red" then
- traitor = getCurrentPlayerObject("Red")
- elseif Player.Purple.seated and getObjectFromGUID('732231') ~= nil and currentPlayer ~= "Purple" then
- traitor = getCurrentPlayerObject("Purple")
- elseif Player.Red.seated and getObjectFromGUID('f8116a') ~= nil and currentPlayer ~= "Red" then
- traitor = getCurrentPlayerObject("Red")
- elseif Player.Purple.seated and getObjectFromGUID('926f41') ~= nil and currentPlayer ~= "Purple" then
- traitor = getCurrentPlayerObject("Purple")
- elseif Player.Green.seated and currentPlayer ~= "Green" then
- traitor = getCurrentPlayerObject("Green")
- elseif Player.Orange.seated and currentPlayer ~= "Orange" then
- traitor = getCurrentPlayerObject("Orange")
- end
- end
- if hauntNumber == 22 then
- printToAll("The Abyss Gazes Back - 22", colorText)
- --tratiorDeck.takeObject({index = '6a6d20'})
- --survivorDeck.takeObject({index = 23})
- traitor = getNextPlayer()
- end
- if hauntNumber == 23 then
- printToAll("Tentacled Horrow - 23", colorText)
- --tratiorDeck.takeObject({index = '2948f2'})
- --survivorDeck.takeObject({index = 24})
- traitor = getNextPlayer()
- end
- if hauntNumber == 24 then
- printToAll("Fly Away Home - 24", colorText)
- --tratiorDeck.takeObject({index = 'f8b141'})
- --survivorDeck.takeObject({index = 25})
- if getObjectFromGUID('a540a9') ~= nil and Player.Green.seated then
- traitor = getObjectFromGUID('a540a9')
- else
- traitor = checkStats(currentPlayer, 'speedStat', true, true)
- end
- end
- if hauntNumber == 25 then
- printToAll("Voodoo - 25", colorText)
- --tratiorDeck.takeObject({index = 'ccee58'})
- --survivorDeck.takeObject({index = 26})
- if getObjectFromGUID('10c2e2') ~= nil and Player.Orange.seated then
- traitor = getObjectFromGUID('10c2e2')
- else
- traitor = checkStats(currentPlayer, 'knowledgeStat', false, true)
- end
- end
- if hauntNumber == 26 then
- printToAll("Pay the Piper - 26", colorText)
- --tratiorDeck.takeObject({index = '1dfc40'})
- --survivorDeck.takeObject({index = 27})
- traitor = getNextPlayer()
- end
- if hauntNumber == 27 then
- printToAll("Amok Flesh - 27", colorText)
- --tratiorDeck.takeObject({index = '00cb74'})
- --survivorDeck.takeObject({index = 28})
- traitor = checkStats(currentPlayer, 'knowledgeStat', true, false)
- end
- if hauntNumber == 28 then
- printToAll("Ring of King Solomon - 28", colorText)
- --tratiorDeck.takeObject({index = 'abcc3e'})
- --survivorDeck.takeObject({index = 29})
- traitor = checkStats(currentPlayer, 'knowledgeStat', true, false)
- end
- if hauntNumber == 29 then
- printToAll("Frankenstein's Legacy - 29", colorText)
- --tratiorDeck.takeObject({index = 'db2d78'})
- --survivorDeck.takeObject({index = 30})
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 30 then
- printToAll("Tomb of Dracula - 30", colorText)
- --tratiorDeck.takeObject({index = '80d65c'})
- --survivorDeck.takeObject({index = 31})
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 31 then
- printToAll("Airborne - 31", colorText)
- --survivorDeck.takeObject({index = 32})
- printToAll("There is no traitor", {0, 1, 200})
- end
- if hauntNumber == 32 then
- printToAll("Lost - 32", colorText)
- --tratiorDeck.takeObject({index = 'd8ee33'})
- --survivorDeck.takeObject({index = 33})
- traitor = checkStats(currentPlayer, 'sanityStat', false, true)
- end
- if hauntNumber == 33 then
- printToAll("An Invocation of Darkness - 33", colorText)
- --tratiorDeck.takeObject({index = '9bdec6'})
- --survivorDeck.takeObject({index = 34})
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 34 then
- printToAll("Guillotines - 34", colorText)
- --survivorDeck.takeObject({index = 35, position = {28, 0.1, 18}})
- --survivorDeck.takeObject({index = 36, position = {37, 0.1, 18}})
- printToAll("The traitor is hidden...", {1, 1, 0})
- randomNum = math.random(1, 6)
- if randomNum == 1 then
- if Player.White.seated then
- printToColor("You are the traitor", "White", {1, 0, 0})
- elseif Player.Red.seated then
- printToColor("You are the traitor", "Red", {1, 0, 0})
- elseif Player.Orange.seated then
- printToColor("You are the traitor", "Orange", {1, 0, 0})
- elseif Player.Green.seated then
- printToColor("You are the traitor", "Green", {1, 0, 0})
- elseif Player.Blue.seated then
- printToColor("You are the traitor", "Blue", {1, 0, 0})
- elseif Player.Purple.seated then
- printToColor("You are the traitor", "Purple", {1, 0, 0})
- end
- elseif randomNum == 2 then
- if Player.Red.seated then
- printToColor("You are the traitor", "Red", {1, 0, 0})
- elseif Player.Orange.seated then
- printToColor("You are the traitor", "Orange", {1, 0, 0})
- elseif Player.Green.seated then
- printToColor("You are the traitor", "Green", {1, 0, 0})
- elseif Player.Blue.seated then
- printToColor("You are the traitor", "Blue", {1, 0, 0})
- elseif Player.Purple.seated then
- printToColor("You are the traitor", "Purple", {1, 0, 0})
- elseif Player.White.seated then
- printToColor("You are the traitor", "White", {1, 0, 0})
- end
- elseif randomNum == 3 then
- if Player.Orange.seated then
- printToColor("You are the traitor", "Orange", {1, 0, 0})
- elseif Player.Green.seated then
- printToColor("You are the traitor", "Green", {1, 0, 0})
- elseif Player.Blue.seated then
- printToColor("You are the traitor", "Blue", {1, 0, 0})
- elseif Player.Purple.seated then
- printToColor("You are the traitor", "Purple", {1, 0, 0})
- elseif Player.White.seated then
- printToColor("You are the traitor", "White", {1, 0, 0})
- elseif Player.Red.seated then
- printToColor("You are the traitor", "Red", {1, 0, 0})
- end
- elseif randomNum == 4 then
- if Player.Green.seated then
- printToColor("You are the traitor", "Green", {1, 0, 0})
- elseif Player.Blue.seated then
- printToColor("You are the traitor", "Blue", {1, 0, 0})
- elseif Player.Purple.seated then
- printToColor("You are the traitor", "Purple", {1, 0, 0})
- elseif Player.White.seated then
- printToColor("You are the traitor", "White", {1, 0, 0})
- elseif Player.Red.seated then
- printToColor("You are the traitor", "Red", {1, 0, 0})
- elseif Player.Orange.seated then
- printToColor("You are the traitor", "Orange", {1, 0, 0})
- end
- elseif randomNum == 5 then
- if Player.Blue.seated then
- printToColor("You are the traitor", "Blue", {1, 0, 0})
- elseif Player.Purple.seated then
- printToColor("You are the traitor", "Purple", {1, 0, 0})
- elseif Player.White.seated then
- printToColor("You are the traitor", "White", {1, 0, 0})
- elseif Player.Red.seated then
- printToColor("You are the traitor", "Red", {1, 0, 0})
- elseif Player.Orange.seated then
- printToColor("You are the traitor", "Orange", {1, 0, 0})
- elseif Player.Green.seated then
- printToColor("You are the traitor", "Green", {1, 0, 0})
- end
- elseif randomNum == 6 then
- if Player.Purple.seated then
- printToColor("You are the traitor", "Purple", {1, 0, 0})
- elseif Player.White.seated then
- printToColor("You are the traitor", "White", {1, 0, 0})
- elseif Player.Red.seated then
- printToColor("You are the traitor", "Red", {1, 0, 0})
- elseif Player.Orange.seated then
- printToColor("You are the traitor", "Orange", {1, 0, 0})
- elseif Player.Green.seated then
- printToColor("You are the traitor", "Green", {1, 0, 0})
- elseif Player.Blue.seated then
- printToColor("You are the traitor", "Blue", {1, 0, 0})
- end
- end
- end
- if hauntNumber == 35 then
- printToAll("Small Change - 35", colorText)
- --tratiorDeck.takeObject({index = '91246a'})
- --survivorDeck.takeObject({index = 37})
- traitor = checkStats(currentPlayer, 'knowledgeStat', false, true)
- end
- if hauntNumber == 36 then
- printToAll("Better with Friends - 36", colorText)
- --tratiorDeck.takeObject({index = '9a6b32'})
- --survivorDeck.takeObject({index = 38})
- if getObjectFromGUID('0c0d43') ~= nil and Player.Orange.seated then
- traitor = getObjectFromGUID('0c0d43')
- else
- traitor = checkStats(currentPlayer, 'speedStat', false, true)
- end
- end
- if hauntNumber == 37 then
- printToAll("Checkmate - 37", colorText)
- --tratiorDeck.takeObject({index = '87b1d6'})
- --survivorDeck.takeObject({index = 39})
- traitor = checkStats(currentPlayer, 'mightStat', true, true)
- end
- if hauntNumber == 38 then
- printToAll("Hellbeasts - 38", colorText)
- --tratiorDeck.takeObject({name = 'Haunt 38', position = {0, 0, 0}})
- --survivorDeck.takeObject({index = 39})
- traitor = checkStats(currentPlayer, 'knowledgeStat', true, false)
- end
- if hauntNumber == 39 then
- printToAll("The Heir - 39", colorText)
- --tratiorDeck.takeObject({index = 'ac5e47'})
- --survivorDeck.takeObject({index = '2b678b'})
- traitor = checkStats(currentPlayer, 'speedStat', false, false)
- end
- if hauntNumber == 40 then
- printToAll("Buried Alive - 40", colorText)
- --tratiorDeck.takeObject({index = '5efeb2'})
- --survivorDeck.takeObject({index = '2515a6'})
- traitor = getNextPlayer()
- end
- if hauntNumber == 41 then
- printToAll("Invisible Traitor - 41", colorText)
- --tratiorDeck.takeObject({index = '105624'})
- --survivorDeck.takeObject({index = '6429fd'})
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 42 then
- printToAll("Comes the Hero - 42", colorText)
- --tratiorDeck.takeObject({index = 'bd7576'})
- --survivorDeck.takeObject({index = '75a69b'})
- traitor = checkStats(currentPlayer, 'mightStat', true, true)
- end
- if hauntNumber == 43 then
- printToAll("The Star-Sickness - 43", colorText)
- --survivorDeck.takeObject({index = '81012c', position = {28, 0.1, 18}})
- --survivorDeck.takeObject({index = 'ba1b93', position = {37, 0.1, 18}})
- printToAll("The traitor is hidden...", {1, 1, 0})
- randomNum = math.random(1, 6)
- if randomNum == 1 then
- if Player.White.seated then
- printToColor("You are the traitor", "White", {1, 0, 0})
- elseif Player.Red.seated then
- printToColor("You are the traitor", "Red", {1, 0, 0})
- elseif Player.Orange.seated then
- printToColor("You are the traitor", "Orange", {1, 0, 0})
- elseif Player.Green.seated then
- printToColor("You are the traitor", "Green", {1, 0, 0})
- elseif Player.Blue.seated then
- printToColor("You are the traitor", "Blue", {1, 0, 0})
- elseif Player.Purple.seated then
- printToColor("You are the traitor", "Purple", {1, 0, 0})
- end
- elseif randomNum == 2 then
- if Player.Red.seated then
- printToColor("You are the traitor", "Red", {1, 0, 0})
- elseif Player.Orange.seated then
- printToColor("You are the traitor", "Orange", {1, 0, 0})
- elseif Player.Green.seated then
- printToColor("You are the traitor", "Green", {1, 0, 0})
- elseif Player.Blue.seated then
- printToColor("You are the traitor", "Blue", {1, 0, 0})
- elseif Player.Purple.seated then
- printToColor("You are the traitor", "Purple", {1, 0, 0})
- elseif Player.White.seated then
- printToColor("You are the traitor", "White", {1, 0, 0})
- end
- elseif randomNum == 3 then
- if Player.Orange.seated then
- printToColor("You are the traitor", "Orange", {1, 0, 0})
- elseif Player.Green.seated then
- printToColor("You are the traitor", "Green", {1, 0, 0})
- elseif Player.Blue.seated then
- printToColor("You are the traitor", "Blue", {1, 0, 0})
- elseif Player.Purple.seated then
- printToColor("You are the traitor", "Purple", {1, 0, 0})
- elseif Player.White.seated then
- printToColor("You are the traitor", "White", {1, 0, 0})
- elseif Player.Red.seated then
- printToColor("You are the traitor", "Red", {1, 0, 0})
- end
- elseif randomNum == 4 then
- if Player.Green.seated then
- printToColor("You are the traitor", "Green", {1, 0, 0})
- elseif Player.Blue.seated then
- printToColor("You are the traitor", "Blue", {1, 0, 0})
- elseif Player.Purple.seated then
- printToColor("You are the traitor", "Purple", {1, 0, 0})
- elseif Player.White.seated then
- printToColor("You are the traitor", "White", {1, 0, 0})
- elseif Player.Red.seated then
- printToColor("You are the traitor", "Red", {1, 0, 0})
- elseif Player.Orange.seated then
- printToColor("You are the traitor", "Orange", {1, 0, 0})
- end
- elseif randomNum == 5 then
- if Player.Blue.seated then
- printToColor("You are the traitor", "Blue", {1, 0, 0})
- elseif Player.Purple.seated then
- printToColor("You are the traitor", "Purple", {1, 0, 0})
- elseif Player.White.seated then
- printToColor("You are the traitor", "White", {1, 0, 0})
- elseif Player.Red.seated then
- printToColor("You are the traitor", "Red", {1, 0, 0})
- elseif Player.Orange.seated then
- printToColor("You are the traitor", "Orange", {1, 0, 0})
- elseif Player.Green.seated then
- printToColor("You are the traitor", "Green", {1, 0, 0})
- end
- elseif randomNum == 6 then
- if Player.Purple.seated then
- printToColor("You are the traitor", "Purple", {1, 0, 0})
- elseif Player.White.seated then
- printToColor("You are the traitor", "White", {1, 0, 0})
- elseif Player.Red.seated then
- printToColor("You are the traitor", "Red", {1, 0, 0})
- elseif Player.Orange.seated then
- printToColor("You are the traitor", "Orange", {1, 0, 0})
- elseif Player.Green.seated then
- printToColor("You are the traitor", "Green", {1, 0, 0})
- elseif Player.Blue.seated then
- printToColor("You are the traitor", "Blue", {1, 0, 0})
- end
- end
- end
- if hauntNumber == 44 then
- printToAll("Death Doth Find Us All - 44", colorText)
- --tratiorDeck.takeObject({index = 'c5e8da'})
- --survivorDeck.takeObject({index = 'c06a1c'})
- if Player.White.seated and currentPlayer ~= "White" then
- traitor = getCurrentPlayerObject("White")
- end
- if Player.Blue.seated and currentPlayer ~= "Blue" then
- traitor = getCurrentPlayerObject("Blue")
- end
- if Player.Red.seated and getObjectFromGUID('3878fc') ~= nil and currentPlayer ~= "Red" then
- traitor = getCurrentPlayerObject("Red")
- end
- if Player.Purple.seated and getObjectFromGUID('732231') ~= nil and currentPlayer ~= "Purple" then
- traitor = getCurrentPlayerObject("Purple")
- end
- if Player.Red.seated and getObjectFromGUID('f8116a') ~= nil and currentPlayer ~= "Red" then
- traitor = getCurrentPlayerObject("Red")
- end
- if Player.Purple.seated and getObjectFromGUID('926f41') ~= nil and currentPlayer ~= "Purple" then
- traitor = getCurrentPlayerObject("Purple")
- end
- if Player.Green.seated and currentPlayer ~= "Green" then
- traitor = getCurrentPlayerObject("Green")
- end
- if Player.Orange.seated and currentPlayer ~= "Orange" then
- traitor = getCurrentPlayerObject("Orange")
- end
- end
- if hauntNumber == 45 then
- printToAll("Tick, Tick, Tick - 45", colorText)
- --tratiorDeck.takeObject({index = '22d3e6'})
- --survivorDeck.takeObject({index = 'd52e4a'})
- traitor = checkStats(currentPlayer, 'knowledgeStat', false, true)
- end
- if hauntNumber == 46 then
- printToAll("The Feast - 46", colorText)
- --tratiorDeck.takeObject({index = 'b6d561'})
- --survivorDeck.takeObject({index = 'ad4f7d'})
- if getObjectFromGUID('5a4152') ~= nil and Player.Blue.seated then
- traitor = getObjectFromGUID('5a4152')
- else
- traitor = checkStats(currentPlayer, 'speedStat', true, true)
- end
- end
- if hauntNumber == 47 then
- printToAll("Wor Ouroboros - 47", colorText)
- --tratiorDeck.takeObject({index = '724380'})
- --survivorDeck.takeObject({index = '6c833f'})
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 48 then
- printToAll("Stacked Like Cordwood - 48", colorText)
- --tratiorDeck.takeObject({index = '1b46a2'})
- --survivorDeck.takeObject({index = '914c54'})
- traitor = getNextPlayer()
- end
- if hauntNumber == 49 then
- printToAll("You Wear It Well - 49", colorText)
- --tratiorDeck.takeObject({index = '72ea23'})
- --survivorDeck.takeObject({index = 'dcf572'})
- if getObjectFromGUID('926f41') ~= nil and Player.Purple.seated then
- traitor = getObjectFromGUID('926f41')
- else
- traitor = checkStats(currentPlayer, 'speedStat', true, true)
- end
- end
- if hauntNumber == 50 then
- printToAll("Treasure Hunt - 50", colorText)
- --survivorDeck.takeObject({index = 'aa774c', position = {28, 0.1, 18}})
- --survivorDeck.takeObject({index = '03e9bb', position = {37, 0.1, 18}})
- printToAll("There is no traitor", {0, 1, 200})
- end
- end
- reverseTratior = nil;
- if hauntNumber == 51 then
- printToAll("Director's Cut - 51", colorText)
- reverseTratior = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 52 then
- printToAll("Prism - 52", colorText)
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 53 then
- printToAll("Till Morning Light - 53", colorText)
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 54 then
- printToAll("Monster Mash - 54", colorText)
- traitor = checkStats(currentPlayer, 'knowledgeStat', false, true)
- end
- if hauntNumber == 55 then
- printToAll("She is Not Amused - 55", colorText)
- if currentPlayer == "White" or currentPlayer == "Red" or currentPlayer == "Orange" then
- if Player.Purple.seated then
- traitor = getCurrentPlayerObject("Purple")
- elseif Player.Blue.seated then
- traitor = getCurrentPlayerObject("Blue")
- elseif Player.Orange.seated then
- traitor = getCurrentPlayerObject("Orange")
- else
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- elseif currentPlayer == "Blue" or currentPlayer == "Green" then
- if Player.Orange.seated then
- traitor = getCurrentPlayerObject("Orange")
- elseif Player.Purple.seated then
- traitor = getCurrentPlayerObject("Purple")
- elseif Player.Blue.seated then
- traitor = getCurrentPlayerObject("Blue")
- else
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- elseif currentPlayer == "Purple" then
- if Player.Blue.seated then
- traitor = getCurrentPlayerObject("Blue")
- elseif Player.Orange.seated then
- traitor = getCurrentPlayerObject("Orange")
- elseif Player.Purple.seated then
- traitor = getCurrentPlayerObject("Purple")
- else
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- end
- end
- if hauntNumber == 56 then
- printToAll("Make America Disintegrate - 56", colorText)
- count = {whiteOmen + whiteItem,redOmen + redItem,orangeOmen + orangeItem,greenOmen + greenItem,blueOmen + blueItem,purpleOmen + purpleItem}
- biggest = count[1]
- for counts = 1, 6 do
- if biggest < count[counts] then
- biggest = count[counts]
- end
- end
- if currentPlayer == "White" and biggest == count[1] then
- traitor = getCurrentPlayerObject("White")
- elseif currentPlayer == "Red" and biggest == count[2] then
- traitor = getCurrentPlayerObject("Red")
- elseif currentPlayer == "Orange" and biggest == count[3] then
- traitor = getCurrentPlayerObject("Orange")
- elseif currentPlayer == "Green" and biggest == count[4] then
- traitor = getCurrentPlayerObject("Green")
- elseif currentPlayer == "Blue" and biggest == count[5] then
- traitor = getCurrentPlayerObject("Blue")
- elseif currentPlayer == "Purple" and biggest == count[6] then
- traitor = getCurrentPlayerObject("Purple")
- end
- if biggest == count[1] then
- traitor = getCurrentPlayerObject("White")
- elseif biggest == count[2] then
- traitor = getCurrentPlayerObject("Red")
- elseif biggest == count[3] then
- traitor = getCurrentPlayerObject("Orange")
- elseif biggest == count[4] then
- traitor = getCurrentPlayerObject("Green")
- elseif biggest == count[5] then
- traitor = getCurrentPlayerObject("Blue")
- elseif biggest == count[6] then
- traitor = getCurrentPlayerObject("Purple")
- end
- end
- if hauntNumber == 57 then
- printToAll("The Gathering Storm - 57", colorText)
- printToAll("There is no traitor", {0, 1, 200})
- end
- if hauntNumber == 58 then
- printToAll("Olly Olly Oxen Free - 58", colorText)
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 59 then
- printToAll("The Fleshchild's Alchemical Mandate - 59", colorText)
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 60 then
- printToAll("Cat O'Clock - 60", colorText)
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 61 then
- printToAll("Captain Sting's Revenge - 61", colorText)
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 62 then
- printToAll("Rosencrantz and All of You are Dead - 62", colorText)
- if getObjectFromGUID('f8116a') ~= nil and Player.Red.seated then
- traitor = getObjectFromGUID('f8116a')
- else
- traitor = checkStats(currentPlayer, 'knowledgeStat', false, true)
- end
- end
- if hauntNumber == 63 then
- printToAll("Shush - 63", colorText)
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 64 then
- printToAll("Chairman of the Board - 64", colorText)
- reverseTratior = checkStats(currentPlayer, 'knowledgeStat', false, true)
- end
- if hauntNumber == 65 then
- printToAll("Sushi Night - 65", colorText)
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 66 then
- printToAll("The Cardinal Sins - 66", colorText)
- if Player.White.seated then
- traitor = getCurrentPlayerObject("White")
- elseif Player.Red.seated then
- traitor = getCurrentPlayerObject("Red")
- elseif Player.Green.seated then
- traitor = getCurrentPlayerObject("Green")
- elseif Player.Blue.seated then
- traitor = getCurrentPlayerObject("Blue")
- elseif Player.Purple.seated then
- traitor = getCurrentPlayerObject("Purple")
- elseif Player.Orange.seated then
- traitor = getCurrentPlayerObject("Orange")
- end
- end
- if hauntNumber == 67 then
- printToAll("Murderball - 67", colorText)
- if getObjectFromGUID('050ff1') ~= nil and Player.Green.seated then
- traitor = getObjectFromGUID('050ff1')
- else
- traitor = checkStats(currentPlayer, 'speedStat', false, true)
- end
- end
- if hauntNumber == 68 then
- printToAll("He Who Must Not Be Read - 68", colorText)
- if getObjectFromGUID('732231') ~= nil and Player.Purple.seated then
- traitor = getObjectFromGUID('732231')
- else
- traitor = checkStats(currentPlayer, 'knowledgeStat', false, true)
- end
- end
- if hauntNumber == 69 then
- printToAll("No Noose is Good News - 69", colorText)
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 70 then
- printToAll("To Reach the Cosmos - 70", colorText)
- if Player.White.seated then
- traitor = getCurrentPlayerObject("White")
- elseif Player.Blue.seated then
- traitor = getCurrentPlayerObject("Blue")
- elseif Player.Red.seated and getObjectFromGUID('3878fc') ~= nil then
- traitor = getCurrentPlayerObject("Red")
- elseif Player.Purple.seated and getObjectFromGUID('732231') ~= nil then
- traitor = getCurrentPlayerObject("Purple")
- elseif Player.Red.seated then
- traitor = getCurrentPlayerObject("Red")
- elseif Player.Purple.seated then
- traitor = getCurrentPlayerObject("Purple")
- elseif Player.Green.seated then
- traitor = getCurrentPlayerObject("Green")
- elseif Player.Orange.seated then
- traitor = getCurrentPlayerObject("Orange")
- end
- end
- if hauntNumber == 71 then
- printToAll("The Other Side - 71", colorText)
- traitor = getNextPlayer()
- end
- if hauntNumber == 72 then
- printToAll("Man's Worst Enemy - 72", colorText)
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 73 then
- printToAll("Existence Precedes Essence - 73", colorText)
- if getObjectFromGUID('3878fc') ~= nil and Player.Red.seated then
- traitor = getObjectFromGUID('3878fc')
- else
- traitor = checkStats(currentPlayer, 'mightStat', false, true)
- end
- end
- if hauntNumber == 74 then
- printToAll("Coulrophobia - 74", colorText)
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 75 then
- printToAll("Let It Glow - 75", colorText)
- traitor = getNextPlayer()
- end
- if hauntNumber == 76 then
- printToAll("Back to the Past - 76", colorText)
- if Player.White.seated then
- traitor = getCurrentPlayerObject("White")
- elseif Player.Blue.seated then
- traitor = getCurrentPlayerObject("Blue")
- elseif Player.Red.seated and getObjectFromGUID('3878fc') ~= nil then
- traitor = getCurrentPlayerObject("Red")
- elseif Player.Purple.seated and getObjectFromGUID('732231') ~= nil then
- traitor = getCurrentPlayerObject("Purple")
- elseif Player.Red.seated then
- traitor = getCurrentPlayerObject("Red")
- elseif Player.Purple.seated then
- traitor = getCurrentPlayerObject("Purple")
- elseif Player.Green.seated then
- traitor = getCurrentPlayerObject("Green")
- elseif Player.Orange.seated then
- traitor = getCurrentPlayerObject("Orange")
- end
- end
- if hauntNumber == 77 then
- printToAll("They're Always After Me - 77", colorText)
- if getObjectFromGUID('e35e15') ~= nil and Player.White.seated then
- traitor = getObjectFromGUID('e35e15')
- else
- traitor = checkStats(currentPlayer, 'speedStat', false, true)
- end
- end
- if hauntNumber == 78 then
- printToAll("The Devil's Name - 78", colorText)
- traitor = checkStats(currentPlayer, 'sanityStat', true, false)
- end
- secondTraitor = nil
- if hauntNumber == 79 then
- printToAll("The Twins - 79", colorText)
- if currentPlayer == "White" then
- if Player.Purple.seated then
- secondTraitor = getCurrentPlayerObject("Purple")
- elseif Player.Blue.seated then
- secondTraitor = getCurrentPlayerObject("Blue")
- elseif Player.Green.seated then
- secondTraitor = getCurrentPlayerObject("Green")
- elseif Player.Orange.seated then
- secondTraitor = getCurrentPlayerObject("Orange")
- elseif Player.Red.seated then
- secondTraitor = getCurrentPlayerObject("Red")
- end
- elseif currentPlayer == "Red" then
- if Player.White.seated then
- secondTraitor = getCurrentPlayerObject("White")
- elseif Player.Purple.seated then
- secondTraitor = getCurrentPlayerObject("Purple")
- elseif Player.Blue.seated then
- secondTraitor = getCurrentPlayerObject("Blue")
- elseif Player.Green.seated then
- secondTraitor = getCurrentPlayerObject("Green")
- elseif Player.Orange.seated then
- secondTraitor = getCurrentPlayerObject("Orange")
- end
- elseif currentPlayer == "Orange" then
- if Player.Red.seated then
- secondTraitor = getCurrentPlayerObject("Red")
- elseif Player.White.seated then
- secondTraitor = getCurrentPlayerObject("White")
- elseif Player.Purple.seated then
- secondTraitor = getCurrentPlayerObject("Purple")
- elseif Player.Blue.seated then
- secondTraitor = getCurrentPlayerObject("Blue")
- elseif Player.Green.seated then
- secondTraitor = getCurrentPlayerObject("Green")
- end
- elseif currentPlayer == "Green" then
- if Player.Orange.seated then
- secondTraitor = getCurrentPlayerObject("Orange")
- elseif Player.Red.seated then
- secondTraitor = getCurrentPlayerObject("Red")
- elseif Player.White.seated then
- secondTraitor = getCurrentPlayerObject("White")
- elseif Player.Purple.seated then
- secondTraitor = getCurrentPlayerObject("Purple")
- elseif Player.Blue.seated then
- secondTraitor = getCurrentPlayerObject("Blue")
- end
- elseif currentPlayer == "Blue" then
- if Player.Green.seated then
- secondTraitor = getCurrentPlayerObject("Green")
- elseif Player.Orange.seated then
- secondTraitor = getCurrentPlayerObject("Orange")
- elseif Player.Red.seated then
- secondTraitor = getCurrentPlayerObject("Red")
- elseif Player.White.seated then
- secondTraitor = getCurrentPlayerObject("White")
- elseif Player.Purple.seated then
- secondTraitor = getCurrentPlayerObject("Purple")
- end
- elseif currentPlayer == "Purple" then
- if Player.Blue.seated then
- secondTraitor = getCurrentPlayerObject("Blue")
- elseif Player.Green.seated then
- secondTraitor = getCurrentPlayerObject("Green")
- elseif Player.Orange.seated then
- secondTraitor = getCurrentPlayerObject("Orange")
- elseif Player.Red.seated then
- secondTraitor = getCurrentPlayerObject("Red")
- elseif Player.White.seated then
- secondTraitor = getCurrentPlayerObject("White")
- end
- end
- traitor = getNextPlayer();
- end
- if hauntNumber == 80 then
- printToAll("I, Mutant - 80", colorText)
- traitor = checkStats(currentPlayer, 'knowledgeStat', false, true)
- end
- if hauntNumber == 81 then
- printToAll("The Canopic Curse - 81", colorText)
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 82 then
- printToAll("Get A Clue - 82", colorText)
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 83 then
- printToAll("In the Details - 83", colorText)
- printToAll("There is no traitor", {0, 1, 200})
- end
- if hauntNumber == 84 then
- printToAll("Forget To Remember - 84", colorText)
- traitor = getNextPlayer()
- end
- if hauntNumber == 85 then
- printToAll("The Murderer In the Machine - 85", colorText)
- traitor = getNextPlayer()
- end
- if hauntNumber == 86 then
- printToAll("The Woods In the Cabin - 86", colorText)
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 87 then
- printToAll("Sibling Rivalry - 87", colorText)
- if Player.White.seated then
- traitor = getCurrentPlayerObject("White")
- end
- if Player.Blue.seated then
- traitor = getCurrentPlayerObject("Blue")
- end
- if Player.Red.seated and getObjectFromGUID('3878fc') ~= nil then
- traitor = getCurrentPlayerObject("Red")
- end
- if Player.Purple.seated and getObjectFromGUID('732231') ~= nil then
- traitor = getCurrentPlayerObject("Purple")
- end
- if Player.Red.seated then
- traitor = getCurrentPlayerObject("Red")
- end
- if Player.Purple.seated then
- traitor = getCurrentPlayerObject("Purple")
- end
- if Player.Green.seated then
- traitor = getCurrentPlayerObject("Green")
- end
- if Player.Orange.seated then
- traitor = getCurrentPlayerObject("Orange")
- end
- end
- if hauntNumber == 88 then
- printToAll("Cry, Babylon! - 88", colorText)
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 89 then
- printToAll("One of the Master's Affair - 89", colorText)
- traitor = checkStats(currentPlayer, 'sanityStat', true, true)
- end
- if hauntNumber == 90 then
- printToAll("Internal Conflict - 90", colorText)
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 91 then
- printToAll("Burn Out the Darkness - 91", colorText)
- traitor = checkStats(currentPlayer, 'sanityStat', true, true)
- end
- if hauntNumber == 92 then
- printToAll("Ghost At the Finish Line - 92", colorText)
- printToAll("There is no traitor", {0, 1, 200})
- end
- if hauntNumber == 93 then
- printToAll("Owl's Moving Castle - 93", colorText)
- traitor = checkStats(currentPlayer, 'knowledgeStat', false, true)
- end
- if hauntNumber == 94 then
- printToAll("Last Will and Tournament - 94", colorText)
- count = {whiteItem,redItem,orangeItem,greenItem,blueItem,purpleItem}
- biggest = count[1]
- for counts = 1, 6 do
- if biggest < count[counts] then
- biggest = count[counts]
- end
- end
- if currentPlayer == "White" and biggest == count[1] then
- traitor = getCurrentPlayerObject("White")
- elseif currentPlayer == "Red" and biggest == count[2] then
- traitor = getCurrentPlayerObject("Red")
- elseif currentPlayer == "Orange" and biggest == count[3] then
- traitor = getCurrentPlayerObject("Orange")
- elseif currentPlayer == "Green" and biggest == count[4] then
- traitor = getCurrentPlayerObject("Green")
- elseif currentPlayer == "Blue" and biggest == count[5] then
- traitor = getCurrentPlayerObject("Blue")
- elseif currentPlayer == "Purple" and biggest == count[6] then
- traitor = getCurrentPlayerObject("Purple")
- end
- if biggest == count[1] then
- traitor = getCurrentPlayerObject("White")
- elseif biggest == count[2] then
- traitor = getCurrentPlayerObject("Red")
- elseif biggest == count[3] then
- traitor = getCurrentPlayerObject("Orange")
- elseif biggest == count[4] then
- traitor = getCurrentPlayerObject("Green")
- elseif biggest == count[5] then
- traitor = getCurrentPlayerObject("Blue")
- elseif biggest == count[6] then
- traitor = getCurrentPlayerObject("Purple")
- end
- end
- if hauntNumber == 95 then
- printToAll("Nanny, Interrupted - 95", colorText)
- if Player.White.seated then
- traitor = getCurrentPlayerObject("White")
- elseif Player.Blue.seated then
- traitor = getCurrentPlayerObject("Blue")
- elseif Player.Red.seated and getObjectFromGUID('3878fc') ~= nil then
- traitor = getCurrentPlayerObject("Red")
- elseif Player.Purple.seated and getObjectFromGUID('732231') ~= nil then
- traitor = getCurrentPlayerObject("Purple")
- elseif Player.Red.seated then
- traitor = getCurrentPlayerObject("Red")
- elseif Player.Purple.seated then
- traitor = getCurrentPlayerObject("Purple")
- elseif Player.Green.seated then
- traitor = getCurrentPlayerObject("Green")
- elseif Player.Orange.seated then
- traitor = getCurrentPlayerObject("Orange")
- end
- end
- if hauntNumber == 96 then
- printToAll("House of Leavings - 96", colorText)
- traitor = getNextPlayer()
- end
- if hauntNumber == 97 then
- printToAll("Lambs to the Slaughter - 97", colorText)
- printToAll("The traitor is unknown... even to themselves...", {0, 1, 200})
- end
- if hauntNumber == 98 then
- printToAll("Plastic Fantastic - 98", colorText)
- traitor = getCurrentPlayerObject(currentPlayer)
- end
- if hauntNumber == 99 then
- printToAll("The Manor of Your Demise - 99", colorText)
- printToAll("There is no traitor", {0, 1, 200})
- end
- if hauntNumber == 100 then
- printToAll("Let's Play a Game - 100", colorText)
- printToAll("There is no traitor", {0, 1, 200})
- end
- if hauntNumber == 101 then
- printToAll("SEASONS OF THE WITCH", colorText)
- printToAll("If all your explorers haven't played haunts 57, 75, 86, and 93, play a different haunt", {0, 115, 0})
- printToAll("Otherwise...", {0, 115, 0})
- printToAll("There is no traitor", {0, 1, 200})
- end
- local players = getSeatedPlayers()
- for i = 1, #players do
- Player[players[i]].team = "Hearts"
- end
- if secondTraitor ~= nil then
- Player[secondTraitor.getVar("color")].team = "Spades"
- local players = getSeatedPlayers()
- if secondTraitor.getVar("color") == "White" then
- printToAll(Player.White.steam_name .. " is the traitor!", {1, 1, 1})
- tratiorZone = whiteTratiorZone
- survivorZone = whiteSurvivorZone
- elseif secondTraitor.getVar("color") == "Red" then
- printToAll(Player.Red.steam_name .. " is the traitor!", {1, 0, 0})
- tratiorZone = redTratiorZone
- survivorZone = redSurvivorZone
- elseif secondTraitor.getVar("color") == "Orange" then
- printToAll(Player.Orange.steam_name .. " is the traitor!", {1, 0.45, 0})
- tratiorZone = orangeTratiorZone
- survivorZone = orangeSurvivorZone
- elseif secondTraitor.getVar("color") == "Green" then
- printToAll(Player.Green.steam_name .. " is the traitor!", {0, 1, 0})
- tratiorZone = greenTratiorZone
- survivorZone = greenSurvivorZone
- elseif secondTraitor.getVar("color") == "Blue" then
- printToAll(Player.Blue.steam_name .. " is the traitor!", {0.15, 0.43, 0.95})
- tratiorZone = blueTratiorZone
- survivorZone = blueSurvivorZone
- elseif secondTraitor.getVar("color") == "Purple" then
- printToAll(Player.Purple.steam_name .. " is the traitor!", {1, 0, 1})
- tratiorZone = purpleTratiorZone
- survivorZone = purpleSurvivorZone
- end
- tratiorZone.setPosition({-33.59, 3.00, 61.81})
- tratiorZone.setRotation({0, 360, 0})
- tratiorZone.setScale({39.81, 5, 21.46})
- survivorZone.setPosition({34.74, 3.00, 62.12})
- survivorZone.setRotation({0, 360, 0})
- survivorZone.setScale({39.81, 5, 21.46})
- end
- if traitor ~= nil then
- Player[traitor.getVar("color")].team = "Spades"
- if traitor.getVar("color") == "White" then
- printToAll(Player.White.steam_name .. " is the traitor!", {1, 1, 1})
- tratiorZone = whiteTratiorZone
- survivorZone = whiteSurvivorZone
- elseif traitor.getVar("color") == "Red" then
- printToAll(Player.Red.steam_name .. " is the traitor!", {1, 0, 0})
- tratiorZone = redTratiorZone
- survivorZone = redSurvivorZone
- elseif traitor.getVar("color") == "Orange" then
- printToAll(Player.Orange.steam_name .. " is the traitor!", {1, 0.45, 0})
- tratiorZone = orangeTratiorZone
- survivorZone = orangeSurvivorZone
- elseif traitor.getVar("color") == "Green" then
- printToAll(Player.Green.steam_name .. " is the traitor!", {0, 1, 0})
- tratiorZone = greenTratiorZone
- survivorZone = greenSurvivorZone
- elseif traitor.getVar("color") == "Blue" then
- printToAll(Player.Blue.steam_name .. " is the traitor!", {0.15, 0.43, 0.95})
- tratiorZone = blueTratiorZone
- survivorZone = blueSurvivorZone
- elseif traitor.getVar("color") == "Purple" then
- printToAll(Player.Purple.steam_name .. " is the traitor!", {1, 0, 1})
- tratiorZone = purpleTratiorZone
- survivorZone = purpleSurvivorZone
- end
- tratiorZone.setPosition({-33.59, 3.00, 61.81})
- tratiorZone.setRotation({0, 360, 0})
- tratiorZone.setScale({39.81, 5, 21.46})
- survivorZone.setPosition({34.74, 3.00, 62.12})
- survivorZone.setRotation({0, 360, 0})
- survivorZone.setScale({39.81, 5, 21.46})
- end
- if reverseTratior ~= nil then
- Player[reverseTratior.getVar("color")].team = "Spades"
- if reverseTratior.getVar("color") == "White" then
- printToAll("Everyone except " .. Player.White.steam_name .. " is the traitor!", {1, 1, 1})
- tratiorZone = whiteTratiorZone
- survivorZone = whiteSurvivorZone
- elseif reverseTratior.getVar("color") == "Red" then
- printToAll("Everyone except " .. Player.Red.steam_name .. " is the traitor!", {1, 0, 0})
- tratiorZone = redTratiorZone
- survivorZone = redSurvivorZone
- elseif reverseTratior.getVar("color") == "Orange" then
- printToAll("Everyone except " .. Player.Orange.steam_name .. " is the traitor!", {1, 0.45, 0})
- tratiorZone = orangeTratiorZone
- survivorZone = orangeSurvivorZone
- elseif reverseTratior.getVar("color") == "Green" then
- printToAll("Everyone except " .. Player.Green.steam_name .. " is the traitor!", {0, 1, 0})
- tratiorZone = greenTratiorZone
- survivorZone = greenSurvivorZone
- elseif reverseTratior.getVar("color") == "Blue" then
- printToAll("Everyone except " .. Player.Blue.steam_name .. " is the traitor!", {0.15, 0.43, 0.95})
- tratiorZone = blueTratiorZone
- survivorZone = blueSurvivorZone
- elseif reverseTratior.getVar("color") == "Purple" then
- printToAll("Everyone except " .. Player.Purple.steam_name .. " is the traitor!", {1, 0, 1})
- tratiorZone = purpleTratiorZone
- survivorZone = purpleSurvivorZone
- end
- survivorZone.setPosition({-34.74, 3, 49.51})
- survivorZone.setRotation({0, 360, 0})
- survivorZone.setScale({39.81, 5, 21.46})
- tratiorZone.setPosition({34.74, 3, 49.51})
- tratiorZone.setRotation({0, 360, 0})
- tratiorZone.setScale({39.81, 5, 21.46})
- end
- printToAll(" ", colorText)
- printToAll("-------------------------------", {1,1,1})
- getObjectFromGUID(survivalbook).setState(hauntNumber)
- getObjectFromGUID(traitorbook).setState(hauntNumber)
- else
- printToAll("A card and/or room hasn't been drawn", {1,1,1})
- end
- end
- function getNextPlayer()
- traitor = nil
- if currentPlayer == "White" then
- if Player.Red.seated then
- traitor = getCurrentPlayerObject("Red")
- elseif Player.Orange.seated then
- traitor = getCurrentPlayerObject("Orange")
- elseif Player.Green.seated then
- traitor = getCurrentPlayerObject("Green")
- elseif Player.Blue.seated then
- traitor = getCurrentPlayerObject("Blue")
- elseif Player.Purple.seated then
- traitor = getCurrentPlayerObject("Purple")
- end
- elseif currentPlayer == "Red" then
- if Player.Orange.seated then
- traitor = getCurrentPlayerObject("Orange")
- elseif Player.Green.seated then
- traitor = getCurrentPlayerObject("Green")
- elseif Player.Blue.seated then
- traitor = getCurrentPlayerObject("Blue")
- elseif Player.Purple.seated then
- traitor = getCurrentPlayerObject("Purple")
- elseif Player.White.seated then
- traitor = getCurrentPlayerObject("White")
- end
- elseif currentPlayer == "Orange" then
- if Player.Green.seated then
- traitor = getCurrentPlayerObject("Green")
- elseif Player.Blue.seated then
- traitor = getCurrentPlayerObject("Blue")
- elseif Player.Purple.seated then
- traitor = getCurrentPlayerObject("Purple")
- elseif Player.White.seated then
- traitor = getCurrentPlayerObject("White")
- elseif Player.Red.seated then
- traitor = getCurrentPlayerObject("Red")
- end
- elseif currentPlayer == "Green" then
- if Player.Blue.seated then
- traitor = getCurrentPlayerObject("Blue")
- elseif Player.Purple.seated then
- traitor = getCurrentPlayerObject("Purple")
- elseif Player.White.seated then
- traitor = getCurrentPlayerObject("White")
- elseif Player.Red.seated then
- traitor = getCurrentPlayerObject("Red")
- elseif Player.Orange.seated then
- traitor = getCurrentPlayerObject("Orange")
- end
- elseif currentPlayer == "Blue" then
- if Player.Purple.seated then
- traitor = getCurrentPlayerObject("Purple")
- elseif Player.White.seated then
- traitor = getCurrentPlayerObject("White")
- elseif Player.Red.seated then
- traitor = getCurrentPlayerObject("Red")
- elseif Player.Orange.seated then
- traitor = getCurrentPlayerObject("Orange")
- elseif Player.Green.seated then
- traitor = getCurrentPlayerObject("Green")
- end
- elseif currentPlayer == "Purple" then
- if Player.White.seated then
- traitor = getCurrentPlayerObject("White")
- elseif Player.Red.seated then
- traitor = getCurrentPlayerObject("Red")
- elseif Player.Orange.seated then
- traitor = getCurrentPlayerObject("Orange")
- elseif Player.Green.seated then
- traitor = getCurrentPlayerObject("Green")
- elseif Player.Blue.seated then
- traitor = getCurrentPlayerObject("Blue")
- end
- end
- return traitor
- end
- function getCurrentPlayerObject(player)
- traitor = nil
- if player == "White" then
- if getObjectFromGUID('e35e15') ~= nil then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- if player == "Red" then
- if getObjectFromGUID('f8116a') ~= nil then
- traitor = getObjectFromGUID('f8116a')
- elseif getObjectFromGUID('3878fc') ~= nil then
- traitor = getObjectFromGUID('3878fc')
- end
- end
- if player == "Orange" then
- if getObjectFromGUID('0c0d43') ~= nil then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- if player == "Green" then
- if getObjectFromGUID('050ff1') ~= nil then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- if player == "Blue" then
- if getObjectFromGUID('84dd50') ~= nil then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- if player == "Purple" then
- if getObjectFromGUID('732231') ~= nil then
- traitor = getObjectFromGUID('732231')
- elseif getObjectFromGUID('926f41') ~= nil then
- traitor = getObjectFromGUID('926f41')
- end
- end
- return traitor
- end
- function checkStats(hauntRevealer, stat, isLowest, includeRevealer)
- players = {}
- traitor = nil
- if isLowest then
- if includeRevealer then
- if hauntRevealer == "White" then
- if getObjectFromGUID('e35e15') ~= nil then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil then
- traitor = getObjectFromGUID('327a8c')
- end
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil and getObjectFromGUID('3878fc').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil and getObjectFromGUID('f8116a').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil and getObjectFromGUID('0c0d43').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil and getObjectFromGUID('10c2e2').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil and getObjectFromGUID('050ff1').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil and getObjectFromGUID('a540a9').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil and getObjectFromGUID('84dd50').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil and getObjectFromGUID('5a4152').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil and getObjectFromGUID('926f41').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil and getObjectFromGUID('732231').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('732231')
- end
- end
- elseif hauntRevealer == "Red" then
- if getObjectFromGUID('3878fc') ~= nil then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil then
- traitor = getObjectFromGUID('f8116a1')
- end
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil and getObjectFromGUID('0c0d43').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil and getObjectFromGUID('10c2e2').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil and getObjectFromGUID('050ff1').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil and getObjectFromGUID('a540a9').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil and getObjectFromGUID('84dd50').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil and getObjectFromGUID('5a4152').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil and getObjectFromGUID('926f41').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil and getObjectFromGUID('732231').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('732231')
- end
- end
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil and getObjectFromGUID('e35e15').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil and getObjectFromGUID('327a8c').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- elseif hauntRevealer == "Orange" then
- if getObjectFromGUID('0c0d43') ~= nil then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil then
- traitor = getObjectFromGUID('10c2e2')
- end
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil and getObjectFromGUID('050ff1').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil and getObjectFromGUID('a540a9').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil and getObjectFromGUID('84dd50').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil and getObjectFromGUID('5a4152').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil and getObjectFromGUID('926f41').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil and getObjectFromGUID('732231').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('732231')
- end
- end
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil and getObjectFromGUID('e35e15').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil and getObjectFromGUID('327a8c').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil and getObjectFromGUID('3878fc').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil and getObjectFromGUID('f8116a').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- elseif hauntRevealer == "Green" then
- if getObjectFromGUID('050ff1') ~= nil then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil then
- traitor = getObjectFromGUID('a540a9')
- end
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil and getObjectFromGUID('84dd50').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil and getObjectFromGUID('5a4152').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil and getObjectFromGUID('926f41').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil and getObjectFromGUID('732231').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('732231')
- end
- end
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil and getObjectFromGUID('e35e15').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil and getObjectFromGUID('327a8c').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil and getObjectFromGUID('3878fc').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil and getObjectFromGUID('f8116a').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil and getObjectFromGUID('0c0d43').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil and getObjectFromGUID('10c2e2').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- elseif hauntRevealer == "Blue" then
- if getObjectFromGUID('84dd50') ~= nil then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil then
- traitor = getObjectFromGUID('5a4152')
- end
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil and getObjectFromGUID('926f41').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil and getObjectFromGUID('732231').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('732231')
- end
- end
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil and getObjectFromGUID('e35e15').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil and getObjectFromGUID('327a8c').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil and getObjectFromGUID('3878fc').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil and getObjectFromGUID('f8116a').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil and getObjectFromGUID('0c0d43').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil and getObjectFromGUID('10c2e2').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil and getObjectFromGUID('050ff1').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil and getObjectFromGUID('a540a9').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- elseif hauntRevealer == "Purple" then
- if getObjectFromGUID('926f41') ~= nil then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil then
- traitor = getObjectFromGUID('732231')
- end
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil and getObjectFromGUID('e35e15').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil and getObjectFromGUID('327a8c').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil and getObjectFromGUID('3878fc').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil and getObjectFromGUID('f8116a').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil and getObjectFromGUID('0c0d43').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil and getObjectFromGUID('10c2e2').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil and getObjectFromGUID('050ff1').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil and getObjectFromGUID('a540a9').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil and getObjectFromGUID('84dd50').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil and getObjectFromGUID('5a4152').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- end
- else
- if hauntRevealer == "White" then
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil then
- traitor = getObjectFromGUID('f8116a')
- end
- elseif Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil then
- traitor = getObjectFromGUID('10c2e2')
- end
- elseif Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil then
- traitor = getObjectFromGUID('a540a9')
- end
- elseif Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil then
- traitor = getObjectFromGUID('5a4152')
- end
- elseif Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil then
- traitor = getObjectFromGUID('732231')
- end
- end
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil then
- if getObjectFromGUID('0c0d43').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('0c0d43')
- end
- elseif getObjectFromGUID('10c2e2') ~= nil and getObjectFromGUID('10c2e2').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil and getObjectFromGUID('050ff1').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil and getObjectFromGUID('a540a9').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil and getObjectFromGUID('84dd50').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil and getObjectFromGUID('5a4152').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil and getObjectFromGUID('926f41').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil and getObjectFromGUID('732231').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('732231')
- end
- end
- elseif hauntRevealer == "Red" then
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil then
- traitor = getObjectFromGUID('10c2e2')
- end
- elseif Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil then
- traitor = getObjectFromGUID('a540a9')
- end
- elseif Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil then
- traitor = getObjectFromGUID('5a4152')
- end
- elseif Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil then
- traitor = getObjectFromGUID('732231')
- end
- elseif Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil then
- if getObjectFromGUID('050ff1').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('050ff1')
- end
- elseif getObjectFromGUID('a540a9') ~= nil then
- if getObjectFromGUID('a540a9').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- end
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil and getObjectFromGUID('84dd50').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil and getObjectFromGUID('5a4152').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil and getObjectFromGUID('926f41').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil and getObjectFromGUID('732231').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('732231')
- end
- end
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil and getObjectFromGUID('e35e15').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil and getObjectFromGUID('327a8c').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- elseif hauntRevealer == "Orange" then
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil then
- traitor = getObjectFromGUID('a540a9')
- end
- elseif Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil then
- traitor = getObjectFromGUID('5a4152')
- end
- elseif Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil then
- traitor = getObjectFromGUID('732231')
- end
- elseif Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil then
- traitor = getObjectFromGUID('327a8c')
- end
- elseif Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil and getObjectFromGUID('84dd50').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil and getObjectFromGUID('5a4152').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil and getObjectFromGUID('926f41').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil and getObjectFromGUID('732231').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('732231')
- end
- end
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil and getObjectFromGUID('e35e15').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil and getObjectFromGUID('327a8c').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil and getObjectFromGUID('3878fc').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil and getObjectFromGUID('f8116a').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- elseif hauntRevealer == "Green" then
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil then
- traitor = getObjectFromGUID('5a4152')
- end
- elseif Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil then
- traitor = getObjectFromGUID('732231')
- end
- elseif Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil then
- traitor = getObjectFromGUID('327a8c')
- end
- elseif Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil then
- traitor = getObjectFromGUID('f8116a')
- end
- elseif Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil and getObjectFromGUID('926f41').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil and getObjectFromGUID('732231').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('732231')
- end
- end
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil and getObjectFromGUID('e35e15').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil and getObjectFromGUID('327a8c').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil and getObjectFromGUID('3878fc').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil and getObjectFromGUID('f8116a').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil and getObjectFromGUID('0c0d43').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil and getObjectFromGUID('10c2e2').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- elseif hauntRevealer == "Blue" then
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil then
- traitor = getObjectFromGUID('732231')
- end
- elseif Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil then
- traitor = getObjectFromGUID('327a8c')
- end
- elseif Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil then
- traitor = getObjectFromGUID('f8116a')
- end
- elseif Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil then
- traitor = getObjectFromGUID('10c2e2')
- end
- elseif Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil and getObjectFromGUID('e35e15').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil and getObjectFromGUID('327a8c').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil and getObjectFromGUID('3878fc').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil and getObjectFromGUID('f8116a').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil and getObjectFromGUID('0c0d43').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil and getObjectFromGUID('10c2e2').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil and getObjectFromGUID('050ff1').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil and getObjectFromGUID('a540a9').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- elseif hauntRevealer == "Purple" then
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil then
- traitor = getObjectFromGUID('327a8c')
- end
- elseif Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil then
- traitor = getObjectFromGUID('f8116a')
- end
- elseif Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil then
- traitor = getObjectFromGUID('10c2e2')
- end
- elseif Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil then
- traitor = getObjectFromGUID('a540a9')
- end
- elseif Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil and getObjectFromGUID('3878fc').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil and getObjectFromGUID('f8116a').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil and getObjectFromGUID('0c0d43').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil and getObjectFromGUID('10c2e2').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil and getObjectFromGUID('050ff1').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil and getObjectFromGUID('a540a9').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil and getObjectFromGUID('84dd50').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil and getObjectFromGUID('5a4152').getVar(stat) < traitor.getVar(stat) then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- end
- end
- else
- if includeRevealer then
- if hauntRevealer == "White" then
- if getObjectFromGUID('e35e15') ~= nil then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil then
- traitor = getObjectFromGUID('327a8c')
- end
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil and getObjectFromGUID('3878fc').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil and getObjectFromGUID('f8116a').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil and getObjectFromGUID('0c0d43').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil and getObjectFromGUID('10c2e2').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil and getObjectFromGUID('050ff1').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil and getObjectFromGUID('a540a9').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil and getObjectFromGUID('84dd50').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil and getObjectFromGUID('5a4152').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil and getObjectFromGUID('926f41').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil and getObjectFromGUID('732231').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('732231')
- end
- end
- elseif hauntRevealer == "Red" then
- if getObjectFromGUID('3878fc') ~= nil then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil then
- traitor = getObjectFromGUID('f8116a')
- end
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil and getObjectFromGUID('0c0d43').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil and getObjectFromGUID('10c2e2').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil and getObjectFromGUID('050ff1').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil and getObjectFromGUID('a540a9').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil and getObjectFromGUID('84dd50').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil and getObjectFromGUID('5a4152').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil and getObjectFromGUID('926f41').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil and getObjectFromGUID('732231').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('732231')
- end
- end
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil and getObjectFromGUID('e35e15').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil and getObjectFromGUID('327a8c').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- elseif hauntRevealer == "Orange" then
- if getObjectFromGUID('0c0d43') ~= nil then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil then
- traitor = getObjectFromGUID('10c2e2')
- end
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil and getObjectFromGUID('050ff1').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil and getObjectFromGUID('a540a9').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil and getObjectFromGUID('84dd50').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil and getObjectFromGUID('5a4152').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil and getObjectFromGUID('926f41').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil and getObjectFromGUID('732231').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('732231')
- end
- end
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil and getObjectFromGUID('e35e15').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil and getObjectFromGUID('327a8c').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil and getObjectFromGUID('3878fc').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil and getObjectFromGUID('f8116a').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- elseif hauntRevealer == "Green" then
- if getObjectFromGUID('050ff1') ~= nil then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil then
- traitor = getObjectFromGUID('a540a9')
- end
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil and getObjectFromGUID('84dd50').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil and getObjectFromGUID('5a4152').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil and getObjectFromGUID('926f41').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil and getObjectFromGUID('732231').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('732231')
- end
- end
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil and getObjectFromGUID('e35e15').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil and getObjectFromGUID('327a8c').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil and getObjectFromGUID('3878fc').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil and getObjectFromGUID('f8116a').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil and getObjectFromGUID('0c0d43').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil and getObjectFromGUID('10c2e2').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- elseif hauntRevealer == "Blue" then
- if getObjectFromGUID('84dd50') ~= nil then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil then
- traitor = getObjectFromGUID('5a4152')
- end
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil and getObjectFromGUID('926f41').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil and getObjectFromGUID('732231').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('732231')
- end
- end
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil and getObjectFromGUID('e35e15').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil and getObjectFromGUID('327a8c').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil and getObjectFromGUID('3878fc').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil and getObjectFromGUID('f8116a').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil and getObjectFromGUID('0c0d43').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil and getObjectFromGUID('10c2e2').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil and getObjectFromGUID('050ff1').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil and getObjectFromGUID('a540a9').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- elseif hauntRevealer == "Purple" then
- if getObjectFromGUID('926f41') ~= nil then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil then
- traitor = getObjectFromGUID('732231')
- end
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil and getObjectFromGUID('e35e15').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil and getObjectFromGUID('327a8c').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil and getObjectFromGUID('3878fc').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil and getObjectFromGUID('f8116a').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil and getObjectFromGUID('0c0d43').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil and getObjectFromGUID('10c2e2').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil and getObjectFromGUID('050ff1').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil and getObjectFromGUID('a540a9').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil and getObjectFromGUID('84dd50').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil and getObjectFromGUID('5a4152').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- end
- else
- if hauntRevealer == "White" then
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil then
- traitor = getObjectFromGUID('f8116a')
- end
- elseif Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil then
- traitor = getObjectFromGUID('10c2e2')
- end
- elseif Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil then
- traitor = getObjectFromGUID('a540a9')
- end
- elseif Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil then
- traitor = getObjectFromGUID('5a4152')
- end
- elseif Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil then
- traitor = getObjectFromGUID('732231')
- end
- end
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil then
- if getObjectFromGUID('0c0d43').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('0c0d43')
- end
- elseif getObjectFromGUID('10c2e2') ~= nil and getObjectFromGUID('10c2e2').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil and getObjectFromGUID('050ff1').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil and getObjectFromGUID('a540a9').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil and getObjectFromGUID('84dd50').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil and getObjectFromGUID('5a4152').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil and getObjectFromGUID('926f41').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil and getObjectFromGUID('732231').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('732231')
- end
- end
- elseif hauntRevealer == "Red" then
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil then
- traitor = getObjectFromGUID('10c2e2')
- end
- elseif Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil then
- traitor = getObjectFromGUID('a540a9')
- end
- elseif Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil then
- traitor = getObjectFromGUID('5a4152')
- end
- elseif Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil then
- traitor = getObjectFromGUID('732231')
- end
- elseif Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil then
- if getObjectFromGUID('050ff1').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('050ff1')
- end
- elseif getObjectFromGUID('a540a9') ~= nil then
- if getObjectFromGUID('a540a9').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- end
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil and getObjectFromGUID('84dd50').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil and getObjectFromGUID('5a4152').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil and getObjectFromGUID('926f41').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil and getObjectFromGUID('732231').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('732231')
- end
- end
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil and getObjectFromGUID('e35e15').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil and getObjectFromGUID('327a8c').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- elseif hauntRevealer == "Orange" then
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil then
- traitor = getObjectFromGUID('a540a9')
- end
- elseif Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil then
- traitor = getObjectFromGUID('5a4152')
- end
- elseif Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil then
- traitor = getObjectFromGUID('732231')
- end
- elseif Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil then
- traitor = getObjectFromGUID('327a8c')
- end
- elseif Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil and getObjectFromGUID('84dd50').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil and getObjectFromGUID('5a4152').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil and getObjectFromGUID('926f41').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil and getObjectFromGUID('732231').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('732231')
- end
- end
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil and getObjectFromGUID('e35e15').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil and getObjectFromGUID('327a8c').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil and getObjectFromGUID('3878fc').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil and getObjectFromGUID('f8116a').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- elseif hauntRevealer == "Green" then
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil then
- traitor = getObjectFromGUID('5a4152')
- end
- elseif Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil then
- traitor = getObjectFromGUID('732231')
- end
- elseif Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil then
- traitor = getObjectFromGUID('327a8c')
- end
- elseif Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil then
- traitor = getObjectFromGUID('f8116a')
- end
- elseif Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil and getObjectFromGUID('926f41').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil and getObjectFromGUID('732231').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('732231')
- end
- end
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil and getObjectFromGUID('e35e15').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil and getObjectFromGUID('327a8c').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil and getObjectFromGUID('3878fc').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil and getObjectFromGUID('f8116a').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil and getObjectFromGUID('0c0d43').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil and getObjectFromGUID('10c2e2').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- elseif hauntRevealer == "Blue" then
- if Player.Purple.seated then
- if getObjectFromGUID('926f41') ~= nil then
- traitor = getObjectFromGUID('926f41')
- elseif getObjectFromGUID('732231') ~= nil then
- traitor = getObjectFromGUID('732231')
- end
- elseif Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil then
- traitor = getObjectFromGUID('327a8c')
- end
- elseif Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil then
- traitor = getObjectFromGUID('f8116a')
- end
- elseif Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil then
- traitor = getObjectFromGUID('10c2e2')
- end
- elseif Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil and getObjectFromGUID('e35e15').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil and getObjectFromGUID('327a8c').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('327a8c')
- end
- end
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil and getObjectFromGUID('3878fc').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil and getObjectFromGUID('f8116a').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil and getObjectFromGUID('0c0d43').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil and getObjectFromGUID('10c2e2').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil and getObjectFromGUID('050ff1').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil and getObjectFromGUID('a540a9').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- elseif hauntRevealer == "Purple" then
- if Player.White.seated then
- if getObjectFromGUID('e35e15') ~= nil then
- traitor = getObjectFromGUID('e35e15')
- elseif getObjectFromGUID('327a8c') ~= nil then
- traitor = getObjectFromGUID('327a8c')
- end
- elseif Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil then
- traitor = getObjectFromGUID('f8116a')
- end
- elseif Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil then
- traitor = getObjectFromGUID('10c2e2')
- end
- elseif Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil then
- traitor = getObjectFromGUID('a540a9')
- end
- elseif Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- if Player.Red.seated then
- if getObjectFromGUID('3878fc') ~= nil and getObjectFromGUID('3878fc').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('3878fc')
- elseif getObjectFromGUID('f8116a') ~= nil and getObjectFromGUID('f8116a').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('f8116a')
- end
- end
- if Player.Orange.seated then
- if getObjectFromGUID('0c0d43') ~= nil and getObjectFromGUID('0c0d43').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('0c0d43')
- elseif getObjectFromGUID('10c2e2') ~= nil and getObjectFromGUID('10c2e2').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('10c2e2')
- end
- end
- if Player.Green.seated then
- if getObjectFromGUID('050ff1') ~= nil and getObjectFromGUID('050ff1').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('050ff1')
- elseif getObjectFromGUID('a540a9') ~= nil and getObjectFromGUID('a540a9').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('a540a9')
- end
- end
- if Player.Blue.seated then
- if getObjectFromGUID('84dd50') ~= nil and getObjectFromGUID('84dd50').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('84dd50')
- elseif getObjectFromGUID('5a4152') ~= nil and getObjectFromGUID('5a4152').getVar(stat) > traitor.getVar(stat) then
- traitor = getObjectFromGUID('5a4152')
- end
- end
- end
- end
- end
- return traitor
- end
- function split(s, delimiter)
- result = {}
- i = 0
- for match in string.gmatch(s, '([^'.. delimiter ..']+)') do
- result[i] = match
- i = i + 1
- end
- return result
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement