Is there an easier way to do this?

Basically, I’m try to generate 30 random weapons at the start of the game that players cycle through like a gun game. What I’m doing is using recursion and a loot table to set 30 different properties for each weapon to a name like “CommonWeapon”. That isn’t enough though, because the game needs to reference each weapon using channels.

To compensate for this, I gave each gadget I’m using an ID:

Zapper = Weapon1
Evil Eye = Weapon2
P.M.L. = Weapon3
Wooden Wand = Weapon4
Slingshot = Weapon5
Snowball Launcher = Weapon6

Now, I use more triggers to set the property to something like “UncommonWeapon3”. I also have a knockout tracker, so when a player knocks someone out, I do this:

broadcast message on channel (get property) (create text with) [weapon] [(get property) [knockouts]).

Do you think this will work? Can I optimize this? Do you get what I’m trying to do?

Here is an outdated version of a portion of my code:


The trigger triggers 30 times at max.

What I would do is have a random player relay trigger an item granter with block code. If a property is equal to false, you get the item and the property is set to true for you. It also triggers the next relay on the chain. If it’s true, it triggers the same random player relay again. Then the next random player relay is triggered that is connected to the next item in the cycle. Saves you some properties.

What if you have a lifecycle → relay (random player) that goes through several checkers that check if the player has any weapon. If all checks are false (no weapon), it triggers a trigger that runs random code (between 0 and the number of weapons in Gimkit), and broadcasts on channel #Weapon. You then have item granters that grant the item when receiving on each channel. Finally, you have the trigger retrigger the relay.

This has to happen on knockout though. Basically, like a gun game like roblox arsenal, 30 random weapons are pre-set for you to get when you knockout a player, like this:

Zapper (Common) → Evil Eye (Uncommon) → P.M.L. (Uncommon) → Slingshot (Legendary).

For my old design, you simply got a random weapon on knockout. For the new design, each player will get the same weapon on knockout based on their knockouts, for example: Both players get Zapper → Evil Eye → PML → Slingshot instead of this:

Player 1: Zapper(Common) → Evil Eye (Rare) → Slingshot (Uncommon)

Player 2: Zapper (Common) → Wooden Wand (Legendary) → Snowball Launcher → (Common).

The new design would have Player 2 have the same progression as player 1.

This design is also cool because you can have a “Next Weapon” game overlay that actually works, since all weapons are already preset.

I have a way to do this with number theory, but I’m on mobile, so I can’t go into detail.

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.