Skip to content
RustPluginGenerator

Describe it.
Get a working
Rust plugin.

Type the mechanic you want in plain English. Get an Oxide & Carbon plugin with config, commands, permissions and install steps, checked by a real compiler, in under a minute.

Oxide & Carbon
Try:
  • 2 free plugins a month, no card
  • Runs on Oxide (uMod) and Carbon
  • Every plugin compile-checked against Rust + Oxide

One prompt in. A plugin you can drop into oxide/plugins.

Every generation hands back the same four things: the plugin file, its default config, the permissions and commands it registers, and the steps to install it. Here is one for the prompt below.

The prompt
Make an Oxide Rust kill rewards plugin that gives scrap to the killer on player kills, skips NPCs, suicides and team kills, has a headshot bonus, a killrewards.use permission, and configurable amounts and messages.
Permissions
killrewards.use
Commands
None, it runs on its own
Config fields
6
Read how this kill rewards plugin works
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Oxide.Core;

namespace Oxide.Plugins
{
    [Info("KillRewards", "RustPluginGenerator", "1.0.0")]
    [Description("Awards a configurable item to the killer on every player kill, with an optional headshot bonus.")]
    public class KillRewards : RustPlugin
    {
        private const string PermUse = "killrewards.use";

        private PluginConfig config;
        private bool warnedInvalidItem;

        private class PluginConfig
        {
            [JsonProperty("Reward Shortname")]
            public string RewardShortname { get; set; } = "scrap";

            [JsonProperty("Reward Amount")]
            public int RewardAmount { get; set; } = 25;

            [JsonProperty("Headshot Bonus Amount")]
            public int HeadshotBonusAmount { get; set; } = 25;

            [JsonProperty("Require Permission")]
            public bool RequirePermission { get; set; } = false;

            [JsonProperty("Message Killer")]
            public bool MessageKiller { get; set; } = true;

            [JsonProperty("Announce To Server")]
            public bool AnnounceToServer { get; set; } = false;
        }

        protected override void LoadDefaultConfig() => config = new PluginConfig();

        protected override void LoadConfig()
        {
            base.LoadConfig();
            try
            {
                config = Config.ReadObject<PluginConfig>();
                if (config == null) throw new Exception();
            }
            catch
            {
                PrintWarning("Configuration file is invalid, using defaults");
                LoadDefaultConfig();
            }
            SaveConfig();
        }

        protected override void SaveConfig() => Config.WriteObject(config);

        protected override void LoadDefaultMessages()
        {
            lang.RegisterMessages(new Dictionary<string, string>
            {
                ["Reward"] = "You received {0} x {1} for killing {2}.",
                ["RewardHeadshot"] = "You received {0} x {1} for a headshot kill on {2}.",
                ["Announce"] = "{0} was killed by {1}.",
                ["InvalidItem"] = "KillRewards: the reward shortname '{0}' is not a valid item."
            }, this);
        }

        private void Init()
        {
            permission.RegisterPermission(PermUse, this);
        }

        private void OnEntityDeath(BaseCombatEntity entity, HitInfo info)
        {
            if (entity == null || info == null) return;

            var victim = entity as BasePlayer;
            if (victim == null || victim.IsNpc || !victim.IsConnected) return;

            var killer = info.InitiatorPlayer;
            if (killer == null || killer.IsNpc || !killer.IsConnected) return;
            if (killer.userID == victim.userID) return;

            // Team check: same non-zero team id means a team kill.
            if (killer.currentTeam != 0 && killer.currentTeam == victim.currentTeam) return;

            if (config.RequirePermission && !permission.UserHasPermission(killer.UserIDString, PermUse)) return;

            GiveReward(killer, victim, info.isHeadshot);
        }

        private void GiveReward(BasePlayer killer, BasePlayer victim, bool headshot)
        {
            int amount = config.RewardAmount;
            if (headshot) amount += config.HeadshotBonusAmount;
            if (amount <= 0) return;

            var item = ItemManager.CreateByName(config.RewardShortname, amount, 0);
            if (item == null)
            {
                if (!warnedInvalidItem)
                {
                    warnedInvalidItem = true;
                    PrintWarning($"Invalid reward shortname '{config.RewardShortname}', no rewards will be given until it is fixed.");
                }
                return;
            }

            killer.GiveItem(item);

            if (config.MessageKiller)
            {
                string key = headshot ? "RewardHeadshot" : "Reward";
                SendReply(killer, Msg(key, killer.UserIDString, amount, item.info.displayName.english, victim.displayName));
            }

            if (config.AnnounceToServer)
            {
                Server.Broadcast(Msg("Announce", null, victim.displayName, killer.displayName));
            }
        }

        private string Msg(string key, string userId = null, params object[] args) =>
            string.Format(lang.GetMessage(key, this, userId), args);
    }
}

From idea to running plugin in four steps

No C# required. You stay in control of what the plugin does before a single credit is spent on code.

  1. Describe the mechanic

    Write it the way you would explain it to another admin: what triggers it, who gets what, and any limits or cooldowns.

  2. Review the plan

    Before any code is written you see the hooks, commands, permissions and config fields it will use. Change anything, then approve.

  3. Get a compiled plugin

    The .cs file is compiled against the current Rust and Oxide assemblies. Compiler errors are fixed automatically, up to three rounds.

  4. Edit by chatting

    “Add a 10 minute cooldown.” Each edit is recompiled, costs half a credit, and is saved as a new version.

One commissioned plugin costs more than a month of Pro

Custom Oxide plugin gigs on freelance marketplaces start around $15 and take days. Pro is $12 a month for 40 plugins, each ready before your coffee is.

Commissioning a plugin compared with RustPluginGenerator Pro
Compared onFreelancerPro plan
PriceAbout $15 per plugin$12 a month
PluginsOne per order40 every month
DeliveryA few daysUnder a minute
ChangesAnother order, another waitChat edits, recompiled instantly
After a Rust updatePay again to fix itUpdate Guard repairs it

Update Guard

Wipe day breaks plugins. We fix yours before your players log in.

On the first Thursday of every month Facepunch ships an update and Oxide follows. Hooks get renamed, types move, and plugins that worked yesterday fail to compile. Update Guard watches every plugin you saved.

  • Recompiled on every update

    Your saved plugins are compiled against each new Rust and Oxide build the day it ships.

  • Broken plugins get repaired

    Renamed hooks, moved types and changed signatures are fixed, then compiled again to prove it.

  • The fixed file lands in your inbox

    You get an email with what changed and the new .cs, before players notice anything.

Included in Pro (up to 20 plugins) and Server Network (unlimited). See what changed in recent updates

A welding torch throwing sparks over a broken part on a scrap-metal workbench

What server owners build with it

Pick an idea to open it in the generator with the prompt filled in. Change the numbers to fit your server.

Browse all plugin recipes

Or start from a plugin that already works

736 hooks documented with a full example plugin, 170 recipes you can copy, and 62 error fixes. All free to read.

All 906 hook examples and recipes compiled against Rust 2635.289.1 / Oxide 2.0.7839

Plugin recipes

All recipes

Popular hooks

Recently updated

Questions server owners ask

Something else? Email support@rustplugingenerator.com or read the guides.

What is RustPluginGenerator?

An AI plugin generator for Rust servers. You describe a mechanic in plain English ("give 50 scrap per kill") and get a C# plugin for Oxide (uMod) and Carbon, with a default config file, a commands and permissions table and install steps.

Do I need to know C#?

No. You review a plain-English plan (hooks, commands, permissions, config fields) before any code is written, and change the result by chatting: "make the cooldown 10 minutes". If you do know C#, the code is clean, commented where it matters and yours to edit.

How do I know the plugin will compile?

Every generation is compiled against the current Rust and Oxide reference assemblies. If the compiler finds errors, they are fixed automatically and compiled again, up to three rounds. You see the result and the versions it was checked against.

Does it work on Carbon?

Yes. Carbon loads Oxide plugins, so the same .cs file goes into carbon/plugins instead of oxide/plugins. Install steps for both are included with every plugin.

Is the generated code safe to run on my server?

Every plugin passes a static safety check before you get it. It blocks hardcoded admin grants or SteamIDs, hidden commands that are not in the commands table, network calls you did not ask for, file access outside the plugin data and config folders, and obfuscated code.

What happens when Rust updates and a plugin breaks?

With Update Guard (Pro and Server Network), your saved plugins are recompiled against each new Rust and Oxide release. Anything that broke is repaired, compiled again and emailed to you.

Who owns the plugins I generate?

You do. Use them on your servers, edit them, share them. On the free plan each file starts with a one-line credit comment; paid plans remove it.

What counts as a generation?

A new plugin costs 1 credit and a chat edit costs half a credit. Free includes 2 a month, Pro 40 and Server Network 150. Need a few more without a subscription? The credit pack is $9 for 15 and never expires.

What should your server do after the next wipe?

Describe it now. Your first two plugins each month are free.

Oxide & Carbon