Skip to content
This repository has been archived by the owner on Aug 31, 2024. It is now read-only.

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
the-real-techiee authored Aug 16, 2024
1 parent fa79362 commit 8e9fd04
Show file tree
Hide file tree
Showing 18 changed files with 6,006 additions and 0 deletions.
41 changes: 41 additions & 0 deletions LevelSpoofer/LevelSpoofer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using AmongUs.Data;
using HarmonyLib;
using BepInEx;
using BepInEx.Unity.IL2CPP;
using BepInEx.Configuration;

[BepInPlugin("com.levelspoofer.techiee", "Level Spoofer", "1.0")]
public class LevelSpooferPlugin : BasePlugin
{
public Harmony Harmony { get; } = new Harmony("Level Spoofer");
public static ConfigEntry<string> LevelSpoofer;
public override void Load()
{
LevelSpoofer = Config.Bind("LevelSpoofing",
"SpoofingValue",
"",
"Spoofed Levels are temporary levels that stay until the mod is inactive. Levels with it's value within 0 and 4294967295 are allowed. Decimal values won't work.");

Harmony.PatchAll();
}
}

namespace LevelSpoofing
{
[HarmonyPatch(typeof(EOSManager), nameof(EOSManager.Update))]
public static class EOSManager_Update
{
public static uint levelvalue;
public static void Prefix()
{
if (!string.IsNullOrEmpty(LevelSpooferPlugin.LevelSpoofer.Value) &&
uint.TryParse(LevelSpooferPlugin.LevelSpoofer.Value, out levelvalue) &&
levelvalue != DataManager.Player.Stats.Level)
{

DataManager.Player.stats.level = levelvalue - 1;
DataManager.Player.Save();
}
}
}
}
20 changes: 20 additions & 0 deletions LevelSpoofer/LevelSpoofer.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<DebugType>embedded</DebugType>

<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix>latest</VersionSuffix>
<Description>Level Spoofer for the game, Among Us</Description>
<Authors>Techiee</Authors>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.662" Private="false" ExcludeAssets="runtime;native" />
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2024.8.13" PrivateAssets="all" />

<PackageReference Include="BepInEx.AutoPlugin" Version="1.1.0" PrivateAssets="all" />
<PackageReference Include="BepInEx.IL2CPP.MSBuild" Version="2.0.1" PrivateAssets="all" ExcludeAssets="runtime" />
</ItemGroup>
</Project>
Loading

0 comments on commit 8e9fd04

Please sign in to comment.