Skip to content

Instantly share code, notes, and snippets.

@injust90
Created April 17, 2024 04:29
Show Gist options
  • Save injust90/30f014b59f909cff2e58f718cfdd855b to your computer and use it in GitHub Desktop.
Save injust90/30f014b59f909cff2e58f718cfdd855b to your computer and use it in GitHub Desktop.
Loop through players
CheckForFlag()<suspends>:void=
loop:
Sleep(1.0)
AllPlayers:=GetPlayspace().GetPlayers()
for(Player:AllPlayers):
# this casts to the player object to get an agent
if(IsAgent:agent = agent[Player]):
if(ConditionalButton.IsHoldingItem[IsAgent]):
class_granter.ChangeClass(IsAgent)
else:
class_granter_default.ChangeClass(IsAgent)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment