Gems are required for summoning new characters in Universal Tower Defense. Getting enough gems takes time, but understanding all the ways to earn them helps you build your collection faster. This guide covers every method to get gems in Universal Tower Defense, including an AFK farming strategy using macros that lets you collect gems while you’re away from the game.

All 10 Ways to Get Gems in Universal Tower Defense
There are multiple methods for earning gems in the game. Some methods give you gems automatically just by playing, while others require completing specific tasks.
Method 1: Story Mode Drops
Story Mode stages reward you with gems when you complete them. There are three main locations, each with six stages:
- Ninja Forest (Stages 1-6): Complete any stage in Ninja Forest Story Mode to get gem rewards. The first location in the game is themed around Naruto content.
- Marine Base (Stages 1-6): Complete any stage in Marine Base Story Mode to get gem rewards. The second location is themed around One Piece content.
- Hollowed Moon (Stages 1-6): Complete any stage in Hollowed Moon Story Mode to get gem rewards. The third location is themed around Bleach content.
The amount of gems you get from Story Mode depends on the difficulty slider you set before starting the stage. Higher difficulty percentages give more gems when you complete the stage.

Method 2: Legend Stages Drops
Legend Stages are harder versions of Story Mode stages that give better rewards. Each of the three locations has three Legend Stages:
- Ninja Forest Legend Stages (Stages 1-3)
- Marine Base Legend Stages (Stages 1-3)
- Hollowed Moon Legend Stages (Stages 1-3)
Legend Stages require stronger teams to complete but provide better gem rewards than regular Story Mode stages.

Method 3: Virtual Realm Drops
Virtual Realm is a special game mode with challenging battles that reward gems:
- Hollowed Moon Virtual Realm (Stages 1-3)
- Marine Base Virtual Realm (Stages 1-3)

Method 4: Complete Challenges
The game includes various challenges that reward gems when you finish them. Check the challenges menu regularly to see what tasks are available.

Method 5: Complete Quests
Daily and weekly quests give gem rewards when you finish them. These quests reset regularly, providing a steady source of gems over time. Log in daily to claim and complete quests for consistent gem income.

Method 6: Unlock Achievements
The game has an achievement system that rewards gems when you reach milestones. Achievements might include things like summoning a certain number of units, completing specific stages, upgrading characters, or playing for a certain amount of time. Check your achievements regularly to claim gem rewards.

Method 7: Battlepass Rewards
The battlepass system includes gem rewards at various tiers. As you progress through the battlepass by playing the game and completing objectives, you unlock gem rewards along with other items.

Method 8: Redeem Codes
The developers release codes periodically that give free gems and other rewards.

Method 9: Purchase from the Store
You can buy gems directly using Robux in the in-game store. This is the fastest way to get large amounts of gems but requires spending real money through Roblox’s premium currency system.

Method 10: Purchase from Virtual Shop
The Virtual Shop sometimes offers gem bundles for purchase using in-game currency or Robux. Check the Virtual Shop regularly for deals and special offers on gems.

AFK Gems Farming Guide with Macros
The best way to farm gems efficiently is setting up a macro that plays through Act I Ninja Forest automatically while you’re AFK. This lets you collect gems without actively playing.
Step-by-Step Macro Setup Guide
Follow these steps carefully to set up your AFK gem farming macro:
Step 1: Prepare Your Stage
- Go to Story Mode and select Act I of Ninja Forest
- Set your difficulty slider to a percentage you can comfortably complete
- Start the stage and play through all 15 waves normally
- Complete the stage but DO NOT claim the rewards yet
- Stop on the Victory screen showing your rewards
Step 2: Start Recording
- Open your macro program (InformalTask or TinyTask)
- Press Ctrl + R to begin recording
- IMPORTANT: Only perform the exact inputs you want recorded from this point forward
Step 3: Collect Rewards and Replay
- Click the screen 5-7 times to collect all rewards (click multiple times to ensure you get everything)
- Click the Replay button once on the Victory screen
- Click the Skip button once when the stage starts
Step 4: Place Your Units
- Place down your farming units in their positions
- Upgrade them as needed using the E key (don’t click upgrade with your mouse)
- Click the x1.5 speed button to make the stage run faster
- CRITICAL: Do not move your camera at all during this entire process
Step 5: Play Through the Stage
- Let the stage play normally with your units fighting
- Upgrade units using the E key when needed
- Do not touch your camera or make unnecessary mouse movements
- Wait until you complete all 15 waves and reach the Victory screen again
Step 6: Stop Recording and Loop
- When you reach the Victory screen, DO NOT claim rewards
- Press Ctrl + R to stop recording your macro
- Press Ctrl + L to start looping the playback
- The macro will now repeat your recorded inputs automatically
While the macro runs, your characters gain experience and level up. Using your main team means you’re improving your characters while farming gems, getting double value from your time. For help building a strong team, check our Universal Tower Defense units tier list and relics tier list.
That’s how to get gems in Universal Tower Defense and set up AFK farming. Check out our Universal Tower Defense wiki for more information!