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