There's a bug in the EndRaffle() function that refunds the wrong amount of scrap when the raffle fails because not enough players have joined the raffle.
To fix it, I changed this (line 523):
BasePlayer player = BasePlayer.FindByID(playerID);
Item item = ItemManager.CreateByItemID(ItemManager.FindItemDefinition(raffleJoin).itemid, raffleRewardAmount);
player.GiveItem(item);to this:
BasePlayer player = BasePlayer.FindByID(playerID);
Item item = ItemManager.CreateByItemID(ItemManager.FindItemDefinition(raffleJoin).itemid, raffleJoinAmount);
player.GiveItem(item);