2025-12-14 19:20:08 -08:00
2025-12-14 19:20:08 -08:00
2024-12-31 21:18:29 -08:00
2025-12-14 18:56:06 -08:00
2025-12-14 18:56:06 -08:00
2024-12-30 04:47:03 -08:00
2024-12-30 04:47:03 -08:00
2025-12-09 16:05:09 -08:00

Roblox Bhop/Surf Bot File Format

Example

Read the whole file and print each position:

use strafesnet_roblox_bot_file::v0::read_all_to_block;

let file=std::fs::read("bot_file")?;
let mut input=std::io::Cursor::new(file);

let block=read_all_to_block(&mut input)?;

for output_event in &block.output_events{
	println!("{:?}",output_event.event.position);
}

Or decode individual blocks using block location info:

use strafesnet_roblox_bot_file::v0::{Block,BlockTimelines,FileHeader};

let file=std::fs::read("bot_file")?;
let mut input=std::io::Cursor::new(file);

// FileHeader is the first 16 bytes of the file.
let header=FileHeader::from_reader(&mut input)?;
// BlockTimelines is an index of the blocks within the file.
let timelines=BlockTimelines::from_reader(&header,&mut input)?;

// offline blocks include the following event types:
// World, Gravity, Run, Camera, Setting
for timed in timelines.offline_blocks(){
	let block_info=timelines.block_info(timed.event)?;
	let block_reader=block_info.take_seek(&mut input)?;
	let block=Block::from_reader(block_reader)?;
}

// realtime blocks include the following event types:
// Input, Output, Sound
for timed in timelines.realtime_blocks(){
	let block_info=timelines.block_info(timed.event)?;
	let block_reader=block_info.take_seek(&mut input)?;
	let block=Block::from_reader(block_reader)?;
}

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Description
No description provided
Readme 960 KiB
Languages
Rust 100%