Player V2 API
The playerV2 module adds purchase events, UI helpers, and daily reward tools.
Functions
Section titled “Functions”| Function | Returns | Description |
|---|---|---|
playerV2.getGift() | boolean | Attempts to claim the daily reward. |
playerV2.mainScreenEnable() | void | Opens or enables the main screen UI. |
playerV2.tpToDrone() | void | Teleports the player to the drone. |
playerV2.distanceToDrone() | number | Returns the distance from the player to the drone. |
playerV2.getScrapLeaderboardRank() | number | Returns the player’s scrap leaderboard rank. |
lau-compiler.exe
print("[System] Checking for gifts...")
if playerV2.getGift() then print("[System] Reward claimed successfully!")endOUTPUT:
[System] Checking for gifts...
[System] Reward claimed successfully!
Events
Section titled “Events”playerV2.clicked
Section titled “playerV2.clicked”Triggered when the player clicks in the world.
playerV2.clicked:connect(func() print("[Input] Click detected! Performing flip...") drone.doFlip()end)playerV2.boughtSeed
Section titled “playerV2.boughtSeed”Triggered when a seed is purchased.
playerV2.boughtSeed:connect(func() player.sent("Seed received! Moving to plant...")end)playerV2.boughtGear
Section titled “playerV2.boughtGear”Triggered when gear is purchased.
playerV2.boughtGear:connect(func() player.alert("Gear Purchased!")end)