Skip to content

Instantly share code, notes, and snippets.

View naturecodevoid's full-sized avatar
💭
I may be slow to respond.

naturecodevoid

💭
I may be slow to respond.
View GitHub Profile
@naturecodevoid
naturecodevoid / CooldownButton.cs
Last active May 11, 2021 14:36 — forked from gabriel-nsiqueira/CooldownButton.cs
CooldownButton for Among Us mods (with example)
/*
HOW TO USE: (reactor is recommended)
1. Copy the code in this file (not including this comment) to CooldownButton.cs
2. Get an image for your button (150 x 150 pixels is recommended) and add it to the VS solution. Make sure the 'Build Action' of the image in VS is 'Embedded resource'
3. Make a button patch. This one will make a button in the bottom left of the screen that prints 'PRESS' on press, everyone can press it and has a cooldown of 5 seconds.
```
[HarmonyPatch(typeof(HudManager), nameof(HudManager.Start))]
public static class ExampleButton
{
private static CooldownButton btn;
git rm -r --cached .
git add .