Skip to content

Function

Next, we'll write a function. A table is assigned to the function, so you can call it like this:

lua
OnTick(function()
    LocalPlayer.Swing(4)
end)

Defines

Nature script includes several predefined structs.

Vec2 - 2 floats

Vec3 - 3 floats

Vec4 - 4 floats

Example: Vec2.new(100, 100)

Nature

GetVersion

Return: String

Retrieve the version of the Nature client currenty in use as a string.

GetDisplay

Return: String

Retrieves the client's display name.

SetDisplay

Return: Void Arg1: String, Display

Change the client's display name.

Shutdown

Return: Void

Client is being uninjected.

Notification

Add

Return: Void Arg1: String, Title Arg2: String, Message Arg3: Float, Duration

Send a notification to the client

User

GetUsername

Return: String

Retrieve the username from the Nature client.

GetRole

Return: String

Retrieve the role from the Nature client.

LocalPlayer

Swing

Return: Void Arg1: Int, SwingSource

The player swings.

Sources: SwingSource

IsOnFire

Return: Bool

Whether it's in the fire

IsImmobile

Return: Bool

Whether it's immobile

IsDestroyingBlock

Return: Bool

Whether or not you're breaking blocks

GetDisplayName

Return: String

Get the display name

GetEntityIdentifier

Return: String

Get the entity identifier

IsOnGround

Return: Bool

Whether it's touching the ground

GetPosition

Return: Vec3

Get the position

SetPosition

Return: Void Arg1: Vec3, NewPos

Set the position

GetPositionDelta

Return: Vec3

Get the position delta

SetPositionDelta

Return: Void Arg1: Vec3, NewPosDelta

Set the position delta

Packet

SendSwing

Return: Void Arg1: Int, SwingSource

Send the swing packet.

Sources: SwingSource

Render

IsHovering

Return: Bool Arg1: Vec4, Rect

Check if the cursor is in the box.

Text

Return: Void Arg1: Float, Size Arg2: Vec2, Pos Arg3: Vec4, Color Arg4: String, Text Arg5: Int, Font

Draw the string.

Rect

Return: Void Arg1: Bool, Filled Arg2: Float, Round Arg3: Float, Thickness Arg4: Vec4, Pos Arg5: Vec4, Color

Draw the rect.

GetScreenSize

Return: Vec2

Get the screensize.

GetMousePos

Return: Vec2

Get the mousepos.