Script Builder Tool V2
Create Your Own Scripts Without Programming Knowledge
It’s been 2 years since we released our Script Builder Tool v1. While it was getting the job done, we wanted to make it more powerful and easier to use. We’re happy to announce the release of Script Builder Tool v2. While the concept remains the same, we’ve made significant improvements to it and we listened to your feedback!
Updated 4/23/2026
What is Script Builder Tool v2?
The Script Builder Tool v2 is a constructor that lets you create your own scripts for games that we support.
While there is a learning curve, it does not require programming knowledge. It is a “block constructor” with different views (tree, flow chart, blueprint, list) that lets you connect blocks to create your very own scripts. It comes with an AI assistant powered by Anthropic’s Claude that can load PrimeBot’s script library and replicate our ways of script creation.
Are there any limitations?
While this new tool is focused on letting you create much more advanced scripts than the first release, it still has some limitations. Building insanely complex scripts that work with difficult in-game animations might be difficult (yet still possible). If you look at the scripts that we provide, if used correctly, this tool can be used to recreate around 90% of them.
Requirements
In order to use this tool and load scripts you create into the bot, you must have an active script builder tool license.
We recommend checking out this tutorial before making a purchase to get an understanding of what exactly this tool is. We’re trying to keep things as simple as possible and are working on adding more video tutorials. It is strongly suggested to not skip any chapters of this tutorial as we’ll go from the basics to advanced features and the examples will be reused sometimes.
Get lifetime access to the Script Builder Tool and start creating your own scripts today.
Buy Tool LIFETIME ($25)Creating Projects
Open the tool, the project manager window will show up. Configure the basic settings (script name, version, timeout, description, author name) to your liking and select the game(s) that the script should work on. Press the “Create Project” button.
In our first example we will start off with a very simple script for Kingshot that most other games share the concept with. The script that we’re going to build in the first basic example will open up the alliance help menu and press the “help all” button.

After creating your first project you will run into a quick tutorial that will explain the user interface basics. If you ever want to re-open that tutorial, press the “?” button in the top right corner of the script builder menu.
Script Health
We’ve been trying to make this version as user friendly as possible — we’ve added various script health indicators that will give you some advice and sometimes even point out clear errors.
In the top left bar you will notice your script health status. It will say “Script looks good”, “X things to check” or “X errors detected”. You can press the health status and a window will pop up explaining what potential issues you may face with the script, or what errors the program has detected. Keep in mind that “things to check” aren’t necessarily errors, just recommendations in most cases.
Scan & Fix
One of the cool features is the new “scan & fix” option that you can find in the top right corner. The program is able to automatically fix some errors for you! Often times it will locate issues and describe what the problem is. In some cases it will have a “jump” button that will navigate you to the block that has potential issues for you to fix. Sometimes it will have an option to automatically fix things.
Some failsafes are even built into the compilator — when you press “build script”, if there are any warnings or errors that the program can spot it’ll suggest you to fix the issues!
Understanding How Your Script Works
The entire process of script building is adding and connecting blocks. Before we get into that it is important to understand how the script will function. Your script will be executed from top to bottom in a loop until you add a block that stops the script.
For better understanding imagine this basic task: open the alliance help tab and press the help all button. Your logic should look something like this:
Block Types
There are 4 main block types that you can create:
A logical “if” block. Checks if something is on screen or a condition is met. Example: “if alliance menu is open”.
An action block. Performs a certain action. Example: “click X, Y coordinate on screen”.
Only connects to a “Check If” block. Logic: “if not, then…”. Example: “if alliance menu is open, else”.
Restart or stop the script. return 0 = restart, return -1 = stop, return 1000 = wait 1s then restart.
Working with Blocks
We tried to keep it as simple as possible and created 4 different views. You can experiment with all 4 to see which one you prefer. Based on beta stage feedback, Tree or Blueprint is usually easiest.
- Tree — hierarchical outline (recommended for beginners)
- Blueprint — node-based visual editor
- Flowchart — diagram-style layout
- List — simple sequential view
Example of the Described Script
Image 1 – Top layer logic

Image 2 – Full logic (compact view)

Image 3 – Full logic (blueprint view)

Saving Templates
Templates are screenshots taken from the game. You will be using them a lot to tell the bot where it has to click or what it has to look for.
Sticking with our basic script example (pressing the alliance help button), the bot already knew how to open the alliance menu but not how to open the alliance help menu, nor what the help all button looks like. We had to take 2 small screenshots:
- Alliance help tab icon
- Help all button

How Do I Capture Templates?
This tool makes working with templates super simple! To take a screenshot of a button or element, follow these steps:
- Make sure that the template is currently visible on your emulator.
- In the script builder tool open the “screen” tab.
- Press the “update screenshot” button.
- Select 2 points on the screenshot to build a rectangle around it.
- Give the template a name and press “save”.

How Do I Use My Saved Templates?
There are many ways to use templates — you can tell if a menu is open if a template is on screen, check whether a button is visible, or use them as timeouts (press a button and wait until a template appears to confirm the menu opened).
You’ll be presented with a “template address” field and 2 buttons: Browse Template (select from saved templates) and Capture Now (crop live). You’ll also often see a Threshold Normed value representing confidence (0.0–1.0). We recommend setting it between 0.65 and 0.8.
Is Template on Screen?
Let’s check if the help all button is on screen. Add the “Is template visible on screen?” block, press “Browse Template” and select it. Set the threshold to 0.75.
Adding the check if block:

Result after adding remaining logic:

Click Template
Let’s expand and make the bot click the template. Add a “Check If – click template” block right after the log message. Browse the template, set threshold to 0.75 and add the block. Note: there’s also an identical “Do This” block that lets you click templates.
Adding the click block after the log message:

Result after adding all logic:

Find Template – Interact if Found
This “Do This” block checks if a template is on screen, interacts with it, and can also sleep statically or until a condition is met.
Contains Color
The contains color method checks whether a button can be interacted with. On most games buttons become grayscale or change color depending on their state. This block can check a fixed template or scan an area live via the “crop” button.
Cropping a live area and checking whether the button is blue:

Basic Actions
Let’s discuss some basic actions you will commonly use — clicking coordinates, waiting, typing text, etc. We’ll focus on the ones we find most useful; there are many more methods available.
Clicking Area
Click at X, Y Coordinates
A self-describing action — the bot taps the given point. Pass the X and Y coordinates found using the “screen” tab.
Click Inside Rectangle
A more practical way to tap an area. Most of the time you don’t want to click a fixed coordinate — you want to interact within an area randomly. This block accepts a rectangle (X, Y, Width, Height) and has a “Pick on screen” button to select the area live.

Typing Text
Typing text is as straightforward as it gets — use the “Type text” block and enter the text you want the bot to type into the “Message” parameter.
Waiting (Sleeping)
Wait (ms) – Static Sleep
Tells the bot to wait X milliseconds. For 5 seconds, pass 5000.
Wait Until Condition
A “Check If” block — usually the best way to make the bot wait. More efficient than static sleep: the bot only waits as long as needed until the condition is met. Conditions are explained in a later chapter.
Pinch Zooming
There are 2 blocks to zoom in and zoom out. The optimal way to use them is combined with flags (explained in a later chapter).
Dragging (Scrolling)
Used for scrolling in menus or moving the camera. Key parameters:
- X, Y start — the point the bot taps and holds
- X, Y end — the point the bot drags toward
- Step — how many steps the drag registers; 25–35 is optimal
- Execution time (ms) — how fast the event executes; 500–1000 is optimal
Operators
Some blocks will require you to set up an operator — a logical comparison such as “is equals to”, “is lower than”, “is greater or equal to”, etc.
For example, let’s roll a random number from 0 to 100 and act based on the result. If the number is greater than 50 we’ll print “win”, else “lose”.
Add a “check if random integer (number, number)” block and pass min 0, max 100. After adding it, select that block — in the right panel you’ll see “! operator required” under “condition logic”. Set the compare result to “is greater than” and enter 50 in the “compare value” field. Hit “Apply Changes” and add the remaining log message logic.

Reading Text
Setting up text reading in the new version has been made way easier! There are multiple blocks you can use, but we strongly suggest using the “Read text from area” Check If block that accepts Screen Area and Image Filter parameters.
For an example we’ll read text on the Kingshot game from the Infantry building to determine whether the correct troop type is selected. First let’s look at what the menu looks like with different troops selected:

Find the “check if read text from area” block that accepts an area and filter:

Pick an area on screen and select the relevant part — in our case it’s the top line:

Configure the filter by pressing “Configure threshold”. In most cases use filter type 1 or 3. The value depends on screen noise but in most cases 100–175 works well. The tool automatically updates the image preview — try to remove as much noise as possible so only the text remains. Hit “Test OCR” to check what text the bot reads, then “Apply”.

In our example: with filter 3, 96 the bot can’t read the text, but at 3, 250 it clearly sees “Brave Infantry”.
After applying the filter and adding the block, set up an operator. When reading text, usually use “contains”, “starts with” or “ends with”. Since we want to check for “Brave Infantry” we’ll set the operator to “Contains the text” with value “Brave”.

Final result:

Game Blocks
This tool loads up our actual API (library) for all the games. This means that we’ve already covered most of the regular in-game actions for you! Things like opening common menus, searching entities, and checking if a menu is open are already pre-done. These blocks will have the game name prefix — since in this example we’re working on Kingshot they’ll be labeled “KINGSHOT”.

Let’s build a demo script that finds level 5 wood gathering plots using the Kingshot API. The logic:
- If the search menu is open, check what entity is selected — if it’s not wood, select wood and press search.
- Else if we’re on map, open the entity search menu.
- Else if we’re in base, open the map view.
- Else we’re unsure — try to close any menus or popups to return to base or map.
Step #1 – When search menu is open

Step #2 – When we’re on map

Step #3 – When we’re in base (city)

Step #4 – When we’re unsure (close unknown menus)

As you can see we just built 3/4 of a gathering script without taking any screenshots or putting much effort into it. Full block structure in compact view:

Top layer with steps hidden:

Flags
When done right, flags will bring your scripts to a new level. They add things like “memory” to your script. For example: you want to perform a task only once during script execution — like gathering, making sure you select wood once and move to the next plot. Or you’re trying to close a menu but never succeed — you’d rather try a couple of times and if it doesn’t work, stop the script immediately instead of looping forever.
Script flags have their own menu — open it by pressing the “Flags” button at the top of the tool’s interface.

There are currently 2 flag types:
- boolean — can be set to true or false (2 states)
- int — counter (a number)
To add a flag, select the type, give it a name, set the initial value, then press “Add Flag”. Let’s start with the int type — we’ll call it “closeMenuAttempts” with initial value 0. We’ll use this to limit menu closing attempts so we don’t get stuck in a loop.

Once your script has at least 1 flag, you’ll see new buttons in your block structure: Check Flag and Set Flag.

Let’s improve the Game Blocks script — add a menu closing attempt limit of 5. First check the flag and compare its current value:

Inside the check if flag block, add a return -1 to stop the script:

Now increment the flag by 1. Logic: we land in the otherwise block, attempt to return to base/map (closing menus), check if we’ve done that 5+ times (stop if yes), then increment the counter.

Final result — the script will never get stuck in a long loop:

The boolean flag works the same way but only has 2 values — true or false. Perfect for memory tasks. For example, you want the bot to pinch zoom out only once per run. Create a flag “hasZoomedOut” set to false. In your script, check the flag — if false, zoom out and set the flag to true. The bot will only zoom out once per runtime.
Executors
Executors are bits of prewritten code that will be executed on top of your script — either on script start or end. Depending on the game you play you will see a set of different executors.
To add or remove executors, open the “Executors” menu. Select an executor, set the parameters just as you would in the Add Actions or Conditions menu, select when it should run (on start or on stop) and press “Add Executor”. Executors set to run on start execute before your script code. Executors set to run on stop execute on the engine level — before the next queued script runs.
Executors are super handy — on some games you’ll be able to force the whole building upgrading process by just adding an executor!

In the example above, just by pressing a few buttons, we’ve forced our script to start off by finding the town center building on Kingshot!
Conditions
Conditions are key to building efficient scripts. In simple words, conditions are “Check If” blocks used as a parameter — they usually come with a timeout. When passed into a block, the bot will check if the condition is met for the set timeout period, continuing until it’s met or time runs out.
Conditions have their own menu — press the “Conditions” button at the top of the interface. Let’s add our first condition: checking if the “help all” button is visible by matching our template.

Now let’s use our condition. In a previous chapter we created a script that opens the alliance help menu and presses help all. When opening the alliance help menu we skipped the condition parameter — meaning the bot clicked the help tab button and immediately moved on without waiting for the menu to open. Let’s fix this.
Select “Condition + sleep fallback” in the “after clicking” properties, find our condition in the dropdown and set a timeout in milliseconds — we’ll set it to 3000 (3 seconds). Hit Apply Changes. Now after clicking the “help tab button” the bot will wait up to 3 seconds for the “help button” to appear. If it appears, it moves on immediately without wasting time.

Other Controls
This new tool has many features that are useful but can be missed at first — here’s a quick overview.
Compact Mode
Pressing the compact button in the tree view significantly minimizes the block display, making it much easier to read large scripts.
Collapsing Blocks (Steps)
Once you’ve built a large block with many connections you can hide the steps to clean up your workspace, making it easier to work on the next block.
Right Click Options
Right-clicking a block shows additional options: Duplicate Block, Remove Block, and in blueprint view — wire-related options.
Moving & Scaling in Blueprint
Move blocks by pressing and holding the left mouse button. Scroll by holding the right mouse button and moving. Zoom in/out with the mouse wheel.
Undo and Redo
Press the buttons in the top left corner or use CTRL+Z (undo) and CTRL+Y (redo) on your keyboard.
Searching Blocks
Press the search button next to the view selection (or CTRL+F) to open a search bar and find blocks within your project.
Settings
The settings menu lets you change basic script information. The version auto-increments as you build but can also be set manually.
Viewing Code
If you have programming knowledge (or are just curious), the “View Code” button opens a window showing the actual code the tool generates as you build.
Import and Export
You can import and export your script from the project manager menu. It automatically stores your structure and images, so you can easily share your project with friends.
AI Assistant
We’ve integrated an AI assistant powered by Anthropic Claude into the tool. It can help you build entire scripts — though keep in mind that in most cases you’ll still have to manually adjust some things and the result may not always be correct. It heavily depends on how you describe your script vision and what templates you send to the AI.
To use the AI assistant you’ll need to register on Anthropic (Claude) and add some balance to your account. You’ll receive an API key to add into the AI assistant window. Select the model you want to use (we recommend Sonnet). For accurate up-to-date pricing per token refer to Anthropic.
Attach Images
Attaching images is very important. We recommend taking images of the buttons and menus the bot will work with before sending your request. If you don’t, the AI will ask for them later. Pre-capturing screenshots improves the AI response as it gets a better understanding of what it actually needs to do.
Load All Scripts
By default Claude won’t know how to use “Game Blocks” and will mainly depend on your uploaded templates. By loading all scripts, Claude receives a good portion of our actual scripts, helping it understand what Game Blocks are available. Instead of asking you to take a screenshot of the “open alliance” button it will in most cases find our existing block and use it. Note: this option heavily increases the token size, raising the cost of the request.
Sending a Request
What works best is giving the AI a very detailed step-by-step description of what it has to build. By default it won’t fully know what the menus look like or how to navigate to them. Explaining each step and every image that you attach is key.
Example – Kingshot VIP Claim Daily Rewards Box
We’ve prepared the following instructions for the AI:
We also took all 3 mentioned screenshots and attached them. To make sure the AI uses “Game Blocks” we also loaded all scripts.

After some thinking, the AI generated the following structure — all we have to do is press “Add to Canvas”:

As a result we’ve got a fully functioning script that does exactly what we asked. As mentioned earlier, this won’t always be the case and sometimes manual adjustments will be required.

Get lifetime access to Script Builder Tool V2 and start creating custom automation scripts today.
Buy Tool LIFETIME ($25)