there are two videos for a secret reason https://app.screencastify.com/v2/watch/jNdg82r74s60xm3Ggf7o https://app.screencastify.com/v2/watch/6EIxAGow5Qkb6kE7zeKE the code is below. It works in brython on codehs.com from browser import timer from browser import html import random

crampstate = False sigma_sound = html.AUDIO(src="https://codehs.com/uploads/10946e3cf0070389cdae0405e2eda7d4") cotwopasses = 300 shower_points = 30000 squirt_x = 175 squirt_y = 200 rect = Rectangle(40,40) rect.set_position(-400,-400) add(rect) shower = Image("https://codehs.com/uploads/b37ac46a59e56b2e669dd141a307a095") shower.set_position(0,0) shower.set_size(100,150) text = Text("Did you know that the average person uses") text_2 = Text("300 kilograms (or around 661.387 pounds)") text_3 = Text("of CO2 each week? That's a lot, right?") text.set_position(30,50) text_2.set_position(30,200) text_3.set_position(30,350) text.set_font("15pt Times Roman") text_2.set_font("15pt Times Roman") text_3.set_font("15pt Times Roman") text_6 = Text("Get out stop using the shower you") text_6.set_position(30,100) text_6.set_color("red") text_6.set_font("15pt Times Roman") text_7 = Text(" used too much CO2 RIP imagine hahaha") text_7.set_position(30,200) text_7.set_color("red") text_7.set_font("15pt Times Roman") text_8 = Text("bro ur electricity bill is cooked ☠️☠️☠️") text_8.set_position(30,300) text_8.set_color("red") text_8.set_font("15pt Times Roman") add(text) add(text_2) add(text_3) squirt = Rectangle(40,40) squirt.set_position(175,200) squirt.set_color("orange") text_9 = Text("You cramped. You can't move for 5 seconds") text_9.set_position(10,200) text_9.set_color("red") text_9.set_font("15pt Times Roman") text_10 = Text("You died because you didn't get clean in the shower") text_10.set_position(10,200) text_10.set_color("red") text_10.set_font("14pt Times Roman")

def crashtrigger(): while 1: rect.set_position(-400,-400)

def showering(): global shower_points, cotwopasses time = int(input("How long do you want to spend in the shower? ")) shower_points = shower_points + (3000*time) cotwopasses -= time if cotwopasses < 1: remove_all() add(text_6) add(text_7) add(text_8) sigma_sound.play() timer.set_timeout(crashtrigger,1000) def move_squirt(event): global squirt_x, squirt_y, crampstate if crampstate == True: return if event.key == "ArrowLeft": squirt.move(-40, 0) squirt_x -= 40 if event.key == "ArrowRight": squirt.move(40,0) squirt_x += 40 if event.key == "ArrowUp": squirt.move(0, -40) squirt_y -= 40 if event.key == "ArrowDown": squirt.move(0,40) squirt_y += 40 if squirt_y == 120: if squirt_x == 95: showering() if squirt_x == 55: showering() if squirt_x == 15: showering() if squirt_x == -25: showering() else: return if squirt_y == 80: if squirt_x == 95: showering() if squirt_x == 55: showering() if squirt_x == 15: showering() if squirt_x == -25: showering() else: return if squirt_y == 40: if squirt_x == 95: showering() if squirt_x == 55: showering() if squirt_x == 15: showering() if squirt_x == -25: showering() else: return if squirt_y == 0: if squirt_x == 95: showering() if squirt_x == 55: showering() if squirt_x == 15: showering() if squirt_x == -25: showering() else: return

def showerpoints(): global shower_points shower_points -= 1000 timer.set_timeout(showerpoints, 1000) if shower_points == 0: add(text_10) sigma_sound.play() timer.set_timeout(crashtrigger,1)

def uncramp(): global crampstate remove(text_9) crampstate = False

def cramping(): global crampstate number = random.randint(1,10) if number == 10: add(text_9) sigma_sound.play() crampstate = True timer.set_timeout(uncramp, 5000) timer.set_timeout(cramping, 1000)

def startgame(): remove_all() add(shower) add(squirt) showerpoints() cramping()

def gameintro(): remove_all() text_4 = Text("How about YOU try to waste") text_5 = Text("less?") text_4.set_position(10,200) text_5.set_position(150,300) text_4.set_font("24pt Times Roman") text_5.set_font("24pt Times Roman") add(text_4) add(text_5) timer.set_timeout(startgame, 2000)

timer.set_timeout(gameintro, 4000)

add_key_down_handler(move_squirt)

Built With

  • brython
Share this project:

Updates