Skip to content

Player V2 API

The playerV2 module adds purchase events, UI helpers, and daily reward tools.


FunctionReturnsDescription
playerV2.getGift()booleanAttempts to claim the daily reward.
playerV2.mainScreenEnable()voidOpens or enables the main screen UI.
playerV2.tpToDrone()voidTeleports the player to the drone.
playerV2.distanceToDrone()numberReturns the distance from the player to the drone.
playerV2.getScrapLeaderboardRank()numberReturns the player’s scrap leaderboard rank.
lau-compiler.exe
print("[System] Checking for gifts...")
if playerV2.getGift() then
print("[System] Reward claimed successfully!")
end
OUTPUT:
[System] Checking for gifts... [System] Reward claimed successfully!

Triggered when the player clicks in the world.

playerV2.clicked:connect(func()
print("[Input] Click detected! Performing flip...")
drone.doFlip()
end)

Triggered when a seed is purchased.

playerV2.boughtSeed:connect(func()
player.sent("Seed received! Moving to plant...")
end)

Triggered when gear is purchased.

playerV2.boughtGear:connect(func()
player.alert("Gear Purchased!")
end)