Skip to content

Player V2 API

The playerV2 module introduces Event-Driven programming to your character. Use these functions to trigger drone actions immediately after a purchase or to automate your daily rewards.


Automate your income by ensuring you never miss a daily bonus.

FunctionReturnsDescription
playerV2.getGift()booleanAttempts to claim the daily reward. Returns true if successful.
lau-compiler.exe
print("[System] Checking for gifts...")
if playerV2.getGift() then
print("[System] Reward claimed successfully!")
else
print("[System] No rewards available yet.")
end
OUTPUT:
[System] Checking for gifts... [System] Reward claimed successfully!

These events trigger the moment you perform an action in the market. This allows your drone to react instantly without needing a while loop.

EventDescription
playerV2.boughtSeedTriggers when a seed is successfully purchased from the market.
playerV2.boughtGearTriggers when a new tool or piece of equipment is purchased.
-- Every time you buy a seed, the drone immediately moves and plants it
playerV2.boughtSeed:connect(func()
player.sent("Seed received! Moving to plant...")
droneV2.goto(10, 10)
drone.plant(Enum.Seed.Wheat)
end)

Triggered when the player clicks in the world. Use this to create “manual override” commands for your drone.

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

This script tracks your spending by alerting you every time you buy something.

playerV2.boughtGear:connect(func()
varol balance = player.scrap()
player.alert("Gear Purchased! Remaining Balance: " + balance)
end)
playerV2.boughtSeed:connect(func()
player.sent("New seeds in inventory. Ready for planting.")
end)