Player
addBankBalance
Adds to the player's bank balance.
player:addBankBalance(amount)addBlessing
Adds a blessing to a player.
player:addBlessing(blessing_id)addCoins
Adds coins to the player.
player:addCoins(amount, sendPacket)addFriend
Adds a new friend. Also updates the friend's list.
player:addFriend(targetPlayer)addGems
Adds a specified amount of gems to the player.
player:addGems(amount, sendPacket, isDisplay)addGrowpassPoints
Adds Growpass points to a player.
player:addGrowpassPoints(points)addLevel
Adds a specified number of levels to the player.
player:addLevel(amount)addMail
Adds a new mail to the player's mailbox.
player:addMail(mailDataTable)addMod
Adds a temporary modification (e.g., curse, buff) to the player.
player:addMod(modID, durationSeconds)addTitle
Adds a title to the player.
player:addTitle(id)adjustBlockHitCount
Adjusts the number of hits required to break blocks for this player. 1 makes it harder, -1 makes it easier (max +10/-10).
player:adjustBlockHitCount(amount)ban
Bans the player. length_seconds = 0 for a permanent ban. banned_by_player is another player object (can be nil). ban_device and ban_ip are 0 (no) or 1 (yes).
player:ban(length_seconds, reason, banned_by_player, ban_device, ban_ip)changeItem
Adds (amount > 0) or removes (amount < 0) an item from the player's inventory.
player:changeItem(itemID, amount, isSendPacket)checkPassword
Checks if the provided password string matches the player's account password. Returns true if it matches.
player:checkPassword(passwordString)clearMailbox
Clears all mail from the player's mailbox.
clearMailbox()disconnect
Disconnects the player from the server.
disconnect()doAction
Sends a packet on behalf of the player. Example: player:doAction("action|input\n|text|hello").
player:doAction(actionString)enterWorld
Teleports the player to a specified world.
player:enterWorld(worldName, doorID)getAccessWorlds
Returns a list of World IDs where the player has build access.
getAccessWorlds()getAccountCreationDateStr
Returns the Account Creation Date.
getAccountCreationDateStr()getAchievementsCount
Returns the total number of available achievements.
getAchievementsCount()getAdjustedBlockHitCount
Returns the current adjusted block hit count value.
getAdjustedBlockHitCount()getAltAccounts
Returns an array of alternative accounts linked to this player.
getAltAccounts()getBackpackItems
Returns a table of all items in the player's backpack.
getBackpackItems()getBackpackUsedSize
Returns the number of used slots in the backpack.
getBackpackUsedSize()getBankBalance
Returns the player's bank balance.
getBankBalance()getBiweeklyQuests
Returns a table with the player's Biweekly Quest tasks.
getBiweeklyQuests()getClassicProfileContent
Returns the ClassicProfile Content.
player:getClassicProfileContent(cat, flags)getCleanName
Returns the player's name without any special formatting.
getCleanName()getClothingItemID
Gets the item ID of clothing in a specific slot (e.g., PlayerClothes.HAND).
player:getClothingItemID(slot)getCoins
Returns the player's coin count.
getCoins()getCountry
Returns the player's country code (e.g., "us").
getCountry()getCountryFlagBackground
Returns the item ID of the player's country flag background.
getCountryFlagBackground()getCountryFlagForeground
Returns the item ID of the player's country flag foreground.
getCountryFlagForeground()getDiscordID
Returns the Player's Discord ID.
getDiscordID()getDiscordInvites
Returns the number of Discord invites a player has.
getDiscordInvites()getEmail
Returns the player's email address.
getEmail()getFriends
Returns a table with friend user IDs.
getFriends()getGems
Returns the player's gem count.
getGems()getGender
Returns the player's gender.
getGender()getGuildID
Returns the Guild ID.
getGuildID()getHomeWorldID
Returns Player's Home World ID.
getHomeWorldID()getInventoryItems
Returns a table of all items in the player's inventory. Iterate through it to access individual items.
getInventoryItems()getInventorySize
Returns the player's inventory size.
getInventorySize()getIP
Returns the player's IP address as a string.
getIP()getIPHistory
Returns a list of IP addresses recently used by the account.
getIPHistory()getItemAmount
Returns the amount of a specific item the player has in their inventory.
player:getItemAmount(itemID)getLevel
Returns the player's current level.
getLevel()getLifeGoals
Returns a table with the player's Life Goal tasks.
getLifeGoals()getMod
Returns the player's mod.
player:getMod(playModID)getNetID
Returns the player's network ID.
getNetID()getOnlineStatus
Returns The Online Status.
getOnlineStatus()getOwnedWorlds
Returns a list of World IDs that the player owns.
getOwnedWorlds()getPlatform
Returns the player's platform ID (0: Win, 1: iOS, 2: macOS, 4: Android).
getPlatform()getPlaytime
Returns the player's total playtime in seconds.
getPlaytime()getRecentWorlds
Returns a list of World IDs the player recently entered.
getRecentWorlds()getRID
Returns the player's unique identifier (RID) as a string.
getRID()getRIDHistory
Returns a list of RIDs recently used by the account.
getRIDHistory()getRole
Returns the player's role object (contains flags, priority, name, etc).
getRole()getRoleQuestLevel
Gets the player's role quest level for a specific type.
player:getRoleQuestLevel(type)getSmallLockedWorlds
Returns a list of World IDs locked by the player using Small/Big/Huge locks.
getSmallLockedWorlds()getSubscription
Returns the player's specified subscription status.
player:getSubscription(subscription)getTransformProfileButtons
Returns Player's TransformProfile Buttons.
getTransformProfileButtons()getType
Returns the player's type. Non-zero means it is an NPC. Lua-spawned NPCs will have a type of 25.
getType()getUnlockedAchievementsCount
Returns the number of achievements the player has unlocked.
getUnlockedAchievementsCount()getUserID
Returns the player's unique user ID.
getUserID()getWorld
Returns the world object the player is currently in.
getWorld()getWorldName
Returns the name of the world the player is currently in.
getWorldName()hasActiveBlessing
Checks if a player has an active blessing. Returns false if the power orb is disabled.
player:hasActiveBlessing(blessing_id)hasBlessing
Checks if a player has a blessing, regardless of power orb state.
player:hasBlessing(blessing_id)hasRole
Checks if the player has a specific role ID. (e.g., Roles.ROLE_ADMIN).
player:hasRole(role)hasTitle
Checks if the player has unlocked a specific title.
player:hasTitle(id)isFacingLeft
Returns true if the player is facing left.
isFacingLeft()isMaxInventorySpace
Returns true if the player's inventory is full.
isMaxInventorySpace()isOnline
Checks if the player object corresponds to an online player.
isOnline()onAchievementsUI
Shows the achievements UI for a target player.
player:onAchievementsUI(targetPlayer)onBackpackUI
Shows the Backpack UI for a target player.
player:onBackpackUI(targetPlayer)onBillboardUI
Shows the Billboard UI.
onBillboardUI()onClothesUI
Shows the clothing UI of a target player.
player:onClothesUI(targetPlayer)onCoinsBankUI
Shows the Coins Bank UI.
onCoinsBankUI()onConsoleMessage
Sends a message to the player's in-game console.
player:onConsoleMessage(message)onDialogRequest
Sends a dialog to the player. The callback function is optional and handles the response directly.
player:onDialogRequest(dialogString, delay, callback)onFavItemsUI
Shows the Favorite Items UI.
onFavItemsUI()onGrow4GoodDonate
Fires Grow4GoodDonate Event.
onGrow4GoodDonate()onGrow4GoodUI
Shows the Grow4Good UI.
onGrow4GoodUI()onGrowmojiUI
Shows the Growmoji UI.
onGrowmojiUI()onGrowpassUI
Shows the Growpass UI.
onGrowpassUI()onGuildNotebookUI
Returns The GuildNotebook UI.
onGuildNotebookUI()onLinkDiscordUI
Shows the Link Discord UI.
onLinkDiscordUI()onMentorshipUI
Shows the Mentorship UI.
onMentorshipUI()onNameIconsUI
Shows the Name Icons UI for a target player.
player:onNameIconsUI(targetPlayer)onNotebookUI
Shows the Notebook UI.
onNotebookUI()onOnlineStatusUI
Shows the Online Status UI.
onOnlineStatusUI()onPersonalizeWrenchUI
Shows the Personalize Wrench UI.
onPersonalizeWrenchUI()onRedeemMenu
Sends a redeem menu to the player.
onRedeemMenu()onStorePurchaseResult
Sends a store purchase result to the player.
onStorePurchaseResult()onTalkBubble
Displays a talk bubble above a player. Use player:getNetID() for self.
player:onTalkBubble(netID, message, isApi)onTextOverlay
Displays a large text overlay on the player's screen.
player:onTextOverlay(text)onTitlesUI
Shows the titles UI for a target player.
player:onTitlesUI(targetPlayer)onTradeScanUI
Shows the trade scan UI.
onTradeScanUI()onUnlinkDiscordUI
Shows the Unlink Discord UI.
onUnlinkDiscordUI()onVouchersUI
Shows the Vouchers UI.
onVouchersUI()onWrenchIconsUI
Shows the Wrench Icons UI for a target player.
player:onWrenchIconsUI(targetPlayer)playAudio
Plays an audio file for the player (e.g., "audio/ding.wav").
player:playAudio(filePath, delay)removeBankBalance
Removes from the player's bank balance.
player:removeBankBalance(amount)removeBlessing
Removes a blessing from a player.
player:removeBlessing(blessing_id)removeCoins
Removes coins from the player.
player:removeCoins(amount, sendPacket)removeFriend
Removes a friend. Also updates the friend's list.
player:removeFriend(targetPlayer)removeGems
Removes a specified amount of gems from the player.
player:removeGems(amount, sendPacket, isDisplay)removeLevel
Removes a specified number of levels from the player.
player:removeLevel(amount)removeMod
Removes a modification from the player.
player:removeMod(modID)removeTitle
Removes a title from the player.
player:removeTitle(id)removeXP
Removes a specific amount of experience points from the player.
player:removeXP(amount)resetDialogColor
Resets dialog colors to default. Must be called after using custom colors.
resetDialogColor()resetNickname
Resets the player's display name to their original name.
resetNickname()sendAction
Sends a default Growtopia action string (e.g., for sound effects like action|play_sfx...).
player:sendAction(actionString)sendVariant
Sends a raw variant packet to the player. Examples: {"OnTalkBubble", netID, "Msg"}, {"OnConsoleMessage", "Msg"}, {"OnCountdownStart", 60, -1}. Advanced use.
player:sendVariant(variantTable, delay, netID)setBankBalance
Sets the player's bank balance to a specific value.
player:setBankBalance(amount)setBroadcastWorld
Sets the custom broadcast world for this specific player.
player:setBroadcastWorld(worldName)setCoins
Sets the player's coin count to a specific value.
player:setCoins(amount)setCountry
Changes the country flag of a player. Example: player:setCountry("us").
player:setCountry(countryCode)setCountryFlagBackground
Sets the player's country flag background item. Use 0 to remove.
player:setCountryFlagBackground(item_id)setCountryFlagForeground
Sets the player's country flag foreground item. Use 0 to remove.
player:setCountryFlagForeground(item_id)setGems
Sets the player's gem count to a specific value.
player:setGems(amount)setLevel
Sets the player's level to a specific value.
player:setLevel(level)setNextDialogBorderRGBA
Sets the border color of the next dialog.
player:setNextDialogBorderRGBA(r, g, b, a)setNextDialogRGBA
Sets the background color of the next dialog.
player:setNextDialogRGBA(r, g, b, a)setNickname
Sets the player's display name. Now supports all characters and persists after relogin.
player:setNickname(name)setPassword
Sets the player's account password.
player:setPassword(newPassword)setRole
Sets the player's role ID.
player:setRole(role)setRoleQuestLevel
Sets the player's role quest level for a specific type (e.g., PlayerRoleQuestTypes.Farmer).
player:setRoleQuestLevel(type, level)setXP
Sets the player's total experience points to a specific value.
player:setXP(amount)upgradeInventorySpace
Upgrades the player's inventory space.
player:upgradeInventorySpace(amount)