Skip to content

Instantly share code, notes, and snippets.

@Tsaryii
Created April 3, 2024 06:42
Show Gist options
  • Save Tsaryii/c906aedc306e89c2a2896bbeb619d1b6 to your computer and use it in GitHub Desktop.
Save Tsaryii/c906aedc306e89c2a2896bbeb619d1b6 to your computer and use it in GitHub Desktop.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Fortnite.com/Characters}
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Fortnite.com/Teams }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Fortnite.com/Characters}
using { /UnrealEngine.com/Temporary/UI}
using { /Fortnite.com/UI}
using { /Verse.org/Colors/NamedColors}
using { /Verse.org/Colors}
using { /Verse.org/Random }
# See https://dev.epicgames.com/documentation/en-us/uefn/create-your-own-device-in-verse for how to create a verse device.
# A Verse-authored creative device that can be placed in a level
#█▀▀ █▀█ █▀▀ █▀▄ █ ▀█▀ █▀ ▀
#█▄▄ █▀▄ ██▄ █▄▀ █ ░█░ ▄█ ▄
#████████╗░██████╗░█████╗░██████╗░  ░░░░██╗  ████████╗░██████╗░█████╗░██████╗░██████╗░██╗░░░██╗
#╚══██╔══╝██╔════╝██╔══██╗██╔══██╗  ░░░██╔╝  ╚══██╔══╝██╔════╝██╔══██╗██╔══██╗██╔══██╗╚██╗░██╔╝
#░░░██║░░░╚█████╗░███████║██████╔╝  ░░██╔╝░  ░░░██║░░░╚█████╗░███████║██████╔╝██████╔╝░╚████╔╝░
#░░░██║░░░░╚═══██╗██╔══██║██╔══██╗  ░██╔╝░░  ░░░██║░░░░╚═══██╗██╔══██║██╔══██╗██╔══██╗░░╚██╔╝░░
#░░░██║░░░██████╔╝██║░░██║██║░░██║  ██╔╝░░░  ░░░██║░░░██████╔╝██║░░██║██║░░██║██║░░██║░░░██║░░░
#░░░╚═╝░░░╚═════╝░╚═╝░░╚═╝╚═╝░░╚═╝  ╚═╝░░░░  ░░░╚═╝░░░╚═════╝░╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░╚═╝░░░╚═╝░░░
# Copyright: IN EULA AGREEMENT
# DO NOT REDISTRIBUTE
# Youtube Channel: Youtube.com/@TsarShorts
TycoonKit := class(creative_device):
@editable
var BaseLoadingSpeed: float = 1.0 # --> speed you want the player to gain money 1.0 = 1 second, .5 = 2 seconds, .25 = 4 seconds etc. (HAS NO EFFECT RN TO PREVENT ERRORS)
@editable
var StartingMoney : int = 1 #Backend Score -- > (Change this value to however much you want the player to start with, money will be in their claimable area)
@editable
var StartingCustomMoney : int = 1 <#Keep this equal to or greater than 1.
Bugs may appear if default value is absolute 0.
During games if the player reaches currency value of 0 it will be rounded; however, during game start if currency is absoulte 0 prefix and suffix calculations maybe be incaccurate.
Reference -> using { /UnrealEngine.com/Temporary/SpatialMath } #>
@editable
DecimalAmount: int = 2
@editable
var IndexingSpeed: float = 0.88
@editable
var AutoSaveCurrencySeconds: float = 15.0
@editable
@editable
Teamset : []BaseArray = array{}
RebirthSystem : RebirthType = RebirthType{}
var PlayerScore : [agent]?text_block = map{}
var PlayerRebirths : [agent]?text_block = map{}
var ScorePS : [agent]?text_block = map{}
var CustomizableCoin : [agent]?text_block = map{}
var CannonDB: logic = false
@editable
BinaryDataSave: BinarySaving = BinarySaving{}
var Players2 : []player = array{}
#List Teams in backend
# Secondary use if using conditional buttons
#var GoldLeft:[]char = ("{GoldUpdater.GetRemainingItemCountRequired(KeyItemIndex:int = 0)}")
# Base LOC to convert strings to billboard messages
# Billboard.SetText(StringToMessage("💰{GoldLeft}💰"))
var Teamswap: int = 0
var AllPlayersMap : [player]PlayerStats = map{}
var MaxLoopings: int = 1
var Debounce1: int = 0
var Debounce2: int = 0
OnBegin<override>()<suspends>:void=
Players:=GetPlayspace().GetPlayers()
for (Player : Players):
#("1")
if(PlayerTeam := GetPlayspace().GetTeamCollection().GetTeam[Player]):
if(Agent:agent = agent[Player]):
if(PlayerOBJ := player[Player]):
if(set AllPlayersMap[PlayerOBJ] = PlayerStats{}):
#("Stats are setup")
if(AgentStats := AllPlayersMap[PlayerOBJ]):
#("Cash Per second: {AgentStats.GetCashpersecond()}")
Sleep(1.0)
var Teams : []team = array{}
set Teams = GetPlayspace().GetTeamCollection().GetTeams()
#("Loop has begun")
for (Player : Players):
if(PlayerTeam := GetPlayspace().GetTeamCollection().GetTeam[Player]):
if(Agent:agent = agent[Player]):
if(PlayerOBJ := player[Player]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
for(TeamLength := 0..Teamset.Length - 1):
#("TeamLength is: {TeamLength}")
if(BaseClaimer := Teamset[TeamLength].BaseClaimer):
BaseClaimer.AgentEntersEvent.SubscribeAgent(AgentStats.TeamChange, TeamLength)
BaseClaimer.AgentExitsEvent.Subscribe(IncreaseIndex)
ButtonIntercation := RebirthSystem.Interacation
ButtonIntercation.InteractedWithEvent.Subscribe(RebirthTriggered)
Sleep(1.0)
RebirthTriggered(NewPlayer: agent):void=
#("rebirth triggered")
TeamCollection := GetPlayspace().GetTeamCollection()
Teams : []team = TeamCollection.GetTeams()
if:
AgentsTeam := TeamCollection.GetTeam[NewPlayer]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Team Number{TeamNumber}")
if(PlayerOBJ := player[NewPlayer]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
var Rebirths: float = AgentStats.GetRebirths()
var CumulativeRebirths: float = Rebirths
var ExpoCash: float = RebirthSystem.GetExpoCash()
var ExpoPrice: float = RebirthSystem.GetExpoPrice()
var RebirthName: string = RebirthSystem.UnPlurralName
var DefaultPrice: float = RebirthSystem.BasePrice
var FinalizePrice: float = Pow(ExpoPrice, CumulativeRebirths)
set CumulativeRebirths += 1.0
var FinalizeCash: float = Pow(ExpoCash, CumulativeRebirths)
var CurrentCash: float = Pow(ExpoCash, Rebirths)
set FinalizePrice *= DefaultPrice
var RebirthMoney: int = 0
if(set RebirthMoney = Round[FinalizePrice]):
if(Suffix := GetSuffix[RebirthMoney]):
Popup := RebirthSystem.PopUp
Popup.SetTitleText(StringToMessage("You've {RebirthName}ed {Rebirths} times so far."))
Popup.SetDescriptionText(StringToMessage("Currently 1 cash = {CurrentCash} \n After rebirthing: \n 1 cash = {FinalizeCash} \n You need {GetDivisor(RebirthMoney)}{Suffix} to rebirth"))
Popup.Show(NewPlayer)
Popup.SetButtonText(StringToMessage("Rebirth"), 0)
Popup.RespondingButtonEvent.Subscribe(Rebirthed)
Rebirthed(NewPlayer : agent, Index: int):void =
TeamCollection := GetPlayspace().GetTeamCollection()
Teams : []team = TeamCollection.GetTeams()
if:
AgentsTeam := TeamCollection.GetTeam[NewPlayer]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Team Number{TeamNumber}")
if(PlayerOBJ := player[NewPlayer]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
if(Index = 0):
if(PurchaseManager := Teamset[TeamNumber].PurchaseManager):
var Rebirths: float = AgentStats.GetRebirths()
var CumulativeRebirths: float = Rebirths
set CumulativeRebirths += 1.0
var ExpoCash: float = RebirthSystem.GetExpoCash()
var ExpoPrice: float = RebirthSystem.GetExpoPrice()
var RebirthName: string = RebirthSystem.UnPlurralName
var DefaultPrice: float = RebirthSystem.BasePrice
var FinalizePrice: float = Pow(ExpoPrice, CumulativeRebirths)
var FinalizeCash: float = Pow(ExpoCash, CumulativeRebirths)
var CurrentCash: float = Pow(ExpoCash, Rebirths)
var CurrentScore: float = PurchaseManager.GetCurrentScore(NewPlayer) * 1.0
set FinalizePrice *= DefaultPrice
if(CurrentScore > FinalizePrice):
#("Final Price {FinalizePrice}")
var FinalizePriceINT:int = 0
if:
set FinalizePriceINT = Round[FinalizePrice]
set FinalizePriceINT = FinalizePriceINT - FinalizePriceINT - FinalizePriceINT
AgentStats.MultiplyCashpersecond(FinalizeCash)
AgentStats.SetRebirths(1.0)
PurchaseManager.SetScoreAward(FinalizePriceINT)
PurchaseManager.Activate(NewPlayer)
spawn:
HideProps(TeamNumber)
IncreaseIndex(NewPlayer: agent):void=
TeamCollection := GetPlayspace().GetTeamCollection()
Teams : []team = TeamCollection.GetTeams()
if:
AgentsTeam := TeamCollection.GetTeam[NewPlayer]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Team Number{TeamNumber}")
if(PlayerOBJ := player[NewPlayer]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
spawn:
PCCashSIncreaser(NewPlayer)
set Teamswap = AgentStats.GetUpdateTeam()
#("Updated TeamSwap should be {Teamswap}")
#("Past userbase check" )
AgentStats.AddCustommoney(NewPlayer, StartingCustomMoney)
if (TeamCollection.AddToTeam[NewPlayer, Teams[Teamswap]]):
spawn:
BaseClaimed(NewPlayer)
if(CashClaimSFX := Teamset[Teamswap].CashClaimSFX):
CashClaimSFX.Register(NewPlayer)
#("Registered")
if(BaseClaimer := Teamset[Teamswap].BaseClaimer):
BaseClaimer.Disable()
else:
#("Though gal owns tho base")
#Checks if a player has left, get the team they were on and Re-enable the bases ability to be claimed.
HideProps(TeamIndex: int)<suspends>:void= #Cycles through all props of a base and hides them
if(Debounce1 = 0):
set Debounce1 = 1
#("Starting new func")
var CurrentHiddenCount: int = 0
for(ItemCount -> Indexed : Teamset[TeamIndex].Purchaseables):
for(AllProps := 0..Teamset[TeamIndex].Purchaseables[ItemCount].Props.Length - 1):
if(Prop := Teamset[Teamswap].Purchaseables[ItemCount].Props[AllProps].Prop):
if(Prop.IsValid[]):
Prop.Hide()
var PropPosition: vector3 = {(Prop.GetTransform().Translation)}
var PropRotation : rotation= {(Prop.GetTransform().Rotation)}
FinalPropPosition := vector3{X := PropPosition.X, Y := PropPosition.Y, Z := PropPosition.Z + 1000.0}
if(MoveResult := Prop.TeleportTo[FinalPropPosition, PropRotation]):
Print("hiding Dependents")
Print(" teamswap is: {Teamswap}")
Print(" Item Count is : {ItemCount}")
if(Dependents := Teamset[Teamswap].Purchaseables[ItemCount].Dependent.buttonzone):
Dependents.Disable() #Hides all dependent buttons for Purchasble items
if (Dependent := Teamset[Teamswap].Purchaseables[ItemCount].Dependent.BuyVFX):
Dependent.Disable()
if(Dependents := Teamset[Teamswap].Purchaseables[ItemCount].Dependent2.buttonzone):
Dependents.Disable() #Hides all dependent buttons for Purchasble items
if (Dependent := Teamset[Teamswap].Purchaseables[ItemCount].Dependent2.BuyVFX):
Dependent.Disable()
if (Dependent := Teamset[Teamswap].Purchaseables[ItemCount].PurchasedVFX1):
Dependent.Disable()
if (Dependent := Teamset[Teamswap].Purchaseables[ItemCount].PurchasedVFX2):
Dependent.Disable()
if (Dependent := Teamset[Teamswap].Purchaseables[ItemCount].Dependent.CostDisplay):
Dependent.HideText()
if (Dependent := Teamset[Teamswap].Purchaseables[ItemCount].Dependent2.CostDisplay):
Dependent.HideText()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.EnterMutator):
Dependent.Disable()
for(ItemCount2 -> Indexed : Teamset[TeamIndex].Droppers):
for(AllProps := 0..Teamset[TeamIndex].Droppers[ItemCount2].Props.Length - 1):
if(Dropper := Teamset[Teamswap].Droppers[ItemCount2].Props[AllProps].Prop):
if(Dropper.IsValid[]):
Dropper.Hide() #Hides droppers
var PropPosition: vector3 = {(Dropper.GetTransform().Translation)}
FinalPropPosition := vector3{X := PropPosition.X, Y := PropPosition.Y, Z := PropPosition.Z + 1000.0}
var PropRotation: rotation = {(Dropper.GetTransform().Rotation)}
if(MoveResult := Dropper.TeleportTo[FinalPropPosition, PropRotation]):
if(DropperMain := Teamset[Teamswap].Droppers[ItemCount2].Dropper):
DropperMain.Hide() #Hides droppers
if(DropperTIP := Teamset[Teamswap].Droppers[ItemCount2].DropperTIP):
if(DropperTIP.IsValid[]):
DropperTIP.Hide() #Hides all dropper TIPS
var PropPosition: vector3 = {(DropperTIP.GetTransform().Translation)}
FinalPropPosition := vector3{X := PropPosition.X, Y := PropPosition.Y, Z := PropPosition.Z + 1000.0}
var PropRotation: rotation = {(DropperTIP.GetTransform().Rotation)}
if(MoveResult := DropperTIP.TeleportTo[FinalPropPosition, PropRotation]):
if(Prop := Teamset[Teamswap].Droppers[ItemCount2].Prop):
if(Prop.IsValid[]):
Prop.Hide()
var PropPosition: vector3 = {(Prop.GetTransform().Translation)}
FinalPropPosition := vector3{X := PropPosition.X, Y := PropPosition.Y, Z := PropPosition.Z + 1000.0}
var PropRotation: rotation = {(Prop.GetTransform().Rotation)}
if(MoveResult := Prop.TeleportTo[FinalPropPosition, PropRotation]):
#Hides all dropper TIPS
Sleep(0.0)
if(Dependents:= Teamset[Teamswap].Droppers[ItemCount2].Dependent.buttonzone):
Dependents.Disable() #Hides all dependent buttons for Droppers
if (Dependent := Teamset[Teamswap].Droppers[ItemCount2].Dependent.BuyVFX):
Dependent.Disable()
if (Dependent := Teamset[Teamswap].Droppers[ItemCount2].SetVFX.PurchasedVFX1):
Dependent.Disable()
if (Dependent := Teamset[Teamswap].Droppers[ItemCount2].SetVFX.PurchasedVFX2):
Dependent.Disable()
if (Dependent := Teamset[Teamswap].Droppers[ItemCount2].Dependent.CostDisplay):
Dependent.HideText()
for(ItemCount3 -> Indexed : Teamset[TeamIndex].CustomizableCurrency.Computers):
for(AllProps := 0..Teamset[TeamIndex].CustomizableCurrency.Computers[ItemCount3].Props.Length - 1):
if(Prop := Teamset[Teamswap].CustomizableCurrency.Computers[ItemCount3].Props[AllProps].Prop):
if(Prop.IsValid[]):
Prop.Hide()
var PropPosition: vector3 = {(Prop.GetTransform().Translation)}
FinalPropPosition := vector3{X := PropPosition.X, Y := PropPosition.Y, Z := PropPosition.Z + 1000.0}
var PropRotation: rotation = {(Prop.GetTransform().Rotation)}
if(MoveResult := Prop.TeleportTo[FinalPropPosition, PropRotation]):
#Hides all dropper TIPS
if(Dependents:= Teamset[Teamswap].CustomizableCurrency.Computers[ItemCount3].Dependent.buttonzone):
Dependents.Disable() #Hides all dependent buttons for Droppers
if (Dependent := Teamset[Teamswap].CustomizableCurrency.Computers[ItemCount3].Dependent.BuyVFX):
Dependent.Disable()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.Computers[ItemCount3].PurchasedVFX1):
Dependent.Disable()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.Computers[ItemCount3].Dependent.CostDisplay):
Dependent.HideText()
if(BillboardDisplay := Teamset[Teamswap].CustomizableCurrency.CashSDisplay):
BillboardDisplay.HideText()
for(ItemCount4 -> Indexed : Teamset[TeamIndex].CustomizableCurrency.DamagedAdder):
for(AllProps := 0..Teamset[TeamIndex].CustomizableCurrency.DamagedAdder[ItemCount4].Props.Length - 1):
if(Prop := Teamset[Teamswap].CustomizableCurrency.DamagedAdder[ItemCount4].Props[AllProps].Prop):
if(Prop.IsValid[]):
Prop.Hide()
var PropPosition: vector3 = {(Prop.GetTransform().Translation)}
FinalPropPosition := vector3{X := PropPosition.X, Y := PropPosition.Y, Z := PropPosition.Z + 1000.0}
var PropRotation: rotation = {(Prop.GetTransform().Rotation)}
if(MoveResult := Prop.TeleportTo[FinalPropPosition, PropRotation]):
#Hides all dropper TIPS
if(Dependents:= Teamset[Teamswap].CustomizableCurrency.DamagedAdder[ItemCount4].Dependent.buttonzone):
Dependents.Disable() #Hides all dependent buttons for Droppers
if (Dependent := Teamset[Teamswap].CustomizableCurrency.DamagedAdder[ItemCount4].Dependent.BuyVFX):
Dependent.Disable()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.DamagedAdder[ItemCount4].PurchasedVFX1):
Dependent.Disable()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.DamagedAdder[ItemCount4].Dependent.CostDisplay):
Dependent.HideText()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.DamagedAdder[ItemCount4].Dependent.PropManipulator):
Dependent.Disable()
if(BillboardDisplay := Teamset[Teamswap].CustomizableCurrency.CashSDisplay):
BillboardDisplay.HideText()
for(ItemCount5 -> Indexed : Teamset[TeamIndex].CustomizableCurrency.Cannons): #Hides Cannons
for(AllProps := 0..Teamset[TeamIndex].CustomizableCurrency.Cannons[ItemCount5].Props.Length - 1):
if(Prop := Teamset[Teamswap].CustomizableCurrency.Cannons[ItemCount5].Props[AllProps].Prop):
if(Prop.IsValid[]):
Prop.Hide()
var PropPosition: vector3 = {(Prop.GetTransform().Translation)}
FinalPropPosition := vector3{X := PropPosition.X, Y := PropPosition.Y, Z := PropPosition.Z + 1000.0}
var PropRotation: rotation = {(Prop.GetTransform().Rotation)}
if(MoveResult := Prop.TeleportTo[FinalPropPosition, PropRotation]):
#Hides all dropper TIPS
if(Dependents:= Teamset[Teamswap].CustomizableCurrency.Cannons[ItemCount5].Dependent.buttonzone):
Dependents.Disable() #Hides all dependent buttons for Droppers
if (Dependent := Teamset[Teamswap].CustomizableCurrency.Cannons[ItemCount5].Dependent.BuyVFX):
Dependent.Disable()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.Cannons[ItemCount5].PurchasedVFX1):
Dependent.Disable()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.Cannons[ItemCount5].Dependent.CostDisplay):
Dependent.HideText()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.Cannons[ItemCount5].Button):
Dependent.Disable()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.Cannons[ItemCount5].DependentDisplay):
Dependent.HideText()
if(BillboardDisplay := Teamset[Teamswap].CustomizableCurrency.CashSDisplay):
BillboardDisplay.HideText()
for(ItemCount6 -> Indexed : Teamset[TeamIndex].CustomizableCurrency.Pets):
for(AllProps := 0..Teamset[TeamIndex].CustomizableCurrency.Pets[ItemCount6].UnlockableProps.Length - 1): #Pets
if(Prop := Teamset[Teamswap].CustomizableCurrency.Pets[ItemCount6].UnlockableProps[AllProps].Prop): #Props for the pets, I.E incubator
if(Prop.IsValid[]):
Prop.Hide()
var PropPosition: vector3 = {(Prop.GetTransform().Translation)}
FinalPropPosition := vector3{X := PropPosition.X, Y := PropPosition.Y, Z := PropPosition.Z + 1000.0}
var PropRotation: rotation = {(Prop.GetTransform().Rotation)}
if(MoveResult := Prop.TeleportTo[FinalPropPosition, PropRotation]):
for(AllProps := 0..Teamset[TeamIndex].CustomizableCurrency.Pets[ItemCount6].PetProps.Length - 1): #Prop[s] that makeup the pet.
if(Prop := Teamset[Teamswap].CustomizableCurrency.Pets[ItemCount6].PetProps[AllProps].Prop):
if(Prop.IsValid[]):
Prop.Hide()
var PropPosition: vector3 = {(Prop.GetTransform().Translation)}
FinalPropPosition := vector3{X := PropPosition.X, Y := PropPosition.Y, Z := PropPosition.Z + 1000.0}
var PropRotation: rotation = {(Prop.GetTransform().Rotation)}
if(MoveResult := Prop.TeleportTo[FinalPropPosition, PropRotation]):
#Hides all dropper TIPS
if(Dependents:= Teamset[Teamswap].CustomizableCurrency.Pets[ItemCount6].Dependent.buttonzone):
Dependents.Disable() #Hides all dependent buttons for Droppers
if (Dependent := Teamset[Teamswap].CustomizableCurrency.Pets[ItemCount6].Dependent.BuyVFX):
Dependent.Disable()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.Pets[ItemCount6].PurchasedVFX1):
Dependent.Disable()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.Pets[ItemCount6].Dependent.CostDisplay):
Dependent.HideText()
if(BillboardDisplay := Teamset[Teamswap].CustomizableCurrency.CashSDisplay):
BillboardDisplay.HideText()
for(Index -> IndexorItem : Teamset[TeamIndex].Purchaseables):
if(Purchase := Teamset[TeamIndex].Purchaseables[Index].Identifier):
if(CanShow := Teamset[TeamIndex].Purchaseables[Index].ShowNameOnPrint):
if(CanShow = true):
Print("{Purchase} is located at Index {Index} of type purchaseable")
Sleep(IndexingSpeed/2.5)
for(Index -> IndexorDropper : Teamset[TeamIndex].Droppers):
if(Dropper := Teamset[TeamIndex].Droppers[Index].Identifier):
if(CanShow := Teamset[TeamIndex].Droppers[Index].ShowNameOnPrint):
if(CanShow = true):
Print("{Dropper} is located at Index {Index} of type dropper")
Sleep(IndexingSpeed/2.5)
PlayerLeft(Agent : agent):void=
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("embeded TeamSetIndexNumber: {TeamNumber}")
if(BaseClaimer :=Teamset[TeamNumber].BaseClaimer):
BaseClaimed(Agent: agent)<suspends>:void=
var CashPerSecond: int = 1
var Teams : []team = array{}
set Teams = GetPlayspace().GetTeamCollection().GetTeams()
var TeamIndex: int = 0
#(" Team Index {TeamIndex}")
var StartingCash: int = StartingMoney
if(ScoreBlock:= PlayerScore[Agent]?){}
else:
AssignUI(Agent)
#("disabled")
spawn:
HideProps(Teamswap)
spawn:
AutoSave(Agent)
Players:=GetPlayspace().GetPlayers()
for (Player : Players):
if(PlayerTeam := GetPlayspace().GetTeamCollection().GetTeam[Player]):
if(PlayerOBJ := player[Player]):
if(AgentStats := AllPlayersMap[Agent]):
set TeamIndex = AgentStats.GetUpdateTeam()
if(EnteranceZone := Teamset[TeamIndex].CustomizableCurrency.EnterMutator):
EnteranceZone.AgentExitsEvent.Subscribe(ExitedPC)
var PCCount: int = AgentStats.GetPCIndex()
set PCCount =AgentStats.GetPCIndex()
if(EnteranceZone := Teamset[Teamswap].CustomizableCurrency.EnterMutator):
EnteranceZone.AgentEntersEvent.SubscribeAgent(AgentStats.NowUsingPC, PCCount)
EnteranceZone.AgentEntersEvent.SubscribeAgent(BegunPCUse, PCCount)
if(BaseClaimer := Teamset[TeamIndex].BaseClaimer):
BaseClaimer.Disable()
#("Team index inside Baseclaimed {TeamIndex} ")
if(CashDisplay1 := Teamset[TeamIndex].CashDisplay):
CashDisplay1.SetText(StringToMessage("{0}"))
#("Past userbase check" )
loop: #Constantly updates and checks for new score and if a user is claiming ever 1s
Sleep(0.01)
if(MutatorZone1 := Teamset[TeamIndex].CashClaimer):
MutatorZone1.AgentEntersEvent.Subscribe(Cashclaim)
if(ScoreManager1 := Teamset[TeamIndex].ScoreManager):
#("Score 1 {ScoreManager1.GetCurrentScore(Agent)}")
var nextcash: int = AgentStats.GetCashpersecond()
AgentStats.SetActiveCash(nextcash+StartingCash)
#("End starting cash is {AgentStats.GetActiveCash()}")
ScoreManager1.SetScoreAward(Value:int = AgentStats.GetActiveCash()) #Set the Backend score to the genuine player claimable score.
set StartingCash = 0
var DisplayedScore: int = AgentStats.GetActiveCash()
set DisplayedScore = AgentStats.GetActiveCash()
if(Suffix := GetSuffix[DisplayedScore]):
if(Emoji := Teamset[TeamIndex].CoinEmoji):
ConvertedScore := GetDivisor(DisplayedScore)
CashDisplay1.SetText(StringToMessage("{Emoji}{ConvertedScore}{Suffix}"))
spawn:
BasePurchaseChecker()
if(ClaimVFX := Teamset[TeamIndex].BaseClaimerVFX):
ClaimVFX.Disable()
var cps: int = AgentStats.GetCustompersecond()
AgentStats.AddCustommoney(Agent, cps)
Sleep(0.99)
else:
BaseClaimer.Enable()
AgentStats.ResetCashPerSecond()
AgentStats.SetActiveCash(0)
CashDisplay1.SetText(StringToMessage("{0}"))
if(ScoreManager1 := Teamset[TeamIndex].ScoreManager):
var ResetScore: int = ScoreManager1.GetCurrentScore(Agent)
set ResetScore = ResetScore - ResetScore - ResetScore
ScoreManager1.SetScoreAward(ResetScore)
ScoreManager1.Activate(Agent)
ScoreManager1.SetScoreAward(Value:int = 0)
if(ClaimVFX := Teamset[TeamIndex].BaseClaimerVFX):
ClaimVFX.Enable()
break
AgentStats.NowOwnsBase()
AssignUI(Agent:agent):void=
MyCanvas:=MakeScoreCanvas(Agent)
MyCanvas1:=MakeRebirthCanvas(Agent)
MyCanvas2:=MakeSPCanvas(Agent)
MyCanvas3:=MakeCustomCanvas(Agent)
if:
PlayerUI:=GetPlayerUI[player[Agent]]
then:
PlayerUI.AddWidget(MyCanvas)
PlayerUI.AddWidget(MyCanvas1)
PlayerUI.AddWidget(MyCanvas2)
PlayerUI.AddWidget(MyCanvas3)
spawn:
RefreshUI(Agent)
RefreshUI(Agent:agent)<suspends>:void=
if(ScoreBlock := PlayerScore[Agent]?):
if(RebirthBlock := PlayerRebirths[Agent]?):
if(ScorePSBlock := ScorePS[Agent]?):
if(CustomBlock := CustomizableCoin[Agent]?):
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
loop:
if(ScoreManager := Teamset[TeamNumber].ScoreManager):
var ScoreS: int = AgentStats.GetCashpersecond()
set ScoreS *= AgentStats.GetIndexValue()
var Rebirths: float = AgentStats.GetRebirths()
var RoundedRebirths: int = 0
var Score: int = ScoreManager.GetCurrentScore(Agent)
var CustomScoreValue: int = 5
set CustomScoreValue = AgentStats.GetCustomMoney()
set Score = ScoreManager.GetCurrentScore(Agent)
var FloatConverter: float = 1.0
if(Suffix := GetSuffix[Score]):
ConvertedScore := GetDivisor(Score)
if(ScoreSSuffix := GetSuffix[ScoreS]):
ConvertedScoreS := GetDivisor(ScoreS)
if(CustomCoin := Teamset[TeamNumber].CoinName):
if(CustomEmoji := Teamset[TeamNumber].CoinEmoji):
if(set RoundedRebirths = Round[Rebirths]):
ScorePSBlock.SetText(StringToMessage("{CustomEmoji}{CustomCoin} /s: {ConvertedScoreS}{ScoreSSuffix}{CustomEmoji}")) #(Custom Emoji name) then per second, then the converted user score, its associated suffix, and the end emoji.
RebirthBlock.SetText(StringToMessage(""))
ScoreBlock.SetText(StringToMessage("{CustomEmoji}{CustomCoin}: {ConvertedScore}{Suffix}{CustomEmoji}")) #ToTruncatedString is a UGC function conversion
if(CustomScore := Teamset[TeamNumber].CustomizableCurrency):
if(CustomScore.ShowOnHud = true):
var CustomName: string = CustomScore.UnPlurralName
var Emoji: string = CustomScore.Emoji
if(Suffix2 := GetSuffix[CustomScoreValue]):
ConvertedScore2 := GetDivisor(CustomScoreValue)
if(TextColor := Teamset[TeamNumber].CustomizableCurrency.Text_Color):
CustomBlock.SetTextColor(TextColor)
CustomBlock.SetText(StringToMessage("{Emoji}{CustomName}: {ConvertedScore2}{Suffix2}{Emoji}")) #ToTruncatedString is a UGC function conversion
else:
Print("Show on hud false")
Sleep(0.05)
MakeScoreCanvas(Agent:agent):canvas=
ScoreBlock:=text_block:
DefaultTextColor:=LightGreen
if(set PlayerScore[Agent] = option{ScoreBlock}){}
ScoreBlockCanvas:=canvas:
Slots:=array:
canvas_slot:
Widget:=ScoreBlock
Anchors:=anchors{Minimum:=vector2{X:=0.0, Y:=0.0}, Maximum:=vector2{X:=1.0, Y:=1.0}}
Offsets:=margin{Left:= 36.0, Top:= 320.0, Right:= 1720.0, Bottom:= 720.0}
return ScoreBlockCanvas
MakeRebirthCanvas(Agent:agent):canvas=
ScoreBlock:=text_block:
DefaultTextColor:=Blue
if(set PlayerRebirths[Agent] = option{ScoreBlock}){}
ScoreBlockCanvas:=canvas:
Slots:=array:
canvas_slot:
Widget:=ScoreBlock
Anchors:=anchors{Minimum:=vector2{X:=0.0, Y:=0.0}, Maximum:=vector2{X:=1.0, Y:=1.0}}
Offsets:=margin{Left:= 36.0, Top:= 420.0, Right:= 1720.0, Bottom:= 620.0}
return ScoreBlockCanvas
MakeSPCanvas(Agent:agent):canvas=
ScoreBlock:=text_block:
DefaultTextColor:=Yellow
if(set ScorePS[Agent] = option{ScoreBlock}){}
ScoreBlockCanvas:=canvas:
Slots:=array:
canvas_slot:
Widget:=ScoreBlock
Anchors:=anchors{Minimum:=vector2{X:=0.0, Y:=0.0}, Maximum:=vector2{X:=1.0, Y:=1.0}}
Offsets:=margin{Left:= 36.0, Top:= 420.0, Right:= 1720.0, Bottom:= 620.0}
return ScoreBlockCanvas
MakeCustomCanvas(Agent:agent):canvas=
ScoreBlock:=text_block:
if(set CustomizableCoin[Agent] = option{ScoreBlock}){}
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
if(TextColor := Teamset[TeamNumber].CustomizableCurrency.Text_Color):
DefaultTextColor:=Gold
ScoreBlockCanvas:=canvas:
Slots:=array:
canvas_slot:
Widget:=ScoreBlock
Anchors:=anchors{Minimum:=vector2{X:=0.0, Y:=0.0}, Maximum:=vector2{X:=1.0, Y:=1.0}}
Offsets:=margin{Left:= 36.0, Top:= 520.0, Right:= 1720.0, Bottom:= 520.0}
return ScoreBlockCanvas
BasePurchaseChecker()<suspends>:void=
var CashPerSecond: int = 1
#("Sleeping")
Sleep(1.0)
#("Finished Sleeping")
#("ScoreIncreasingBegun")
var Teams : []team = array{}
set Teams = GetPlayspace().GetTeamCollection().GetTeams()
var TeamIndex: int = 0
var RunOnce: int = 0
#(" Team Index {TeamIndex}")
#("disabled")
var CanRun: logic = true
Players:=GetPlayspace().GetPlayers()
for (Player : Players):
if(PlayerTeam := GetPlayspace().GetTeamCollection().GetTeam[Player]):
if(Agent:agent = agent[Player]):
if(PlayerOBJ := player[Player]):
if(AgentStats := AllPlayersMap[Agent]):
for(ItemCount := 0..Teamset[TeamIndex].Purchaseables.Length - 1): #Find the index of the mutator zone'
#("Item Count: {ItemCount}")
if (OnBought := Teamset[TeamIndex].Purchaseables[ItemCount].buttonzone):
OnBought.AgentEntersEvent.SubscribeAgent(AgentStats.AddMutatedIndex, ItemCount) #Send off the index of the mutator zone
Sleep(0.25)
OnBought.AgentEntersEvent.Subscribe(ItemBought)
for(ItemCount2 := 0..Teamset[TeamIndex].Droppers.Length - 1): #Find the index of the mutator zone
if (OnBought2 := Teamset[TeamIndex].Droppers[ItemCount2].buttonzone):
OnBought2.AgentEntersEvent.SubscribeAgent(AgentStats.AddMutatedIndex, ItemCount2) #Send off the index of the mutator zone
Sleep(0.25)
OnBought2.AgentEntersEvent.Subscribe(DropperBought)
for(ItemCount3 := 0..Teamset[TeamIndex].CustomizableCurrency.Computers.Length - 1): #Find the index of the mutator zone
if (OnBought3 := Teamset[TeamIndex].CustomizableCurrency.Computers[ItemCount3].buttonzone):
OnBought3.AgentEntersEvent.SubscribeAgent(AgentStats.AddMutatedIndex, ItemCount3) #Send off the index of the mutator zone
Sleep(0.25)
OnBought3.AgentEntersEvent.SubscribeAgent(ComputerBought, ItemCount3)
for(ItemCount4 := 0..Teamset[TeamIndex].CustomizableCurrency.DamagedAdder.Length - 1): #Find the index of the mutator zone
if (OnBought4 := Teamset[TeamIndex].CustomizableCurrency.DamagedAdder[ItemCount4].buttonzone):
OnBought4.AgentEntersEvent.SubscribeAgent(AgentStats.AddMutatedIndex, ItemCount4) #Send off the index of the mutator zone
Sleep(0.25)
OnBought4.AgentEntersEvent.SubscribeAgent(BreakBought, ItemCount4)
for(ItemCount5 := 0..Teamset[TeamIndex].CustomizableCurrency.Cannons.Length - 1): #Find the index of the mutator zone
if (OnBought5 := Teamset[TeamIndex].CustomizableCurrency.Cannons[ItemCount5].buttonzone):
OnBought5.AgentEntersEvent.SubscribeAgent(AgentStats.AddMutatedIndex, ItemCount5) #Send off the index of the mutator zone
Sleep(0.25)
OnBought5.AgentEntersEvent.SubscribeAgent(CannonBought, ItemCount5)
for(ItemCount6 := 0..Teamset[TeamIndex].CustomizableCurrency.Pets.Length - 1): #Find the index of the mutator zone
if (OnBought5 := Teamset[TeamIndex].CustomizableCurrency.Pets[ItemCount6].buttonzone):
OnBought5.AgentEntersEvent.SubscribeAgent(AgentStats.AddMutatedIndex, ItemCount6) #Send off the index of the mutator zone
Sleep(0.25)
OnBought5.AgentEntersEvent.SubscribeAgent(PetBought, ItemCount6)
var PCCount: int = AgentStats.GetPCIndex()
#Sleep will get bypassed on the event a purchase is triggered. This sleep simply updates the players & teams associated every 25s.
Cashclaim(Agent : agent):void=
#("CashClaimed beghun")
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
if(ScoreManager := Teamset[TeamNumber].ScoreManager):
ScoreManager.Activate(Agent)
ScoreManager.SetScoreAward(Value:int = 0)
AgentStats.ResetActiveCash()
if(CashDisplay := Teamset[TeamNumber].CashDisplay):
CashDisplay.SetText(StringToMessage("0"))
if(CashClaimSFX := Teamset[TeamNumber].CashClaimSFX):
CashClaimSFX.Play(Agent)
Print("Cash Claim")
ItemBought(Agent : agent):void=
Print("Item bought")
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Scored {TeamNumber}")
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
var pastcashpersecond: int = AgentStats.GetCashpersecond() #Gets the past value of cash per second
var ItemCount: int = AgentStats.GetMutatedIndex() #Find the index of the item a user walked into
#("Item Count from Mutated index is {ItemCount}")
if(Teamset[TeamNumber].IsActive = false):
if(TypePrice := Teamset[TeamNumber].Purchaseables[ItemCount].Cost_Type):
if(TypePrice = CoinType.DefaultCoin):
if (Price := Teamset[TeamNumber].Purchaseables[ItemCount].Cost):
if(PurchaseManager := Teamset[TeamNumber].PurchaseManager):
if(PurchaseManager.GetCurrentScore(Agent) >= Price):
PurchaseManager.SetScoreAward(Value:int = Price - Price - Price) #Subtract a player money by the price of the item
if(XP := Teamset[TeamNumber].Purchaseables[ItemCount].XP):
XP.Award(Agent)
if(Weight := Teamset[TeamNumber].Purchaseables[ItemCount].Weight):
AgentStats.SetPurchaseWeight(Weight)
#("Score award {PurchaseManager.GetScoreAward()}")
PurchaseManager.Activate(Agent)
for(PropCount -> Indexed : Teamset[TeamNumber].Purchaseables[ItemCount].Props): #Gets all props
if (Prop := Teamset[TeamNumber].Purchaseables[ItemCount].Props[PropCount].Prop):
if(PurchaseSFX := Teamset[TeamNumber].Purchaseables[ItemCount].PurchaseSFX):
PurchaseSFX.Play(Agent)
if(Prop.IsValid[]):
Prop.Show()
if(Teamset[TeamNumber].Purchaseables[ItemCount].ECC = false):
spawn:
MoveProp(Prop)
if(Teamset[TeamNumber].Purchaseables[ItemCount].ECC = true):
spawn:
ECCMoveProp(TeamNumber, ItemCount, PropCount)
if (Buttonzone := Teamset[TeamNumber].Purchaseables[ItemCount].buttonzone):
Buttonzone.Disable()
if(CostButton := Teamset[TeamNumber].Purchaseables[ItemCount].costdisplay):
CostButton.HideText()
if (BuyVFX := Teamset[TeamNumber].Purchaseables[ItemCount].BuyVFX):
BuyVFX.Disable()
if (Dependent := Teamset[TeamNumber].Purchaseables[ItemCount].Dependent.buttonzone):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].Purchaseables[ItemCount].Dependent.BuyVFX):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].Purchaseables[ItemCount].Dependent2.buttonzone):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].Purchaseables[ItemCount].Dependent2.BuyVFX):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].Purchaseables[ItemCount].PurchasedVFX1):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].Purchaseables[ItemCount].PurchasedVFX2):
Dependent.Enable()
if (Dependent := Teamset[Teamswap].Purchaseables[ItemCount].Dependent.CostDisplay):
Dependent.ShowText()
if (Dependent := Teamset[Teamswap].Purchaseables[ItemCount].Dependent2.CostDisplay):
Dependent.ShowText()
Print("Item Bought")
if (Dependent := Teamset[Teamswap].Purchaseables[ItemCount].costdisplay):
Dependent.HideText()
#("{pastcashpersecond}Past cash Per second") #Checks current Cash per second
if(set Teamset[TeamNumber].IsActive = true){}
spawn:
DebounceIsActive(Agent)
if(Rewards := Teamset[TeamNumber].Purchaseables[ItemCount].Reward_Type):
if(Rewards = CoinType.DefaultCoin):
loop:
var currentCashpersecond: int = AgentStats.GetCashpersecond()
if(WantedCashpersecond := Teamset[TeamNumber].Purchaseables[ItemCount].AddCashpersecond):
if(currentCashpersecond >= WantedCashpersecond+pastcashpersecond): #Checks if the active cash per second is equal to how much it should be for the prop + how much it used to be
#("Current CPS {currentCashpersecond}")
#("Needed CPS {WantedCashpersecond}")
break
else()
AgentStats.IncreaseCashpersecond()
else if(Rewards := Teamset[TeamNumber].Purchaseables[ItemCount].Reward_Type):
if(Rewards = CoinType.CustomCoin):
if(WantedCashpersecond := Teamset[TeamNumber].Purchaseables[ItemCount].AddCashpersecond):
AgentStats.AddCustompersecond(Agent, WantedCashpersecond)
else:
if(PurchaseManagers := Teamset[TeamNumber].PurchaseManager):
var MoneyNeed: int = Price - PurchaseManagers.GetCurrentScore(Agent)
if(HudMessageManager := Teamset[TeamNumber].HudMessageManager):
if(Suffix := GetSuffix[MoneyNeed]):
ConvertedScore := GetDivisor(MoneyNeed)
if(Emoji := Teamset[TeamNumber].CoinEmoji):
HudMessageManager.SetText(StringToMessage("You do not have enough money to buy this. You need {Emoji}{ConvertedScore}{Suffix} more!"))
HudMessageManager.Show(Agent)
#("Not Enough Money")
if(TypePrice = CoinType.CustomCoin):
if (Price := Teamset[TeamNumber].Purchaseables[ItemCount].Cost):
var CustomScoreValue: int = AgentStats.GetCustomMoney()
if(CustomScoreValue >= Price):
if(XP := Teamset[TeamNumber].Purchaseables[ItemCount].XP):
XP.Award(Agent)
if(Weight := Teamset[TeamNumber].Purchaseables[ItemCount].Weight):
AgentStats.SetPurchaseWeight(Weight)
AgentStats.RemoveCustomMoney(Agent, Price)
for(PropCount := 0..Teamset[TeamNumber].Purchaseables[ItemCount].Props.Length - 1):
if (Prop := Teamset[TeamNumber].Purchaseables[ItemCount].Props[PropCount].Prop):
if(PurchaseSFX := Teamset[TeamNumber].Purchaseables[ItemCount].PurchaseSFX):
PurchaseSFX.Play(Agent)
if(Prop.IsValid[]):
Prop.Show()
if(Teamset[TeamNumber].Purchaseables[ItemCount].ECC = false):
spawn:
MoveProp(Prop)
if(Teamset[TeamNumber].Purchaseables[ItemCount].ECC = true):
spawn:
ECCMoveProp(TeamNumber, ItemCount, PropCount)
Print("ECC is true")
if (Buttonzone := Teamset[TeamNumber].Purchaseables[ItemCount].buttonzone):
Buttonzone.Disable()
if(CostButton := Teamset[TeamNumber].Purchaseables[ItemCount].costdisplay):
CostButton.HideText()
if (BuyVFX := Teamset[TeamNumber].Purchaseables[ItemCount].BuyVFX):
Print("Item count{ItemCount}")
Print("Team Number{TeamNumber}")
BuyVFX.Disable()
if (Dependent := Teamset[TeamNumber].Purchaseables[ItemCount].Dependent.buttonzone):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].Purchaseables[ItemCount].Dependent.BuyVFX):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].Purchaseables[ItemCount].Dependent2.buttonzone):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].Purchaseables[ItemCount].Dependent2.BuyVFX):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].Purchaseables[ItemCount].PurchasedVFX1):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].Purchaseables[ItemCount].PurchasedVFX2):
Dependent.Enable()
if (Dependent := Teamset[Teamswap].Purchaseables[ItemCount].Dependent.CostDisplay):
Dependent.ShowText()
if (Dependent := Teamset[Teamswap].Purchaseables[ItemCount].Dependent2.CostDisplay):
Dependent.ShowText()
Print("Item Bought")
if (Dependent := Teamset[Teamswap].Purchaseables[ItemCount].costdisplay):
Dependent.HideText()
if (Trigger := Teamset[Teamswap].Purchaseables[ItemCount].Signaler):
Trigger.Trigger(Agent)
#("{pastcashpersecond}Past cash Per second") #Checks current Cash per second
if(set Teamset[TeamNumber].IsActive = true){}
spawn:
DebounceIsActive(Agent)
if(Rewards := Teamset[TeamNumber].Purchaseables[ItemCount].Reward_Type):
if(Rewards = CoinType.DefaultCoin):
loop:
var currentCashpersecond: int = AgentStats.GetCashpersecond()
if(WantedCashpersecond := Teamset[TeamNumber].Purchaseables[ItemCount].AddCashpersecond):
if(currentCashpersecond >= WantedCashpersecond+pastcashpersecond): #Checks if the active cash per second is equal to how much it should be for the prop + how much it used to be
#("Current CPS {currentCashpersecond}")
#("Needed CPS {WantedCashpersecond}")
break
else()
AgentStats.IncreaseCashpersecond()
else if(Rewards := Teamset[TeamNumber].Purchaseables[ItemCount].Reward_Type):
if(Rewards = CoinType.CustomCoin):
if(WantedCashpersecond := Teamset[TeamNumber].Purchaseables[ItemCount].AddCashpersecond):
AgentStats.AddCustompersecond(Agent, WantedCashpersecond)
else:
var MoneyNeed: int = Price - CustomScoreValue
if(HudMessageManager := Teamset[TeamNumber].HudMessageManager):
if(Suffix := GetSuffix[MoneyNeed]):
ConvertedScore := GetDivisor(MoneyNeed)
if(Emoji := Teamset[TeamNumber].CustomizableCurrency.Emoji):
HudMessageManager.SetText(StringToMessage("You do not have enough money to buy this. You need {Emoji}{ConvertedScore}{Suffix} more!"))
HudMessageManager.Show(Agent)
#("Not Enough Money")
else:
BreakBought(Agent : agent, Index: int):void=
Print("Item bought")
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Scored {TeamNumber}")
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
var pastcashpersecond: int = AgentStats.GetCashpersecond() #Gets the past value of cash per second
var ItemCount: int = AgentStats.GetMutatedIndex() #Find the index of the item a user walked into
#("Item Count from Mutated index is {ItemCount}")
if(Teamset[TeamNumber].IsActive = false):
if(TypePrice := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].Cost_Type):
if(TypePrice = CoinType.DefaultCoin):
if (Price := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].Cost):
if(PurchaseManager := Teamset[TeamNumber].PurchaseManager):
if(PurchaseManager.GetCurrentScore(Agent) >= Price):
PurchaseManager.SetScoreAward(Value:int = Price - Price - Price) #Subtract a player money by the price of the item
#("Score award {PurchaseManager.GetScoreAward()}")
PurchaseManager.Activate(Agent)
for(PropCount := 0..Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].Props.Length - 1):
if (Prop := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].Props[PropCount].Prop):
if(PurchaseSFX := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].PurchaseSFX):
PurchaseSFX.Play(Agent)
if(Prop.IsValid[]):
Prop.Show()
spawn:
MoveProp(Prop)
if (Buttonzone := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].buttonzone):
Buttonzone.Disable()
if(CostButton := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].costdisplay):
CostButton.HideText()
if (BuyVFX := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].BuyVFX):
BuyVFX.Disable()
if (Trigger := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].PropManipulator):
Trigger.Enable()
Trigger.DamagedEvent.SubscribeAgent(Shot, ItemCount)
if (Dependent := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].Dependent.buttonzone):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].Dependent.BuyVFX):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].PurchasedVFX1):
Dependent.Enable()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.DamagedAdder[ItemCount].Dependent.CostDisplay):
Dependent.ShowText()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.DamagedAdder[ItemCount].costdisplay):
Dependent.HideText()
#("{pastcashpersecond}Past cash Per second") #Checks current Cash per second
if(set Teamset[TeamNumber].IsActive = true){}
spawn:
DebounceIsActive(Agent)
else:
if(PurchaseManagers := Teamset[TeamNumber].PurchaseManager):
var MoneyNeed: int = Price - PurchaseManagers.GetCurrentScore(Agent)
if(HudMessageManager := Teamset[TeamNumber].HudMessageManager):
if(Suffix := GetSuffix[MoneyNeed]):
ConvertedScore := GetDivisor(MoneyNeed)
if(Emoji := Teamset[TeamNumber].CoinEmoji):
HudMessageManager.SetText(StringToMessage("You do not have enough money to buy this. You need {Emoji}{ConvertedScore}{Suffix} more!"))
HudMessageManager.Show(Agent)
#("Not Enough Money")
if(TypePrice = CoinType.CustomCoin):
if (Price := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].Cost):
var CustomScoreValue: int = AgentStats.GetCustomMoney()
if(CustomScoreValue >= Price):
AgentStats.RemoveCustomMoney(Agent, Price)
for(PropCount := 0..Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].Props.Length - 1):
if (Prop := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].Props[PropCount].Prop):
if(PurchaseSFX := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].PurchaseSFX):
PurchaseSFX.Play(Agent)
if(Prop.IsValid[]):
Prop.Show()
spawn:
MoveProp(Prop)
if (Buttonzone := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].buttonzone):
Buttonzone.Disable()
if(CostButton := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].costdisplay):
CostButton.HideText()
if (BuyVFX := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].BuyVFX):
BuyVFX.Disable()
if (Trigger := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].PropManipulator):
Trigger.Enable()
Trigger.DamagedEvent.SubscribeAgent(Shot, ItemCount)
if (Dependent := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].Dependent.buttonzone):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].Dependent.BuyVFX):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[ItemCount].PurchasedVFX1):
Dependent.Enable()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.DamagedAdder[ItemCount].Dependent.CostDisplay):
Dependent.ShowText()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.DamagedAdder[ItemCount].costdisplay):
Dependent.HideText()
#("{pastcashpersecond}Past cash Per second") #Checks current Cash per second
if(set Teamset[TeamNumber].IsActive = true){}
spawn:
DebounceIsActive(Agent)
else:
var MoneyNeed: int = Price - CustomScoreValue
if(HudMessageManager := Teamset[TeamNumber].HudMessageManager):
if(Suffix := GetSuffix[MoneyNeed]):
ConvertedScore := GetDivisor(MoneyNeed)
if(Emoji := Teamset[TeamNumber].CustomizableCurrency.Emoji):
HudMessageManager.SetText(StringToMessage("You do not have enough money to buy this. You need {Emoji}{ConvertedScore}{Suffix} more!"))
HudMessageManager.Show(Agent)
#("Not Enough Money")
else:
ComputerBought(Agent : agent, Index: int):void=
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Scored {TeamNumber}")
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
var pastcashpersecond: int = AgentStats.GetCustompersecond() #Gets the past value of cash per second
var ItemCount: int = AgentStats.GetMutatedIndex() #Find the index of the item a user walked into
#("Item Count from Mutated index is {ItemCount}")
if(Teamset[TeamNumber].IsActive = false):
if(set Teamset[TeamNumber].IsActive = true){}
spawn:
DebounceIsActive(Agent)
if (Price := Teamset[TeamNumber].CustomizableCurrency.Computers[ItemCount].Cost):
Print("Recieved pc index is {Index}")
if(PurchaseManager := Teamset[TeamNumber].PurchaseManager):
if(PurchaseManager.GetCurrentScore(Agent) >= Price):
PurchaseManager.SetScoreAward(Value:int = Price - Price - Price) #Subtract a player money by the price of the item
Print("Recieved pc index 2 is {Index}")
AgentStats.AddPCIndex(Agent, Index)
#("Score award {PurchaseManager.GetScoreAward()}")
PurchaseManager.Activate(Agent) #Subtract a player money by the price of the item
if (Dependent := Teamset[Teamswap].CustomizableCurrency.EnterMutator):
Dependent.Enable()
if(BillboardDisplay := Teamset[Teamswap].CustomizableCurrency.CashSDisplay):
BillboardDisplay.ShowText()
for(PropCount -> Indexed : Teamset[TeamNumber].CustomizableCurrency.Computers[ItemCount].Props):
Print("popping")
if (Prop := Teamset[TeamNumber].CustomizableCurrency.Computers[ItemCount].Props[PropCount].Prop):
if(PurchaseSFX := Teamset[TeamNumber].CustomizableCurrency.Computers[ItemCount].PurchaseSFX):
PurchaseSFX.Play(Agent)
if(Prop.IsValid[]):
Prop.Show()
spawn:
MoveProp(Prop)
if (Buttonzone := Teamset[TeamNumber].CustomizableCurrency.Computers[ItemCount].buttonzone):
Buttonzone.Disable()
if(CostButton := Teamset[TeamNumber].CustomizableCurrency.Computers[ItemCount].costdisplay):
CostButton.HideText()
if (BuyVFX := Teamset[TeamNumber].CustomizableCurrency.Computers[ItemCount].BuyVFX):
Print("Item count{ItemCount}")
Print("Team Number{TeamNumber}")
BuyVFX.Disable()
if (Dependent := Teamset[TeamNumber].CustomizableCurrency.Computers[ItemCount].Dependent.buttonzone):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].CustomizableCurrency.Computers[ItemCount].Dependent.BuyVFX):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].CustomizableCurrency.Computers[ItemCount].PurchasedVFX1):
Dependent.Enable()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.Computers[ItemCount].Dependent.CostDisplay):
Dependent.ShowText()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.Computers[ItemCount].costdisplay):
Dependent.HideText()
#("{pastcashpersecond}Past cash Per second") #Checks current Cash per second
else:
if(PurchaseManagers := Teamset[TeamNumber].PurchaseManager):
var MoneyNeed: int = Price - PurchaseManagers.GetCurrentScore(Agent)
if(HudMessageManager := Teamset[TeamNumber].HudMessageManager):
if(Suffix := GetSuffix[MoneyNeed]):
ConvertedScore := GetDivisor(MoneyNeed)
if(Emoji := Teamset[TeamNumber].CoinEmoji):
HudMessageManager.SetText(StringToMessage("You do not have enough money to buy this. You need {Emoji}{ConvertedScore}{Suffix} more!"))
HudMessageManager.Show(Agent)
#("Not Enough Money")
CannonBought(Agent: agent, Index:int):void=
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Scored {TeamNumber}")
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
var pastcashpersecond: int = AgentStats.GetCashpersecond() #Gets the past value of cash per second
var ItemCount: int = AgentStats.GetMutatedIndex() #Find the index of the item a user walked into
#("Item Count from Mutated index is {ItemCount}")]
Print("Hi")
if(Teamset[TeamNumber].IsActive = false):
Print("Doing")
if(set Teamset[TeamNumber].IsActive = true){}
spawn:
DebounceIsActive(Agent)
if (Price := Teamset[TeamNumber].CustomizableCurrency.Cannons[ItemCount].Cost):
if(PurchaseManager := Teamset[TeamNumber].PurchaseManager):
if(PurchaseManager.GetCurrentScore(Agent) >= Price):
PurchaseManager.SetScoreAward(Value:int = Price - Price - Price)
AgentStats.SetCannonIndex(Index)
for(PropCount := 0..Teamset[TeamNumber].CustomizableCurrency.Cannons[ItemCount].Props.Length - 1):
if (Prop := Teamset[TeamNumber].CustomizableCurrency.Cannons[ItemCount].Props[PropCount].Prop):
if(PurchaseSFX := Teamset[TeamNumber].CustomizableCurrency.Cannons[ItemCount].PurchaseSFX):
PurchaseSFX.Play(Agent)
if(Prop.IsValid[]):
Prop.Show()
spawn:
MoveProp(Prop)
if (Buttonzone := Teamset[TeamNumber].CustomizableCurrency.Cannons[ItemCount].buttonzone):
Buttonzone.Disable()
if(CostButton := Teamset[TeamNumber].CustomizableCurrency.Cannons[ItemCount].costdisplay):
CostButton.HideText()
if(Button := Teamset[TeamNumber].CustomizableCurrency.Cannons[ItemCount].Button):
Button.Enable()
spawn:
AsyncCannonFunction(Agent)
if (BuyVFX := Teamset[TeamNumber].CustomizableCurrency.Cannons[ItemCount].BuyVFX):
Print("Item count{ItemCount}")
Print("Team Number{TeamNumber}")
BuyVFX.Disable()
if (Dependent := Teamset[TeamNumber].CustomizableCurrency.Cannons[ItemCount].Dependent.buttonzone):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].CustomizableCurrency.Cannons[ItemCount].Dependent.BuyVFX):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].CustomizableCurrency.Cannons[ItemCount].PurchasedVFX1):
Dependent.Enable()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.Cannons[ItemCount].Dependent.CostDisplay):
Dependent.ShowText()
Print("Item Bought")
if (Dependent := Teamset[Teamswap].CustomizableCurrency.Cannons[ItemCount].costdisplay):
Dependent.HideText()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.Cannons[ItemCount].DependentDisplay):
Dependent.ShowText()
#("{pastcashpersecond}Past cash Per second") #Checks current Cash per second
if(set Teamset[TeamNumber].IsActive = true){}
spawn:
DebounceIsActive(Agent)
else:
if(PurchaseManagers := Teamset[TeamNumber].PurchaseManager):
var MoneyNeed: int = Price - PurchaseManagers.GetCurrentScore(Agent)
if(HudMessageManager := Teamset[TeamNumber].HudMessageManager):
if(Suffix := GetSuffix[MoneyNeed]):
ConvertedScore := GetDivisor(MoneyNeed)
if(Emoji := Teamset[TeamNumber].CoinEmoji):
HudMessageManager.SetText(StringToMessage("You do not have enough money to buy this. You need {Emoji}{ConvertedScore}{Suffix} more!"))
HudMessageManager.Show(Agent)
PetBought(Agent: agent, Index:int):void=
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Scored {TeamNumber}")
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
var pastcashpersecond: int = AgentStats.GetCashpersecond() #Gets the past value of cash per second
var ItemCount: int = AgentStats.GetMutatedIndex() #Find the index of the item a user walked into
#("Item Count from Mutated index is {ItemCount}")]
if(Teamset[TeamNumber].IsActive = false):
if(set Teamset[TeamNumber].IsActive = true){}
spawn:
DebounceIsActive(Agent)
if (Price := Teamset[TeamNumber].CustomizableCurrency.Pets[ItemCount].Cost):
if(PurchaseManager := Teamset[TeamNumber].PurchaseManager):
if(PurchaseManager.GetCurrentScore(Agent) >= Price):
PurchaseManager.SetScoreAward(Value:int = Price - Price - Price)
for(PropCount := 0..Teamset[TeamNumber].CustomizableCurrency.Pets[ItemCount].UnlockableProps.Length - 1):
if (Prop := Teamset[TeamNumber].CustomizableCurrency.Pets[ItemCount].UnlockableProps[PropCount].Prop):
if(PurchaseSFX := Teamset[TeamNumber].CustomizableCurrency.Pets[ItemCount].PurchaseSFX):
PurchaseSFX.Play(Agent)
if(Prop.IsValid[]):
Prop.Show()
spawn:
MoveProp(Prop)
if (Buttonzone := Teamset[TeamNumber].CustomizableCurrency.Pets[ItemCount].buttonzone):
Buttonzone.Disable()
if(CostButton := Teamset[TeamNumber].CustomizableCurrency.Pets[ItemCount].costdisplay):
CostButton.HideText()
if(Button := Teamset[TeamNumber].CustomizableCurrency.Pets[ItemCount].Button):
Button.Enable()
Button.InteractedWithEvent.SubscribeAgent(EquipPet, ItemCount)
if (BuyVFX := Teamset[TeamNumber].CustomizableCurrency.Pets[ItemCount].BuyVFX):
Print("Item count{ItemCount}")
Print("Team Number{TeamNumber}")
BuyVFX.Disable()
if (Dependent := Teamset[TeamNumber].CustomizableCurrency.Pets[ItemCount].Dependent.buttonzone):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].CustomizableCurrency.Pets[ItemCount].Dependent.BuyVFX):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].CustomizableCurrency.Pets[ItemCount].PurchasedVFX1):
Dependent.Enable()
if (Dependent := Teamset[Teamswap].CustomizableCurrency.Pets[ItemCount].Dependent.CostDisplay):
Dependent.ShowText()
Print("Item Bought")
if (Dependent := Teamset[Teamswap].CustomizableCurrency.Pets[ItemCount].costdisplay):
Dependent.HideText()
#("{pastcashpersecond}Past cash Per second") #Checks current Cash per second
if(set Teamset[TeamNumber].IsActive = true){}
spawn:
DebounceIsActive(Agent)
else:
if(PurchaseManagers := Teamset[TeamNumber].PurchaseManager):
var MoneyNeed: int = Price - PurchaseManagers.GetCurrentScore(Agent)
if(HudMessageManager := Teamset[TeamNumber].HudMessageManager):
if(Suffix := GetSuffix[MoneyNeed]):
ConvertedScore := GetDivisor(MoneyNeed)
if(Emoji := Teamset[TeamNumber].CoinEmoji):
HudMessageManager.SetText(StringToMessage("You do not have enough money to buy this. You need {Emoji}{ConvertedScore}{Suffix} more!"))
HudMessageManager.Show(Agent)
EquipPet(Agent: agent, ItemCount: int):void=
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Scored {TeamNumber}")
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
if (Multi := Teamset[TeamNumber].CustomizableCurrency.Pets[ItemCount].Multiplier):
AgentStats.UpdateMulti(Multi)
for(ActivePetProps := 0..Teamset[TeamNumber].CustomizableCurrency.Pets[ItemCount].PetProps.Length - 1):
if (Prop := Teamset[TeamNumber].CustomizableCurrency.Pets[ItemCount].PetProps[ActivePetProps].Prop): #hides all props associated with pets.
if(Prop.IsValid[]):
Prop.Hide()
AgentStats.UpdatePetIndex(ItemCount)
Print("Starting Async")
spawn:
AsyncPetFollow(Agent, ItemCount+1)
AsyncPetFollow(Agent: agent, Input: int)<suspends>:void=
Indexed: float = Input * 0.32
Sleep(0.1)
Print("in async")
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Scored {TeamNumber}")
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
var Index: int = AgentStats.GetPetIndex()
set Index = AgentStats.GetPetIndex()
if(FortChar: fort_character = Agent.GetFortCharacter[]):
PlayerForward := FortChar.GetViewRotation().GetLocalForward() * 300.0
for(ActivePetProps := 0..Teamset[TeamNumber].CustomizableCurrency.Pets[Index].PetProps.Length - 1):
if (Prop := Teamset[TeamNumber].CustomizableCurrency.Pets[Index].PetProps[ActivePetProps].Prop):
if(Prop.IsValid[]):
Prop.Show()
var Debounce: logic = AgentStats.GetPetDebounce()
if(Debounce = false):
AgentStats.PetDebounceOn()
set AgentStats.UniqueTranslation = FortChar.GetTransform().Translation
loop:
Sleep(0.0)
PlayerPos := FortChar.GetTransform().Translation
DebbyPos := Prop.GetTransform().Translation
PlayerRight := FortChar.GetViewRotation().GetLocalRight()
DistanceFromPlayer := Distance(PlayerPos, DebbyPos)
DirectionDebbyToPlayer := PlayerPos - DebbyPos
Angle := ArcTan(DirectionDebbyToPlayer.X, DirectionDebbyToPlayer.Y)
NewRotation := MakeRotation( vector3{ X := 0.0, Y := 0.0, Z := -1.0} , Angle)
if (DistanceFromPlayer > 195.0):
Time := DistanceFromPlayer / 900.0
Prop.MoveTo(PlayerPos + PlayerRight * Indexed * 195.0, NewRotation, Time)
AsyncCannonFunction(Agent: agent)<suspends>:void=
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Scored {TeamNumber}")
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
var Index: int = AgentStats.GetMutatedIndex()
var CannonIndex: int = 0
loop:
set CannonIndex = AgentStats.GetCannonIndex()
Print("checking")
if(Button := Teamset[TeamNumber].CustomizableCurrency.Cannons[CannonIndex].Button):
Button.InteractedWithEvent.SubscribeAgent(PlayCine, CannonIndex)
Sleep(25.0)
PlayCine(Agent: agent, Index: int):void=
if(CannonDB = false):
set CannonDB = true
Print("recieved index is {Index}")
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
if(Cine := Teamset[TeamNumber].CustomizableCurrency.Cannons[Index].Cinematic):
Cine.Play(Agent)
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
spawn:
Reward(Agent, Index)
Reward(Agent: agent, Index: int)<suspends>:void=
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
if(Cine := Teamset[TeamNumber].CustomizableCurrency.Cannons[Index].Cinematic):
Cine.Play(Agent)
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
var pastcashpersecond: int = AgentStats.GetCashpersecond()
if(Speed := Teamset[TeamNumber].CustomizableCurrency.Cannons[Index].Speed):
if(AnimLength := Teamset[TeamNumber].CustomizableCurrency.Cannons[Index].GrantAt):
var WaitLength: float = AnimLength / Speed
if(Rewards := Teamset[TeamNumber].CustomizableCurrency.Cannons[Index].Reward_Type):
if(Rewards = CoinType.DefaultCoin):
if(Add := Teamset[TeamNumber].CustomizableCurrency.Cannons[Index].Adds):
AgentStats.AddActiveCash(WaitLength, Add)
if(HudMessageManager := Teamset[TeamNumber].HudMessageManager):
if(Suffix := GetSuffix[Add]):
ConvertedScore := GetDivisor(Add)
if(Emoji := Teamset[TeamNumber].CoinEmoji):
HudMessageManager.SetText(StringToMessage("BOOOM 💥 +{Emoji}{ConvertedScore}{Suffix} 💥"))
HudMessageManager.Show(Agent)
Sleep(1.0)
set CannonDB = false
else if(Rewards = CoinType.CustomCoin):
if(Add := Teamset[TeamNumber].CustomizableCurrency.Cannons[Index].Adds):
AgentStats.AddUniquemoney(WaitLength, Add)
if(HudMessageManager := Teamset[TeamNumber].HudMessageManager):
if(Suffix := GetSuffix[Add]):
ConvertedScore := GetDivisor(Add)
if(Emoji := Teamset[TeamNumber].CustomizableCurrency.Emoji):
HudMessageManager.SetText(StringToMessage("BOOOM 💥 +{Emoji}{ConvertedScore}{Suffix} 💥"))
HudMessageManager.Show(Agent)
set CannonDB = false
Sleep(1.0)
BegunPCUse(Agent: agent, Index: int):void=
Print("Begun PC Use")
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
var Debounce: logic = false
set Debounce = AgentStats.GetPCDebounce()
if(Debounce = false):
AgentStats.PCDebounceON()
set AgentStats.CanUse = true
else:
PCCashSIncreaser(Agent: agent)<suspends>:void=
Print("PC Cash Increaser")
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Scored {TeamNumber}")
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
var ItemCount: int = AgentStats.GetPCIndex()
var Sleeper: float = 0.25
loop:
set Sleeper = 0.25
set ItemCount = AgentStats.GetPCIndex()
var UsingPCValue: logic = AgentStats.UsingPCCheck()
var CanUse: logic = AgentStats.CanPlayerUsePC()
set UsingPCValue = AgentStats.UsingPCCheck()
set CanUse = AgentStats.CanPlayerUsePC()
if(UsingPCValue = true and CanUse = true):
if(Cinematic := Teamset[Teamswap].CustomizableCurrency.Cinematic):
if(Speed := Teamset[Teamswap].CustomizableCurrency.Computers[ItemCount].Speed ):
if(AnimSpeed := Teamset[Teamswap].CustomizableCurrency.AnimSpeed):
var Speeds: float = AnimSpeed / Speed
Cinematic.SetPlayRate(Speeds)
set Sleeper = Speed + 0.001
Print("Embedded sleeper is {Sleeper}")
Cinematic.Play(Agent)
Print("Item count is: {ItemCount}")
if(CashPerSecondIncreaser := Teamset[Teamswap].CustomizableCurrency.Computers[ItemCount].IncreasesCustomPerSecondBy):
Print("{CashPerSecondIncreaser}")
AgentStats.AddCustompersecond(Agent, CashPerSecondIncreaser)
if(BillboardDisplay := Teamset[Teamswap].CustomizableCurrency.CashSDisplay):
if(CurrencyName := Teamset[Teamswap].CustomizableCurrency.UnPlurralName):
BillboardDisplay.SetText(StringToMessage("{CurrencyName} Per Second {AgentStats.Custompersecond}"))
else:
if(UsingPCValue = false):
if(CanUse = false):
set UsingPCValue = AgentStats.UsingPCCheck()
set CanUse = AgentStats.CanPlayerUsePC()
if(UsingPCValue = true and CanUse = true):
if(FortniteChar := PlayerOBJ.GetFortCharacter[]):
if(not FortniteChar.IsOnGround[]):
set ItemCount = AgentStats.GetPCIndex()
Print("is in air")
AgentStats.PcDebounceOFF()
ExitedPC(Agent)
if(Teleporter := Teamset[Teamswap].CustomizableCurrency.ExitTP):
Teleporter.Teleport(Agent)
if(Cinematic := Teamset[Teamswap].CustomizableCurrency.Cinematic):
Cinematic.GoToEndAndStop(Agent)
if(Stopping := Teamset[Teamswap].CustomizableCurrency.Hide):
Stopping.Play()
if(Speed := Teamset[Teamswap].CustomizableCurrency.Computers[ItemCount].Speed):
AgentStats.CantUsePC(Speed)
Sleep(Sleeper)
Shot(Agent: agent, Index: int):void=
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Scored {TeamNumber}")
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
if (Give := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[Index].AddsCustom):
AgentStats.AddCustommoney(Agent, Give)
if(HudMessageManager := Teamset[TeamNumber].HudMessageManager):
if(Suffix := GetSuffix[Give]):
ConvertedScore := GetDivisor(Give)
if(Emoji := Teamset[TeamNumber].CoinEmoji):
if(Tagline := Teamset[TeamNumber].CustomizableCurrency.DamagedAdder[Index].Tagline):
HudMessageManager.SetText(StringToMessage("+{Emoji}{ConvertedScore}{Suffix} {Tagline}!!!"))
HudMessageManager.Show(Agent)
ExitedPC(Agent: agent):void=
Print("Exited PC")
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Scored {TeamNumber}")
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
Print("Stopping PC Use")
var ItemCount: int = AgentStats.GetMutatedIndex()
spawn:
AgentStats.StoppedUsingPC()
if(Teleporter := Teamset[Teamswap].CustomizableCurrency.ExitTP):
Teleporter.Teleport(Agent)
if(Cinematic := Teamset[Teamswap].CustomizableCurrency.Cinematic):
Cinematic.GoToEndAndStop(Agent)
if(FortniteChar := PlayerOBJ.GetFortCharacter[]):
FortniteChar.Show()
if(Stopping := Teamset[Teamswap].CustomizableCurrency.Hide):
Stopping.Play()
DebounceIsActive(Agent: agent)<suspends>:void=
Sleep(0.5)
Print("Sleeping")
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Scored {TeamNumber}")
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
if(set Teamset[TeamNumber].IsActive = false){}
DropperBought(Agent : agent):void=
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Scored {TeamNumber}")
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
var pastcashpersecond: int = AgentStats.GetCashpersecond() #Gets the past value of cash per second
var ItemCount: int = AgentStats.GetMutatedIndex() #Find the index of the item a user walked into
#("Item Count from Mutated index is {ItemCount}")
if (Price := Teamset[TeamNumber].Droppers[ItemCount].Cost):
if(PurchaseManager := Teamset[TeamNumber].PurchaseManager):
if(PurchaseManager.GetCurrentScore(Agent) >= Price):
PurchaseManager.SetScoreAward(Value:int = Price - Price - Price) #Subtract a player money by the price of the item
if(Teamset[TeamNumber].IsActive = false):
if(set Teamset[TeamNumber].IsActive = true){}
spawn:
DebounceIsActive(Agent)
#("Score award {PurchaseManager.GetScoreAward()}")
PurchaseManager.Activate(Agent)
for(PropItemCount := 0..Teamset[TeamNumber].Droppers[ItemCount].Props.Length - 1):
if(DropperMain := Teamset[Teamswap].Droppers[ItemCount].Dropper):
if(DropperMain.IsValid[]):
DropperMain.Show() #Hides droppers
if(PurchaseSFX := Teamset[TeamNumber].Droppers[ItemCount].PurchaseSFX):
PurchaseSFX.Play(Agent)
if (Prop := Teamset[TeamNumber].Droppers[ItemCount].Props[PropItemCount].Prop):
if(Prop.IsValid[]):
Prop.Show()
spawn:
MoveDropper(Prop)
if (BuyVFX := Teamset[TeamNumber].Droppers[ItemCount].SetVFX.BuyVFX):
Print("Disabling BuyVFX")
BuyVFX.Disable()
if (Buttonzone := Teamset[TeamNumber].Droppers[ItemCount].buttonzone):
Buttonzone.Disable()
if (Prop := Teamset[TeamNumber].Droppers[ItemCount].DropperTIP):
Prop.Show()
if (Buttonzone := Teamset[TeamNumber].Droppers[ItemCount].buttonzone):
Buttonzone.Disable()
if (Dependent := Teamset[TeamNumber].Droppers[ItemCount].Dependent.buttonzone):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].Droppers[ItemCount].Dependent.BuyVFX):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].Droppers[ItemCount].SetVFX.PurchasedVFX1):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].Droppers[ItemCount].SetVFX.PurchasedVFX2):
Dependent.Enable()
if (Dependent := Teamset[Teamswap].Droppers[ItemCount].Dependent.CostDisplay):
Dependent.ShowText()
if (Dependent := Teamset[Teamswap].Droppers[ItemCount].costdisplay):
Dependent.HideText()
#("{pastcashpersecond}Past cash Per second") #Checks current Cash per second
Print("Dropper Bought")
spawn:
AsyncDropperFunction(Agent)
else:
if(PurchaseManagers := Teamset[TeamNumber].PurchaseManager):
var MoneyNeed: int = Price - PurchaseManagers.GetCurrentScore(Agent)
if(HudMessageManager := Teamset[TeamNumber].HudMessageManager):
if(Suffix := GetSuffix[MoneyNeed]):
ConvertedScore := GetDivisor(MoneyNeed)
if(Emoji := Teamset[TeamNumber].CoinEmoji):
HudMessageManager.SetText(StringToMessage("You do not have enough money to buy this. You need {Emoji}{ConvertedScore}{Suffix}$ more! "))
HudMessageManager.Show(Agent)
AsyncDropperFunction(Agent : agent)<suspends>:void= #Runs dropper script
#("Starting async function")
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Scored {TeamNumber}")
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
var ItemCount: int = AgentStats.GetMutatedIndex()
if(Transform1 := Teamset[TeamNumber].Droppers[ItemCount].DropperTIP.GetTransform()):
Position1 := Transform1.Translation
if(PropAsset := Teamset[TeamNumber].Droppers[ItemCount].Prop):
loop:
if(PositionMiddle := Teamset[TeamNumber].Droppers[ItemCount].ConveyorBaseCords): #Find the player given conveyor cords
if(YPos := Teamset[TeamNumber].Droppers[ItemCount].DropperTIP.GetTransform().Translation.Y): #Find the tip of the droppers location
PositionMid := vector3{X := PositionMiddle.X, Y := YPos, Z := PositionMiddle.Z} #Create a var = a combo of the Player given base cords and the TIP of the dropper
if(Rotation := Teamset[TeamNumber].Droppers[ItemCount].PropRotation):
if(PositionEnd := Teamset[TeamNumber].Droppers[ItemCount].ConveyorEndCords): #Conveyor movement script. - Modify only the last value.
PropAsset.Hide()
MoveResult := PropAsset.MoveTo(Position1, Rotation, 0.5) #TPs the Prop to the dropper
#("Move 1")
Sleep(1.0)
PropAsset.Show()
if(Speed := Teamset[TeamNumber].Droppers[ItemCount].Feather * 1.88):
if(PassiveSFX := Teamset[TeamNumber].Droppers[ItemCount].PassiveSFX):
PassiveSFX.Play(Agent)
MoveResult2 := PropAsset.MoveTo(PositionMid, Rotation, 10.0 / Speed) #Releases prop from dropper
#("Move 2")
Sleep(10.0 / Speed)
if(Speed := Teamset[TeamNumber].Droppers[ItemCount].Feather * 1.88):
if(DropperTipPOS := Teamset[TeamNumber].Droppers[ItemCount].DropperTIP.GetTransform().Translation):
var DistanceBetweenConveyor: float= Distance(DropperTipPOS, PositionEnd)
#("Distance Between: {DistanceBetweenConveyor}")
MoveResult3 := PropAsset.MoveTo(PositionEnd, Rotation, DistanceBetweenConveyor / Speed) #Change this value to less time if you want a faster conveyor, slightly not reccomended due to prop overlap & syncing issues, expirement for yourself.
if(Index := Teamset[TeamNumber].Droppers[ItemCount].CashOnExit):
AgentStats.SetActiveCash(Index) #Update Money on player Class, also sends a function to the score manager to get money from player class and update it.
if(CashDisplay1 := Teamset[TeamNumber].CashDisplay):
var DisplayedCash: int = AgentStats.GetActiveCash()
if(Suffix := GetSuffix[DisplayedCash]):
ConvertedScore := GetDivisor(DisplayedCash)
CashDisplay1.SetText(StringToMessage("{ConvertedScore}{Suffix}")) #Set billboards display to the score managers next granted value
PropAsset.Hide()
else:
break
#("Move 3")
Sleep(1.0)
StringToMessage<localizes>(value:string)<computes> : message = "{value}"
MoveProp(Prop : creative_prop)<suspends>:void=
var PropPosition: vector3 = {(Prop.GetTransform().Translation)}
FinalPropPosition := vector3{X := PropPosition.X, Y := PropPosition.Y, Z := PropPosition.Z - 1000.0}
var PropRotation: rotation = {(Prop.GetTransform().Rotation)}
MoveResult := Prop.MoveTo(FinalPropPosition, PropRotation, 1.2)
if(not MoveResult = move_to_result.DestinationReached):
Print("did not reach end")
if(MoveResult = move_to_result.DestinationReached):
Print("reached end")
if(MoveResult = move_to_result.WillNotReachDestination):
Print("Error Occured")
if(ECC := Prop.TeleportTo[FinalPropPosition, PropRotation]):
ECCMoveProp(TeamNumber: int, ItemCount: int, PropCount: int)<suspends>:void=
Print("ECC MOVE")
if (HasECC := Teamset[TeamNumber].Purchaseables[ItemCount].HasECC):
if(HasECC = true):
if(Teamset[TeamNumber].Purchaseables[ItemCount].DisableECC):
if (Prop := Teamset[TeamNumber].Purchaseables[ItemCount].Props[PropCount].Prop):
var PropPosition: vector3 = {(Prop.GetTransform().Translation)}
FinalPropPosition := vector3{X := PropPosition.X, Y := PropPosition.Y, Z := PropPosition.Z - 1000.0}
var PropRotation: rotation = {(Prop.GetTransform().Rotation)}
MoveResult := Prop.MoveTo(FinalPropPosition, PropRotation, 1.2)
Print("?reached end, Error Correct Code Loop [ECC] is checking")
if(ECC := Prop.TeleportTo[FinalPropPosition, PropRotation]):
Print("ECC Verfied Waiting...")
MoveDevice(Device : creative_device_base)<suspends>:void=
var PropPosition: vector3 = {(Device.GetTransform().Translation)}
FinalPropPosition := vector3{X := PropPosition.X, Y := PropPosition.Y, Z := PropPosition.Z - 1000.0}
var PropRotation: rotation = {(Device.GetTransform().Rotation)}
MoveResult := Device.MoveTo(FinalPropPosition, PropRotation, 1.2)
MoveDropper(Prop : creative_prop)<suspends>:void=
var PropPosition: vector3 = {(Prop.GetTransform().Translation)}
FinalPropPosition := vector3{X := PropPosition.X, Y := PropPosition.Y, Z := PropPosition.Z - 1000.0}
var PropRotation: rotation = {(Prop.GetTransform().Rotation)}
MoveResult := Prop.MoveTo(FinalPropPosition, PropRotation, 1.2)
GetDivisor(Number:int):[]char=
var FloatConverter: float = 1.0
var ConvertedScore: float = Number * FloatConverter
var ConvertedDecimals: int = 0
set ConvertedDecimals = DecimalAmount
if(ConvertedScore > 1000.0 and ConvertedScore < 1000000.0): #K
set ConvertedScore /= 1000.0
else if(ConvertedScore >= 1000000.0 and ConvertedScore < 1000000000.0): #M
set ConvertedScore /= 1000000.0
else if(ConvertedScore >= 1000000000.0 and ConvertedScore < 1000000000000.0): #B
set ConvertedScore /= 1000000000.0
else if(ConvertedScore >= 1000000000000.0 and ConvertedScore < 1000000000000000.0):
set ConvertedScore /= 1000000000000.0
else if(ConvertedScore >= 1000000000000000.0 and ConvertedScore < 1000000000000000000.0):
set ConvertedScore /= 1000000000000000.0
else if(ConvertedScore >= 1000000000000000000.0 and ConvertedScore < 1000000000000000000000.0):
set ConvertedScore /= 1000000000000000000.0
else if(ConvertedScore >= 1000000000000000000000.0 and ConvertedScore < 1000000000000000000000000.0):
set ConvertedScore /= 1000000000000000000000.0
else if(ConvertedScore < 1000.0):
set ConvertedDecimals = 0
set ConvertedScore = Number * FloatConverter
return ToTruncatedString(ConvertedScore, ConvertedDecimals)
GetBinaryConversion(Recipient: agent, LogicInt: int, Type: int)<suspends>:void= #Since save point confluency cannot be linked to verse I made a binary converter to save everything. <3
GranterList := BinaryDataSave.GranterList #Index 0 should be 1, Index 1 should be 10, Index 2 should be 100, Index 3 should be 1,000 etc etc.
Removers := BinaryDataSave.Removers
SavePointTrigger := BinaryDataSave.SavePointTrigger
BaseValue := BinaryDataSave.BaseValue #How much does each item granter increase by. Theoretically it would work in base 5, stick to 10s for best results, as 1000001 could be digested down in 10s, 100s etc notforth with 5s.
#Sets the granter to grant items of type listed under Index#
var Amount: float = LogicInt * 1.0 #Converts the logic int into a float.
var QuickestRate: int = GranterList.Length - 1 #Finds how many item granters they have.
var FinalRate: float = QuickestRate * 1.0 #Converts Quickest rate to type float
var t: float = Pow(BaseValue, FinalRate) #READ BELOW
Print("Auto Saving Utilizing Binary Type")
loop:
if(Amount >= t): #Is number > 10 ^ FinalRate? I.e 100?
if(ItemGranter := GranterList[QuickestRate]):
ItemGranter.SetNextItem(Type)
ItemGranter.GrantItem(Recipient)
set Amount -= t
if(GetRandomInt(0, 100) > 90):
Print("Random Save Check; we are Granting!")
else: #Player doesn't have above the highest registered quick find index.
set QuickestRate -= 1 #Find the next best quick index. I.e player had 50,000 gold and highest quick index was 100,000, go to the 10,000 index to get it complete in 5ms. Instead of going down to lowest index and it taking 10seconds.
set t /= BaseValue
if(QuickestRate < 0):
Print("Autosave Complete...")
SavePointTrigger.Trigger(Recipient)
break
Sleep(0.00) #ms
<# READ BELOW REFERENCE --> finds the amount of 0s to use (Utilizing default Basevalue of 10.0):
I.e if index is 0, 10(BaseValue) to pow of 0 is 1.
So first index (0) would be 1.
Then if index is 1, 10 to pow of 1 is 10.
So second index(1) would be 10.
Then if index is 2, 10 to pow of 2 is 100.
So third index(2) would be 100.
ETC ETC ETC ETC ETC ETC
Hence forth why granter list must increase in base 10. #>
AutoSave(Agent: agent)<suspends>:void= #Runs the autosaves, under binary data save I recomend creating 3 item granters. First has 4 items. Each granting 1. Second has 4 items each granting 10, third has 4 items each granting 100. You can continue this if needed.
spawn:
LoadSavedData(Agent)
loop:
Print("Turning Auto Save On...")
spawn:
AutoSaveMoney(Agent)
spawn:
AutoSaveCustom(Agent)
spawn:
AutoSaveCustomS(Agent)
spawn:
AutoSavePurchaseWeight(Agent)
Sleep(AutoSaveCurrencySeconds)
Remover := BinaryDataSave.Removers
Remover.Remove(Agent)
LoadSavedData(Agent: agent)<suspends>:void=
Print("Loading Data...")
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Scored {TeamNumber}")
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
SavePointTriggerLoader := BinaryDataSave.SavePointTriggerLoader
SavePointTriggerLoader.Trigger(Agent)
Print("Data loaded")
for(CBCount := 0..BinaryDataSave.ConditionalLoader.Length - 1):
if(CB := BinaryDataSave.ConditionalLoader[CBCount]):
Sleep(1.0)
Print("Doing")
if(CBCount = 0):
AgentStats.SetActiveCash(CB.GetItemCount(Agent, 0)) #Sets the active cash for the base = to the users OG Cash.
if(CBCount = 1):
AgentStats.AddCustommoney(Agent, CB.GetItemCount(Agent, 0)) #Sets the active custom cash for the base = to the users OG custom Cash.
if(CBCount = 2):
AgentStats.SetCustomPerSecond(CB.GetItemCount(Agent, 0)) #Sets the active custom cash /s for the base = to the users OG Cash.
Print("Custom s {CB.GetItemCount(Agent, 0)}")
if(CBCount = 3):
AgentStats.SetPurchaseWeight(CB.GetItemCount(Agent, 0)) #Sets the active custom cash /s for the base = to the users OG Cash.
AgentWeight := AgentStats.GetPurchaseWeight()
for(ItemCount := 0..Teamset[TeamNumber].Purchaseables.Length - 1):
if(Weight := Teamset[TeamNumber].Purchaseables[ItemCount].Weight):
if(AgentWeight >= Weight):
for(PropCount -> Indexed : Teamset[TeamNumber].Purchaseables[ItemCount].Props): #Gets all props
if (Prop := Teamset[TeamNumber].Purchaseables[ItemCount].Props[PropCount].Prop):
if(PurchaseSFX := Teamset[TeamNumber].Purchaseables[ItemCount].PurchaseSFX):
PurchaseSFX.Play(Agent)
if(Prop.IsValid[]):
Prop.Show()
if(Teamset[TeamNumber].Purchaseables[ItemCount].ECC = false):
spawn:
MoveProp(Prop)
if(Teamset[TeamNumber].Purchaseables[ItemCount].ECC = true):
spawn:
ECCMoveProp(TeamNumber, ItemCount, PropCount)
if (Buttonzone := Teamset[TeamNumber].Purchaseables[ItemCount].buttonzone):
Buttonzone.Disable()
if(CostButton := Teamset[TeamNumber].Purchaseables[ItemCount].costdisplay):
CostButton.HideText()
if (BuyVFX := Teamset[TeamNumber].Purchaseables[ItemCount].BuyVFX):
BuyVFX.Disable()
if (Dependent := Teamset[TeamNumber].Purchaseables[ItemCount].Dependent.buttonzone):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].Purchaseables[ItemCount].Dependent.BuyVFX):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].Purchaseables[ItemCount].Dependent2.buttonzone):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].Purchaseables[ItemCount].Dependent2.BuyVFX):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].Purchaseables[ItemCount].PurchasedVFX1):
Dependent.Enable()
if (Dependent := Teamset[TeamNumber].Purchaseables[ItemCount].PurchasedVFX2):
Dependent.Enable()
if (Dependent := Teamset[Teamswap].Purchaseables[ItemCount].Dependent.CostDisplay):
Dependent.ShowText()
if (Dependent := Teamset[Teamswap].Purchaseables[ItemCount].Dependent2.CostDisplay):
Dependent.ShowText()
Print("Item Bought")
if (Dependent := Teamset[Teamswap].Purchaseables[ItemCount].costdisplay):
Dependent.HideText()
var pastcashpersecond: int = AgentStats.GetCashpersecond()
if(Rewards := Teamset[TeamNumber].Purchaseables[ItemCount].Reward_Type):
if(Rewards = CoinType.DefaultCoin):
loop:
var currentCashpersecond: int = AgentStats.GetCashpersecond()
if(WantedCashpersecond := Teamset[TeamNumber].Purchaseables[ItemCount].AddCashpersecond):
if(currentCashpersecond >= WantedCashpersecond+pastcashpersecond): #Checks if the active cash per second is equal to how much it should be for the prop + how much it used to be
#("Current CPS {currentCashpersecond}")
#("Needed CPS {WantedCashpersecond}")
break
else()
AgentStats.IncreaseCashpersecond()
else if(Rewards := Teamset[TeamNumber].Purchaseables[ItemCount].Reward_Type):
if(Rewards = CoinType.CustomCoin):
if(WantedCashpersecond := Teamset[TeamNumber].Purchaseables[ItemCount].AddCashpersecond):
AgentStats.AddCustompersecond(Agent, WantedCashpersecond)
Sleep(0.5)
AutoSaveMoney(Agent: agent)<suspends>:void= #Saves money through Binary
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Scored {TeamNumber}")
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
Print("Getting binary conversion")
if(ScoreManager := Teamset[TeamNumber].ScoreManager):
var Score: int = ScoreManager.GetCurrentScore(Agent)
GetBinaryConversion(Agent, Score, 0)
AutoSaveCustom(Agent: agent)<suspends>:void= #Saves Custom Money
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Scored {TeamNumber}")
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
Print("Getting binary conversion")
GetBinaryConversion(Agent, AgentStats.GetCustomMoney(), 1)
AutoSaveCustomS(Agent: agent)<suspends>:void= #Saves Custom /S
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Scored {TeamNumber}")
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
Print("Getting binary conversion")
GetBinaryConversion(Agent, AgentStats.GetCustompersecond(), 2)
AutoSavePurchaseWeight(Agent: agent)<suspends>:void= #Saves Purchase Weight
TeamCollection := GetPlayspace().GetTeamCollection()
if:
AgentsTeam := TeamCollection.GetTeam[Agent]
then:
TeamsArray := TeamCollection.GetTeams()
for (TeamNumber->Team: TeamsArray):
if (AgentsTeam = Team):
#("Scored {TeamNumber}")
if(PlayerOBJ := player[Agent]):
if(AgentStats := AllPlayersMap[PlayerOBJ]):
Print("Getting binary conversion")
GetBinaryConversion(Agent, AgentStats.GetPurchaseWeight(), 3)
#Below are a list of all class types in the verse device
BaseArray := class<concrete>: #Team Set
var IsActive: logic = false
@editable
var CoinName: string = "Money"
@editable
var CoinEmoji: string = "💲"
@editable
CashClaimer : mutator_zone_device = mutator_zone_device{}
@editable
CashClaimSFX : audio_player_device = audio_player_device{}
@editable #Visual Display for money needed to collect
CashDisplay : billboard_device = billboard_device{}
@editable #Updates amount of money needed to collect
ScoreManager : score_manager_device = score_manager_device{}
@editable
BaseClaimer : mutator_zone_device = mutator_zone_device{}
@editable
BaseClaimerVFX : vfx_spawner_device = vfx_spawner_device{}
@editable
PurchaseManager : score_manager_device = score_manager_device{}
@editable
HudMessageManager : hud_message_device = hud_message_device{}
@editable
MAXPropstoHandle : int = 250
@editable
CustomizableCurrency : Customizable = Customizable{}
@editable
Purchaseables : [] Purchaseableitems = array{}
@editable
Droppers : [] DropperItems = array{}
Purchaseableitems := class<concrete>:
@editable
Identifier: string = "MyItem"
@editable
ShowNameOnPrint: logic = true
@editable
var ECC: logic = false
var HasECC: logic = true
@editable
var Weight: int = 1000
@editable
buttonzone : mutator_zone_device = mutator_zone_device{}
@editable
costdisplay : billboard_device = billboard_device{}
@editable
var Cost: int -= 1
@editable
Cost_Type : CoinType = CoinType.DefaultCoin
@editable
Reward_Type : CoinType = CoinType.DefaultCoin
@editable
Signaler : trigger_device = trigger_device{}
@editable
XP : accolades_device = accolades_device{}
@editable
var AddCashpersecond: int = 1
@editable
var Dependent: DependentVFX = DependentVFX{}
@editable
var Dependent2: DependentVFX = DependentVFX{}
@editable
Props : [] PropItems = array{}
@editable
BuyVFX : vfx_spawner_device = vfx_spawner_device{}
@editable
PurchasedVFX1 : vfx_spawner_device = vfx_spawner_device{}
@editable
PurchasedVFX2 : vfx_spawner_device = vfx_spawner_device{}
@editable
PurchaseSFX : audio_player_device = audio_player_device{}
DisableECC():void=
set HasECC = false
CutomizableItems := class<concrete>:
@editable
buttonzone : mutator_zone_device = mutator_zone_device{}
@editable
costdisplay : billboard_device = billboard_device{}
@editable
var Cost: int -= 500
@editable
var IncreasesCustomPerSecondBy: int = 1
@editable
var Speed: float = 2.5
@editable
var Dependent: DependentVFX = DependentVFX{}
@editable
Props : [] PropItems = array{}
@editable
BuyVFX : vfx_spawner_device = vfx_spawner_device{}
@editable
PurchasedVFX1 : vfx_spawner_device = vfx_spawner_device{}
@editable
PurchaseSFX : audio_player_device = audio_player_device{}
CannonItems := class<concrete>:
@editable
Reward_Type : CoinType = CoinType.DefaultCoin
@editable
buttonzone : mutator_zone_device = mutator_zone_device{}
@editable
costdisplay : billboard_device = billboard_device{}
@editable
BuyVFX : vfx_spawner_device = vfx_spawner_device{}
@editable
Button : button_device = button_device{}
@editable
Cinematic : cinematic_sequence_device = cinematic_sequence_device{}
@editable
var Cost: int -= 500
@editable
var Adds: int = 1
@editable
var GrantAt: float = 8.0
@editable
var Speed: float = 1.0
@editable
var Dependent: DependentVFX = DependentVFX{}
@editable
var DependentDisplay: billboard_device = billboard_device{}
@editable
Props : [] PropItems = array{}
@editable
PurchasedVFX1 : vfx_spawner_device = vfx_spawner_device{}
@editable
PurchaseSFX : audio_player_device = audio_player_device{}
PetItems := class<concrete>:
@editable
buttonzone : mutator_zone_device = mutator_zone_device{}
@editable
costdisplay : billboard_device = billboard_device{}
@editable
BuyVFX : vfx_spawner_device = vfx_spawner_device{}
@editable
Button : button_device = button_device{}
@editable
var Cost: int -= 500
@editable
var Multiplier: float = 1.5
@editable
var Dependent: DependentVFX = DependentVFX{}
@editable
UnlockableProps : [] PropItems = array{}
@editable
PetProps : [] PropItems = array{}
@editable
PurchasedVFX1 : vfx_spawner_device = vfx_spawner_device{}
@editable
PurchaseSFX : audio_player_device = audio_player_device{}
Shootable := class<concrete>:
@editable
Tagline : string = "Cha Ching"
@editable
buttonzone : mutator_zone_device = mutator_zone_device{}
@editable
costdisplay : billboard_device = billboard_device{}
@editable
var Cost: int -= 500
@editable
var AddsCustom: int = 1
@editable
var Dependent: DependentDMG = DependentDMG{}
@editable
Cost_Type : CoinType = CoinType.DefaultCoin
@editable
Props : [] PropItems = array{}
@editable
PropManipulator: prop_manipulator_device = prop_manipulator_device{}
@editable
BuyVFX : vfx_spawner_device = vfx_spawner_device{}
@editable
PurchasedVFX1 : vfx_spawner_device = vfx_spawner_device{}
@editable
PurchaseSFX : audio_player_device = audio_player_device{}
DependentVFX :=class<concrete>:
@editable
BuyVFX : vfx_spawner_device = vfx_spawner_device{}
@editable
buttonzone : mutator_zone_device = mutator_zone_device{}
@editable
CostDisplay : billboard_device = billboard_device{}
DependentDMG :=class<concrete>:
@editable
BuyVFX : vfx_spawner_device = vfx_spawner_device{}
@editable
buttonzone : mutator_zone_device = mutator_zone_device{}
@editable
CostDisplay : billboard_device = billboard_device{}
@editable
PropManipulator : prop_manipulator_device = prop_manipulator_device{}
VFX := class<concrete>:
@editable
BuyVFX : vfx_spawner_device = vfx_spawner_device{}
@editable
PurchasedVFX1 : vfx_spawner_device = vfx_spawner_device{}
@editable
PurchasedVFX2 : vfx_spawner_device = vfx_spawner_device{}
CoinType := enum:
DefaultCoin
CustomCoin
PropItems := class<concrete>:
@editable
var Prop: creative_prop = creative_prop{}
DropperItems := class<concrete>:
@editable
Identifier: string = "MyDropper"
@editable
ShowNameOnPrint: logic = true
@editable
Dropper : creative_prop = creative_prop{}
@editable
DropperTIP : creative_prop = creative_prop{}
@editable
buttonzone : mutator_zone_device = mutator_zone_device{}
@editable
costdisplay : billboard_device = billboard_device{}
@editable
var Cost: int -= 1
@editable
var CashOnExit: int = 1
@editable
var Feather: int = 88
@editable
var Prop: creative_prop = creative_prop{}
@editable
Dependent: DependentVFX = DependentVFX{}
@editable
SetVFX: VFX = VFX{}
@editable
var PropRotation: rotation = rotation{}
@editable
var ConveyorBaseCords: vector3 = vector3{}
@editable
var ConveyorEndCords: vector3 = vector3{}
@editable
PurchaseSFX : audio_player_device = audio_player_device{}
@editable
PassiveSFX : audio_player_device = audio_player_device{}
@editable
Props: [] PropItems = array{}
PlayerStats := class<unique>(): #A unique class availible for use on a player by player basis
var UniqueTranslation: vector3 = vector3{X := 0.0, Y := 0.0, Z := -1.0}
var PurchasedItemsCount: int = 0 #not turned on by default, optional if you want to keep track of a players purchased items.
var Cashpersecond: int = 1
var MutatedIndex: int = 0 #Defines the mutator zones index a player has walked into
var UpdateTeam: int = 0 #Defines the mutator zones TEAM parent index a player has walked into
var OwnsBase: logic = false #Checks if a player has owned a base, 0 = NO, 1 = Yes. Not using Logic / bool here since they are buggy atm.
var ActiveCash: int = 0 #Active Unclaimed Cash
var Rebirths: float = 0.0 #Character rebirths amount
var IndexValue:int = 1 #Checks the button a user has entered.
var CustomMulti: float = 1.0
var PostCustomMulti: float = 1.0
var Custompersecond: int = 0
var CustomizableMoney: int = 1
var UsingPC: logic = false #Checks if a user is using the pc
var CanUse: logic = true
var ComputerLevelIndex: int = 0
var PCDebounce: logic = false
var CannonIndex: int = 0
var PetIndex: int = 0 #gets the users current pet index
var PetDebounce: logic = false
var PurchaseWeight: int = 0
var Bypass: logic = false
GetIndexValue():int=
return IndexValue
BypassOn():void=
set Bypass = true
BypassOff():void=
set Bypass = false
BypassVal():logic=
return Bypass
GetPurchaseWeight():int=
return PurchaseWeight
SetPurchaseWeight(Weight: int):void=
if(Weight > PurchaseWeight):
set PurchaseWeight = Weight
GetPetDebounce():logic=
return PetDebounce
PetDebounceOn():void=
set PetDebounce = true
PetDebounceOff():void=
set PetDebounce = false
GetPetIndex():int=
return PetIndex
UpdateMulti(Index: float):void=
set CustomMulti = Index
UpdatePetIndex(Index: int):void=
set PetIndex = Index
ChangeMulti(Index: float):void=
set CustomMulti *= Index
GetCannonIndex():int=
return CannonIndex
SetCannonIndex(Index: int):int=
set CannonIndex = Index
GetPCDebounce():logic=
return PCDebounce
PCDebounceON():void=
set PCDebounce = true
PcDebounceOFF():void=
Print("Turning debounce off")
set PCDebounce = false
CantUsePC(Speed:float)<suspends>:void=
set PCDebounce = false
set CanUse = false
AddActiveCash(Wait: float, Amount: int)<suspends>:void=
Sleep(Wait)
set ActiveCash += Amount
CanPlayerUsePC():logic=
return CanUse
NowUsingPC(Agent: agent, Index: int):void=
set UsingPC = true
StoppedUsingPC()<suspends>:logic=
Print("Setting using pc = false")
set UsingPC = false
UsingPCCheck():logic=
return UsingPC
GetCustomMoney():int=
return CustomizableMoney
GetCustompersecond():int=
return Custompersecond
AddCustommoney(Agent : agent, Index : int):void=
set CustomizableMoney += Index
AddUniquemoney(Wait: float, Index : int)<suspends>:void=
Sleep(Wait)
set CustomizableMoney += Index
AddCustompersecond(Agent : agent, Index : int):void=
if(Index = 0):
set Custompersecond += Index + 1
else:
set PostCustomMulti = Index * CustomMulti
Print(" Pust Multi {PostCustomMulti}")
if(var Rounder: int = Round[PostCustomMulti]):
Print(" Roounder {Rounder}")
set Custompersecond += Rounder
SetCustomPerSecond(Index: int):void=
set Custompersecond = Index
RemoveCustomMoney(Agent : agent, Index : int):int=
set CustomizableMoney -= Index
GetRebirths(): float =
return Rebirths
SetRebirths(Index: float):float=
set Rebirths += Index
GetActiveCash(): int =
return ActiveCash
GetOwnsBase():logic=
return OwnsBase
NowOwnsBase():logic=
set OwnsBase = true
NowLongerOwnsBase():logic=
set OwnsBase = false
GetMutatedIndex():int=
return MutatedIndex #Returns the mutator zones index a player has walked into
GetPCIndex():int=
return ComputerLevelIndex
AddPCIndex(Agent : agent, Index : int):void=
set ComputerLevelIndex = Index
AddMutatedIndex(Agent : agent, Index : int):void=
set MutatedIndex = Index
#("Changed Mutaded index to {Index}")
TeamChange(Agent : agent, Index : int):void= #Sets the Updated Team Var to the mutator zones TEAM parent index a player has walked into.
set UpdateTeam = Index
#("Changed Updated tean to {Index}")
SetActiveCash(Index: int):void=
#("Active cash is {Index}")
var embeddedIndex: int = Index
set embeddedIndex *= IndexValue
set ActiveCash += embeddedIndex
#("Active cash 2 is {Index}")
ResetActiveCash():int=
set ActiveCash = 0
GetPurchasedItemsCount():int= #not turned on by default, optional if you want to keep track of a players purchased items.
return PurchasedItemsCount
GetUpdateTeam():int=
return UpdateTeam
AddPurchasedItems():int= #not turned on by default, optional if you want to keep track of a players purchased items.
set PurchasedItemsCount += 1
GetCashpersecond():int=
return Cashpersecond
IncreaseCashpersecond():int=
set Cashpersecond += 1
MultiplyCashpersecond(Index: float):void=
if(set IndexValue = Round[Index]):
#("{IndexValue}")
DecreaseCashpersecond():int=
set Cashpersecond -= 1
ResetCashPerSecond():int=
set Cashpersecond = 1
RebirthType:= class<concrete>:
@editable
UnPlurralName: string = "Rebirth"
@editable
ExponentialCashX: float = 2.1
@editable
ExponentialPriceX: float = 2.2
@editable
BasePrice: float = 1000.00
@editable
Interacation: button_device = button_device{}
@editable
PopUp: popup_dialog_device = popup_dialog_device{}
GetExpoCash():float=
return ExponentialCashX
GetExpoPrice():float=
return ExponentialPriceX
Customizable:= class<concrete>:
@editable
ShowOnHud: logic = true
@editable
var Text_Color: color = Gold
@editable
var AnimSpeed: float = 2.5
@editable
UnPlurralName: string = "Coins"
@editable
Emoji: string = "🪙"
@editable
Cinematic: cinematic_sequence_device = cinematic_sequence_device{}
@editable
Show: cinematic_sequence_device = cinematic_sequence_device{}
@editable
Hide: cinematic_sequence_device = cinematic_sequence_device{}
@editable
EnterMutator: mutator_zone_device = mutator_zone_device{}
@editable
ExitMutator: mutator_zone_device = mutator_zone_device{}
@editable
CashSDisplay: billboard_device = billboard_device{}
@editable
ExitTP: teleporter_device = teleporter_device{}
@editable
Computers : [] CutomizableItems = array{}
@editable
DamagedAdder: [] Shootable = array{}
@editable
Pets : [] PetItems = array{}
@editable
Cannons : [] CannonItems = array{}
BinarySaving:=class<concrete>:
@editable
GranterList : []item_granter_device = array{} #Index 0 should be 1, Index 1 should be 10, Index 2 should be 100, Index 3 should be 1,000 etc etc.
@editable
Removers : item_remover_device = item_remover_device{}
@editable
ConditionalLoader: []conditional_button_device = array{}
@editable
SavePointTrigger : trigger_device = trigger_device{}
@editable
SavePointTriggerLoader : trigger_device = trigger_device{}
@editable
BaseValue: float = 10.0
#function to allow for Wrapping Data within AgentSubscribe & Empty Subscribes as (FUNCTION, DataYouWantToPass) DO-NOT Change or modify this
#Below are unique user generated functions
(Listenable : listenable(agent)).SubscribeAgent(OutputFunc : tuple(agent, t)->void, ExtraData : t where t:type) : cancelable =
Wrapper := wrapper_agent(t){ExtraData := ExtraData, OutputFunc := OutputFunc}
Listenable.Subscribe(Wrapper.InputFunc)
wrapper_agent(t : type) := class():
ExtraData : t;
OutputFunc : tuple(agent, t) -> void
InputFunc(Agent : agent):void = OutputFunc(Agent, ExtraData)
(Listenable : listenable(tuple())).SubscribeEmpty(OutputFunc : t -> void, ExtraData : t where t:type) : cancelable =
Wrapper := wrapper_empty(t) {ExtraData := ExtraData, OutputFunc := OutputFunc}
Listenable.Subscribe(Wrapper.InputFunc)
wrapper_empty(t : type) := class():
ExtraData : t;
OutputFunc : t -> void
InputFunc():void = OutputFunc(ExtraData)
FindCharIndex(SearchChar:char, Str:[]char)<transacts><decides>:int=
var FoundIndex:int = 0
var Found:logic = false
for (X -> Char : Str, not Found?):
if (Char = SearchChar):
set FoundIndex = X
FoundIndex
ToTruncatedString(Number:float, Decimals:int):[]char=
var Str:[]char = ToString(Number)
if:
DotIndex := FindCharIndex['.', Str]
StopIndex := if (Decimals > 0) then Min(DotIndex+Decimals+1,Str.Length) else DotIndex
set Str = Str.Slice[0, StopIndex]
Str
#GetSuffix Takes an integer and passes on the suffix with it.
GetSuffix(Number:int)<transacts><decides>:[]char=
var Suffix: string = ""
var FloatConverter: float = 1.0
var ConvertedScore: float = Number * FloatConverter
if(ConvertedScore >= 1000.0 and ConvertedScore < 1000000.0):
set Suffix = "K"
else if(ConvertedScore >= 1000000.0 and ConvertedScore < 1000000000.0):
set Suffix = "M"
else if(ConvertedScore >= 1000000000.0 and ConvertedScore < 1000000000000.0):
set Suffix = "B"
else if(ConvertedScore >= 1000000000000.0 and ConvertedScore < 1000000000000000.0):
set Suffix = "T"
else if(ConvertedScore >= 1000000000000000.0 and ConvertedScore < 1000000000000000000.0):
set Suffix = "Qa"
else if(ConvertedScore >= 1000000000000000000.0 and ConvertedScore < 1000000000000000000000.0):
set Suffix = "Qu"
else if(ConvertedScore >= 1000000000000000000000.0 and ConvertedScore < 1000000000000000000000000.0):
set Suffix = "Se"
else if(ConvertedScore < 1000.0):
set ConvertedScore = Number * FloatConverter
set Suffix = ""
return (Suffix)
#Takes an Integer and divides it to only display in Hundreds. I.E. 1,000 will be = 1 |||| 100,000 will be = 100 ||| 125,500 will be = 125.5000000 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment