EFTCheatPVE/EscapeFromTarkovCheat/Features/SpeedHack.cs

29 lines
728 B
C#

using System;
using EscapeFromTarkovCheat.Utils;
using UnityEngine;
namespace EscapeFromTarkovCheat.Features.Misc
{
public class SpeedHack : MonoBehaviour
{
public void Update()
{
if (Main.GameWorld != null && Settings.SpeedHack)
{
this.Enable();
}
}
private void Enable()
{
if (Main.LocalPlayer == null && Main.MainCamera == null)
{
return;
}
if (Input.GetKey(KeyCode.LeftShift))
{
Main.LocalPlayer.Transform.position += Settings.SpeedAddition * Time.deltaTime * Main.MainCamera.transform.forward;
}
}
}
}