Brickadia logo Brickadia icon
Search Blog Servers Contact
Login
Back to gallery
Preview of upgrade function
Prefab preview
Prefab

upgrade function

Created by jm0739

you can use this to add upgrades to your project. inputs: reset: resets the level of the function to 0 price array reference: connect an array reference to this function. the array contains numbers representing prices of the levels. an array with numbers 5, 10, 20 would make level 1 cost 5 points, 2 cost 10 points and 3 cost 20 points budget: number that determines how much points you have max level: limits the number of times you can upgrade the script outputs: upgraded: outputs true if function was upgraded (inner variable incremented) other true/false outputs will output false when this is true price: outputs the price of the upgrade use to determine how many points you have to take away from the player not enough to buy: outputs true if budget is < price of the current level ,other true/false outputs will output false when this is true maxed out: outputs true if max level < function level (variable inside) other true/false outputs will output false when this is true level: outputs the current level (value of variable inside) ---------------------------------------------------------- how to set up? brick that gets value of variable/stat that you want to use as currency for buying the upgrade the value goes into the function array goes into the function represeting the upgrade prices of the function max upgrade can be manually set to a constant trigger function exec output goes trough some logic that takes away the points that the player spend (only if upgraded is true), just subtract the number in the price output from the variable or stat that you want to use for upgrading

Microchip
likes
4 views
View in game

Published
October 21, 2026 at UTC
Updated
October 21, 2026 at UTC
Version
1
Share code
x1q-89d-54z

User-submitted content

This page was automatically generated from content submitted by a user. It has not been authored, verified, or endorsed by Brickadia, LLC. Report inappropriate or unlawful content here.

More by jm0739

Explore more prefabs from this creator.

advanced calculator
1
42
jm0739
keyboard
0
43
jm0739
command arguments scripts
1
53
jm0739
object array to string array
0
15
jm0739
PGA33X6 microchip
0
24
jm0739
3 state selector microchip
1
23
jm0739
pathway prefabs
3
45
jm0739
PGA33X6
2
80
jm0739
3 state selector
1
24
jm0739
smallest controlleable light grid
0
53
jm0739
keypad 2
0
29
jm0739

More prefabs to explore

Keep discovering what the Brickadia community is building.

Browse all
Carbon Fiber Rod
2
7
Sedna1694
longurt
1
7
Kat
Infinite Minesweeper
5
25
Sunny333
Sweeper
5
41
Think
Bresenham’s Line Generation Algorithm
1
17
Dogelix
Space station 14 SpaceVillianArcade
2
24
Gearshark
GET-POWER 2000 (Signal Detector & Relay)
4
35
Harry Covert
Trans Flag Rug
4
28
Lunakibby
King-Size Bed on Wooden Slats
3
21
Lunakibby
turbo baby car
1
19
rice_junk
Cat Tree Complex
1
13
Lunakibby
The KwikTop [WORKS!] (read desc)
3
92
Kris Dreemurr

© 2025 Brickadia, LLC • All rights reserved.
Brickadia is a registered trademark of Brickadia, LLC.

Navigation Search Blog Servers Contact Login
Support Contact Media Kit
Legal Terms Privacy