Game Module
The game module provides access to global server data and environmental conditions.
Weather
Section titled “Weather”| Function | Returns | Description |
|---|---|---|
game.weather() | string | Returns the current weather. |
game.weatherDuration() | number | Returns the remaining time in seconds for the current weather. |
game.changedWeather:connect(func() player.sent("The weather is now: " + game.weather())end)Players
Section titled “Players”| Function | Returns | Description |
|---|---|---|
game.players() | list | Returns a list of player data tables. |
lau-compiler.exe
varol allPlayers = game.players()
print("[Leaderboard]")for i, data inpairs(allPlayers) do print(i + ". " + data.Name + ": " + data.scrap)endOUTPUT:
[Leaderboard]
1. A1fi_e: 27,139,262
2. namnamnamnamnampro: 1,246,273,642
Server Properties
Section titled “Server Properties”| Property | Type | Description |
|---|---|---|
game.uptime | number | How many seconds the current server has been running. |
game.version | string | The current server version. |
game.lauversion | string | The current LAU engine version. |
| Function | Returns | Description |
|---|---|---|
game.rejoin() | void | Instantly reconnects you to the game. |