Player
Variables
addMessage(text)
addMessage(text)Add message to chat.
Returns:
(boolean) Return true if successfully.
Example Usage:
-- Example code showing how to use the function
player.addMessage("Hypixel Cry - Only me see this")sendMessage(text)
sendMessage(text)Send message to server.
Returns:
(boolean) Return true if successfully.
Example Usage:
-- Example code showing how to use the function
player.sendMessage("Hypixel Cry - All see this")sendCommand(text)
sendCommand(text)Send command to server.
Returns:
(boolean) Return true if successfully.
Example Usage:
-- Example code showing how to use the function
player.sendCommand("/warp hub")getName()
getName()Returns the player name.
Returns:
(string) Player name.
Example Usage:
-- Example code showing how to use the function
local name = player.getName()getRotation()
getRotation()Returns the player rotation.
Returns:
(table) - Position table (yaw, pitch)
Example Usage:
-- Example code showing how to use the function
local rotation = player.getRotation()
local yaw = rotation.yaw -- Number
local pitch = rotation.pitch -- NumbersetRotation(yaw, pitch)
setRotation(yaw, pitch)Returns the player rotation.
Parameters:
yaw(number) - Player yaw.pitch(number) - Player yaw.
Example Usage:
-- Example code showing how to use the function
player.setRotation(90, 90)getPos()
getPos()Returns the player position.
Returns:
(table) - Position table (x, y, z)
Example Usage:
-- Example code showing how to use the function
local pos = player.getPos()
local x = pos.x -- Number
local y = pos.y -- Number
local z = pos.z -- NumbergetLocation()
getLocation()Returns the player location.
Returns:
(string) Player location.
Example Usage:
-- Example code showing how to use the function
local location = player.getLocation()getPurse()
getPurse()Returns the player purse.
Returns:
(number) Player purse.
Example Usage:
-- Example code showing how to use the function
local purse = player.getPurse()getHealth()
getHealth()Returns the player health.
Returns:
(number) Player health.
Example Usage:
-- Example code showing how to use the function
local health = player.getHealth()getMaxHealth()
getMaxHealth()Returns the player max health.
Returns:
(number) Player max health.
Example Usage:
-- Example code showing how to use the function
local maxHealth = player.getMaxHealth()getMana()
getMana()Returns the player mana.
Returns:
(number) Player mana.
Example Usage:
-- Example code showing how to use the function
local mana = player.getMana()getMaxMana()
getMaxMana()Returns the player max mana.
Returns:
(number) Player max mana.
Example Usage:
-- Example code showing how to use the function
local maxMana = player.getMaxMana()getDefence()
getDefence()Returns the player defence.
Returns:
(number) Player defence.
Example Usage:
-- Example code showing how to use the function
local defence = player.getDefence()getSpeed()
getSpeed()Returns the player speed.
Returns:
(number) Player speed.
Example Usage:
-- Example code showing how to use the function
local speed = player.getSpeed()getAir()
getAir()Returns the player oxygen.
Returns:
(number) Player oxygen.
Example Usage:
-- Example code showing how to use the function
local oxygen = player.getAir()getMaxAir()
getMaxAir()Returns the player max oxygen.
Returns:
(number) Player max oxygen.
Example Usage:
-- Example code showing how to use the function
local max_oxygen = player.getMaxAir()getCold()
getCold()Returns the player cold in glacite tunnels.
Returns:
(number) Player cold.
Example Usage:
-- Example code showing how to use the function
local cold = player.getCold()isSneaking()
isSneaking()Returns the player is sneaking.
Returns:
(boolean) is player sneaking.
Example Usage:
-- Example code showing how to use the function
local isSneaking = player.isSneaking()isSprinting()
isSprinting()Returns the player is sprinting.
Returns:
(boolean) is player sprinting.
Example Usage:
-- Example code showing how to use the function
local isSprinting = player.isSprinting()isOnGround()
isOnGround()Returns the player is on ground.
Returns:
(boolean) is player on ground.
Example Usage:
-- Example code showing how to use the function
local isOnGround = player.isOnGround()isOnSkyBlock()
isOnSkyBlock()Returns the player is on skyblock.
Returns:
(boolean) is player on skyblock.
Example Usage:
-- Example code showing how to use the function
local isOnSkyBlock = player.isOnSkyBlock()Returns scoreboard lines.
getScoreBoardLines()
getScoreBoardLines()Returns:
(table) list of lines.
Example Usage:
-- Example code showing how to use the function
local scoreboard = player.getScoreBoardLines()
for index, line in ipairs(scoreboard) do
player.addMessage(line)
endgetTab()
getTab()Returns:
(table) list of lines.
Example Usage:
-- Example code showing how to use the function
local tab = player.getTab()
if tab.header then
player.addMessage(tab.header)
end
if tab.body then
for index, line in ipairs(tab.body) do
player.addMessage(line)
end
end
if tab.footer then
player.addMessage(tab.footer)
endgetEyePosition()
getEyePosition()Returns player eye position.
Returns:
(table) eye position (x, y, z).
Example Usage:
-- Example code showing how to use the function
local eyePostion = player.getEyePosition()
local x = eyePostion.x -- Number
local y = eyePostion.y -- Number
local z = eyePostion.z -- NumberaddToast(title, description, time)
addToast(title, description, time)Returns player eye position.
Parameters:
title (string)
description (title)
time (number milliseconds)
Example Usage:
-- Example code showing how to use the function
player.addToast("Hypixel Cry", "Script has new version", 10000) -- Show toast to 10 secondsgetLookEndPos(number)
getLookEndPos(number)Returns player eye end position.
Parameters:
distance(number) - Distance from the player's view.
Returns:
(table) eye end position (x, y, z).
Example Usage:
-- Example code showing how to use the function
local lookEndPosition = player.getLookEndPos(5.0)
local x = lookEndPosition.x -- Number
local y = lookEndPosition.y -- Number
local z = lookEndPosition.z -- NumbergetLookEndPos(table)
getLookEndPos(table)Returns player eye end position.
Parameters:
table(x, y, z) - Table with end point coordinates.
Returns:
(table) eye end position (x, y, z).
Example Usage:
-- Example code showing how to use the function
local look = {
x = 1,
y = 1,
z = 1
}
local lookEndPosition = player.getLookEndPos(look)
local x = lookEndPosition.x -- Number
local y = lookEndPosition.y -- Number
local z = lookEndPosition.z -- Numberraycast(number)
raycast(number)Returns raycast result from eye.
Parameters:
number- Raycast distances from eyes.
Returns:
Global
(table) Result of raycast.
If block
(table) (type, x, y, z) Result of raycast.
If entity
(table) (type, entityData) Result of raycast.
Example Usage:
-- Example code showing how to use the function
local raycastResult = player.raycast(4.5)
if raycastResult == nil then
print("MISS")
else
local resultType = raycastResult.type
if resultType == "block" then
local x = raycastResult.blockPos.x -- Number
local y = raycastResult.blockPos.y -- Number
local z = raycastResult.blockPos.z -- Number
elseif resultType == "entity" then
local entityData = raycastResult.data
end
endLast updated