Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

How to make stamina percentage in Baldi's Basics

A Tutorial for Baldi's Basics in Education and Learning

No ads for members. Membership is 100% free. Sign up!
This will also be a quicky tutorial (Tutorial requested by DatOneSteveBoi)

1. Go to GameControllerScript

2. Replace all of the code before the 

else if (Time.timeScale != 0f)
        {
            Time.timeScale = 0f;
        }
code BUT before the if (this.player.gameOver) condition having to do with the warning text.

3. Copy this between those pieces of code:

if (this.player.stamina < 0f)
        {
            this.warning.SetActive(true);
            this.warning.GetComponent().text = "Your Text";
            this.warning.GetComponent().fontSize = 20;
        }
        else if (this.player.stamina >= 0f)
        {
            int num = Mathf.RoundToInt(this.player.stamina);
            if (this.player.stamina < (float)num)
            {
                num--;
            }
            this.warning.SetActive(true);
            if (num >= 1)
            {
                this.warning.GetComponent().text = num.ToString() + "% Stamina Left";
            }
        }
And yes this works on all versions
Sign up to access this!

Embed

menu
Share banner
Image URL
HTML embed code
BB embed code
Markdown embed code

Credits

Authors
LuisRandomness avatar Ruler Productions Flag
Affiliation
Ruler Productions
LuisRandomness username pic Joined 1y ago
Baldi Manager
Offline
Ruler Productions Flag Affiliation: Ruler Productions
225 points Ranked 54745th
15 medals 2 rare
  • Achieved Game Manager clearance Medal icon
  • Returned 1000 times Medal icon
  • One month a member Medal icon
  • Submission featured Medal icon
  • Returned 100 times Medal icon
  • Reached 10 subscribers Medal icon
founder of this code
RealT5mpler
RealT5mpler Joined 7mo ago
Offline
2,187 points Ranked 20516th
13 medals 2 rare
  • Returned 1000 times Medal icon
  • 25 posts awarded Exemplary Feedback Medal icon
  • One month a member Medal icon
  • Returned 100 times Medal icon
  • 1 post awarded Exemplary Feedback Medal icon
  • 5 posts awarded Exemplary Feedback Medal icon
creator of tutorial

Submitter

RealT5mpler avatar
RealT5mpler Joined 7mo ago
Not on right ok
2,187 points Ranked 20516th
13 medals 2 rare
  • Returned 1000 times Medal icon
  • 25 posts awarded Exemplary Feedback Medal icon
  • One month a member Medal icon
  • Returned 100 times Medal icon
  • 1 post awarded Exemplary Feedback Medal icon
  • 5 posts awarded Exemplary Feedback Medal icon
RealT5mpler
Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!

Game

Sign up to access this!

Category

Details

Difficulty Level
Beginner

Attributes

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • 1
  • 1.2k
  • 9
  • 27d
  • 27d

More from Submitter

menu

WiPs by Submitter

menu

More Other/Misc Tutorials