helper functions added
- Added helper functions to facilitate Vector3 and Transform operations. - Defined operator overloads for Vector3 (not tested). - Added fly and spawnPrefab functions to the Misc namespace (not tested). - Added fly speed to settings.
This commit is contained in:
@@ -277,9 +277,10 @@ void DrawMiscTab() {
|
||||
|
||||
/*
|
||||
if (ImGui::Button("Unlock Achievements")) {
|
||||
//Unlock Achievements
|
||||
Misc::CustomizedLobby();
|
||||
}
|
||||
|
||||
|
||||
if (ImGui::Button("TP Keys")) {
|
||||
//Misc::TPKeys();
|
||||
}
|
||||
@@ -289,13 +290,17 @@ void DrawMiscTab() {
|
||||
|
||||
ImGui::Checkbox("Change server name", &settings::server_name_spoof);
|
||||
ImGui::InputText("New name##server", &settings::server_name);
|
||||
*/
|
||||
|
||||
ImGui::Checkbox("Fly", &settings::fly);
|
||||
ImGui::SliderFloat("Speed: ", &settings::fly_speed, 1.f, 10.f);
|
||||
|
||||
/*
|
||||
if (ImGui::Button("Make random noise")) {
|
||||
//Misc::PlayRandomSound();
|
||||
}
|
||||
|
||||
|
||||
ImGui::Checkbox("Walk in lobby", &settings::walk_in_lobby);
|
||||
|
||||
ImGui::Checkbox("Auto respawn", &settings::auto_respawn);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch-il2cpp.h"
|
||||
#include "pch-il2cpp.h"
|
||||
|
||||
#include "Misc.h"
|
||||
#include "Wrapper.h"
|
||||
@@ -138,9 +138,80 @@ void Misc::InstantWin()
|
||||
}
|
||||
}
|
||||
|
||||
// This function has not been tested
|
||||
// This function has not been tested
|
||||
// This function has not been tested
|
||||
void Misc::Fly(float speed) {
|
||||
auto localPlayer = Player::GetLocalPlayer();
|
||||
|
||||
if (localPlayer == nullptr) return;
|
||||
|
||||
auto nb = Player::GetNolan();
|
||||
app::Transform* _transform = Unity::Transform::Get(localPlayer);
|
||||
|
||||
if (_transform) {
|
||||
app::Vector3 pos = Unity::Transform::Position(_transform);
|
||||
|
||||
if (GetAsyncKeyState('W') & 0x8000) {
|
||||
pos = pos + (app::Transform_get_forward(_transform, nullptr) * speed * Time_DeltaTime());
|
||||
}
|
||||
if (GetAsyncKeyState('S') & 0x8000) {
|
||||
pos = pos - (app::Transform_get_forward(_transform, nullptr) * speed * Time_DeltaTime());
|
||||
}
|
||||
if (GetAsyncKeyState('D') & 0x8000) {
|
||||
pos = pos + (app::Transform_get_right(_transform, nullptr) * speed * Time_DeltaTime());
|
||||
}
|
||||
if (GetAsyncKeyState('A') & 0x8000) {
|
||||
pos = pos - (app::Transform_get_right(_transform, nullptr) * speed * Time_DeltaTime());
|
||||
}
|
||||
if (GetAsyncKeyState(VK_SPACE) & 0x8000) {
|
||||
pos = pos + (app::Transform_get_up(_transform, nullptr) * speed * Time_DeltaTime());
|
||||
}
|
||||
if (GetAsyncKeyState(VK_LCONTROL) & 0x8000) {
|
||||
pos = pos - (app::Transform_get_up(_transform, nullptr) * speed * Time_DeltaTime());
|
||||
}
|
||||
|
||||
auto component = Unity::GameObject::GetComponentByName(localPlayer, "UltimateCharacterLocomotion");
|
||||
|
||||
if (component) {
|
||||
app::UltimateCharacterLocomotion* locomotion = reinterpret_cast<app::UltimateCharacterLocomotion*>(component);
|
||||
|
||||
if (locomotion) {
|
||||
if (app::UltimateCharacterLocomotion_SetPosition_1 == nullptr) return;
|
||||
|
||||
app::UltimateCharacterLocomotion_SetPosition_1(locomotion, pos, false, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Misc::CustomizedLobby()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// This function has not been tested
|
||||
// This function has not been tested
|
||||
// This function has not been tested
|
||||
void Misc::SpawnPrefab(app::PrefabId id) {
|
||||
if (il2cppi_is_initialized(app::BoltPrefabs__TypeInfo)) {
|
||||
app::PrefabId pGate = (*app::BoltPrefabs__TypeInfo)->static_fields->ManorGate;
|
||||
|
||||
app::Quaternion rotation = app::Quaternion_get_identity(NULL);
|
||||
|
||||
auto localPlayer = Player::GetLocalPlayer();
|
||||
|
||||
if (localPlayer) {
|
||||
app::Transform* _transform = Unity::Transform::Get(localPlayer);
|
||||
if (_transform == nullptr) return;
|
||||
|
||||
app::Vector3 pos = Unity::Transform::Position(_transform);
|
||||
|
||||
// CRASH????????????????
|
||||
app::BoltNetwork_Instantiate_6(pGate, pos, rotation, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void Misc::RankSpoofer(int value) {
|
||||
@@ -182,9 +253,6 @@ void Misc::FullBright()
|
||||
}
|
||||
}
|
||||
|
||||
void Misc::Fly() {
|
||||
|
||||
}
|
||||
|
||||
void Misc::Revive(bool self)
|
||||
{
|
||||
|
||||
@@ -9,9 +9,10 @@ namespace Misc {
|
||||
void CarryItem(const char* itemName);
|
||||
void CarryAnimal(const char* animalName);
|
||||
void InstantWin();
|
||||
void Fly(float speed);
|
||||
void CustomizedLobby();
|
||||
void SpawnPrefab(app::PrefabId id);
|
||||
void FullBright();
|
||||
void Fly();
|
||||
void Revive(bool self);
|
||||
void GetKeys();
|
||||
void Jumpscare();
|
||||
|
||||
@@ -113,6 +113,9 @@ void Run()
|
||||
if (settings::fullBright)
|
||||
Misc::FullBright();
|
||||
|
||||
if (settings::fly)
|
||||
Misc::Fly(settings::fly_speed);
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(400));
|
||||
}
|
||||
CreateThread(0, 0, EjectThread, 0, 0, 0);
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace settings {
|
||||
bool server_name_spoof = false;
|
||||
std::string server_name = "Jadis0x";
|
||||
bool fly = false;
|
||||
float fly_speed = 1.f;
|
||||
bool unlock_all = true;
|
||||
bool exp_modifier = false;
|
||||
int new_exp = 2000;
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace settings {
|
||||
extern bool server_name_spoof;
|
||||
extern std::string server_name;
|
||||
extern bool fly;
|
||||
extern float fly_speed;
|
||||
extern bool unlock_all;
|
||||
extern bool exp_modifier;
|
||||
extern int new_exp;
|
||||
|
||||
Reference in New Issue
Block a user