Rise 6 Scripting API
  • Introduction
  • Examples
    • Simple vanilla hop
    • Simple collide fly bypass
    • Events example
    • Example settings
    • Exempted value speed bypass
    • Packet nofall
    • Killaura
    • Arraylist
  • API Documentation
    • Scripting metadata
    • Objects
      • FontRenderer
      • Vector
        • Vector3
        • Vector2
      • ItemStack
      • BlockPos
      • Block
      • Inventory
      • Command
      • Module
      • EntityLiving
      • Entity
    • Global namespaces
      • render
      • input
      • world
      • rise
      • player
      • mc
      • network
      • packet
    • Events
      • Load event
      • Unload event
      • Module events
        • Attack event
        • World Change Event
        • Module Toggle Event
        • Server Kick event
        • Game event
        • Chat input event
        • Click event
        • Entity render event
        • Hit slow down event
        • Jump event
        • Keyboard Input event
        • Kill event
        • Move input event
        • Post motion event
        • Pre motion event
        • Strafe event
        • Pre update event
        • Render 2D event
        • Render 3D event
        • Water event
        • Tick event
        • Slow down event
      • onExecute event
Powered by GitBook
On this page
  1. Examples

Events example

Doesn't contain all events.

var module = rise.registerModule("Example", "An example description.")
script.handle("onUnload", function () {
	module.unregister()
})

// Called when you attack an entity
module.handle("onAttack", function(e) {
	return e
})

// Called when you say something in chat
module.handle("onChatInput", function(e) {
	return e
})

// Called when the player clicks
module.handle("onClick", function(e) {
	return e
})

// Called when the player attacks another entity and recieves hit slowdown
module.handle("onHitSlowDown", function(e) {
	return e
})

// Called when you jump
module.handle("onJump", function(e) {
	return e
})

// Called when you press a key
module.handle("onKeyboardInput", function(e) {
	return e
})

// Called a player is killed by you
module.handle("onKill", function(e) {
	return e
})

// Called when movement inputs are accessed
module.handle("onMoveInput", function(e) {
	return e
})

// Called pre motion
module.handle("onPostMotion", function(e) {
	return e
})

// Called pre motion
module.handle("onPreMotion", function(e) {
	return e
})

// Called pre update
module.handle("onPreUpdate", function(e) {
	return e
})

// Called when the 2d ui is drawn
module.handle("onRender2D", function(e) {
	return e
})

// Called when the 3d world is drawn
module.handle("onRender3D", function(e) {
	return e
})

// Called when the player is slowed down by an item
module.handle("onSlowDown", function(e) {
	return e
})

// Called at the start of the clients tick
module.handle("onTick", function(e) {
	return e
})

// Called when the client references inWater method
module.handle("onWater", function(e) {
	return e
})

// Called 20 times per second, just before the players movement is added for the current tick
module.handle("onStrafe", function(e) {
	print("Test") // Prints "Test" to console

	return e
})
PreviousSimple collide fly bypassNextExample settings

Last updated 1 year ago