Uploaded by KokoaKr1

###Enviornment setup, base screen##

advertisement
###Enviornment setup, base screen###
#Background color#
Rect(0,0,400,400, fill='tan')
#Table#
Rect(0,250,400,90,fill='sienna')
Rect(0,340,400,30,fill='saddleBrown')
#Computer casing#
Rect(180,210,40,30,fill='silver')
Rect(140,240,120,20,fill='silver')
Rect(50,40,300,180,fill='silver')
#computer screen#
Rect(60,50,280,160,fill='black')
#mouse and keyboard#
Rect(80,270,160,60,fill='silver')
Rect(290,275,30,50,fill='silver')
Label('G', 305, 309,size=15, fill='black')
Line(305,275,305,295,fill=gradient('red','darkRed',start='top'))
Line(82.5,300,240,300,lineWidth=50,dashes=True,fill=gradient('blue','red','yellow','green',start='left'))
Line(160,272.5,160,330,lineWidth=150,dashes=True,fill=gradient('blue','red','yellow','green',start='left'))
Line(160,325,160,315,lineWidth=50,fill=gradient('red','darkRed',start='right'))
#Urls used#
url1 = 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQJdqg721TCLpmfqAE67RTlz1NnhFWpai8kYg&usqp=CAU'
windowsBG = Image(url1,60,50,width=280,height=160,visible=False)
url2 = 'https://static.techspot.com/images2/downloads/topdownload/2020/06/2020-06-09-ts3_thumbs-7fd.png'
valAPP = Image(url2,70,60,width=40,height=40)
url3 = 'https://theme.zdassets.com/theme_assets/2155033/bc270c23058d513de5124ffea6bf9199af7a2370.png'
mcAPP = Image(url3,70,110,width=40,height=40)
url4 = 'https://assets.stickpng.com/thumbs/580b57fcd9996e24bc43c545.png'
ytAPP = Image(url4,70,160,width=40,height=40)
url5 = 'https://www.freepnglogos.com/uploads/google-logo-png/google-logo-png-webinar-optimizing-for-success-google-business-webinar-13.png'
googleAPP = Image(url5,120,60,width=40,height=40)
url6 = 'https://www.howtogeek.com/wp-content/uploads/2017/06/eds_1-650x363.png?trim=1,1&bg-color=000&pad=1,1'
googleSE = Image(url6,60,50,width=280,height=160,visible=False)
url7 = 'https://pbs.twimg.com/media/E5Jh7CGVEAIy4xx.jpg'
valHS = Image(url7, 60, 50, width=280, height=160, visible=False)
url8 = 'https://img.redbull.com/images/q_auto,f_auto/redbullcom/2020/11/4/yhcorsas0ymty8bvpkeq/the-range-valorant-guide-shooting'
rangeMenuVal = Image(url8, 60, 50, width=280, height = 160, visible=False)
url9 = 'https://social.technet.microsoft.com/Forums/getfile/1276795'
signin = Image(url9,60,50,width=280,height=160)
url10 = 'https://kinsta.com/wp-content/uploads/2018/08/google-404-error-page-1.png'
error404 = Image(url10,60,50,width=280,height=160,visible=False)
app.appList=[windowsBG, valAPP, mcAPP, ytAPP, googleAPP]
###Other Variables###
mouse = Polygon(115, 100, 110, 110, 120, 110, fill='white')
Load_Line = Line(60,130,60,130,fill='blue',visible=False) Load_Screen = Rect(60,50,280,160,fill='white',visible=False)
signInBox = Rect(165,148,70,10,fill='white',visible=False)
###Other Functions###
def onMouseMove(mouseX,mouseY):
mouse.centerX = mouseX
mouse.centerY = mouseY
mouse.toFront()
#Valorant Crosshair, cursor customization
if rangeMenuVal.visible == True:
chs.visible = True
mouse.visible = False
chs.toFront()
chs.centerX=mouseX
chs.centerY=mouseY
valRB.visible = True
def onStep():
app.stepsPerSecond = 5
if Load_Screen.visible == True:
app.stepsPerSecond = 80
Load_Line.visible=True
Load_Line.toFront()
Load_Line.x2 += 2 if (Load_Line.x2 == 340): app.stepsPerSecond = .1
Load_Line.visible = False
Load_Screen.visible = False
if (Load_Screen.visible == False):
Load_Line.visible = False
Load_Line.x2 = 60
app.stepsPerSecond = 5
valPlay.toFront()
###Main Webiste or app functions###
#Google Search Bar#
GSE_SB = Rect(90,150,210,13,fill='white',visible=False)
#Google Exit Button#
GSE_EX = Group(Rect(320,50,20,20,fill='red'),
Label('X',330,60,size=15,fill='white')
)
GSE_EX.visible=False
#Google Back Button#
GSE_BB = Group(
Rect(300,50,20,20,fill='blue'), Label('<',310,60,size=15,fill='white'))
GSE_BB.visible=False
#Valorant Exit Button#
valExit = Group(
Rect(320, 50, 20, 20, fill='red'),
Label('X', 330, 60, size=10, fill='white')
)
valExit.visible=False
valPlay = Group(
Rect(180, 50, 40, 20, fill='gray'),
Label('Play!', 200, 60, size=15, fill='white')
)
valPlay.visible=False
url8 = 'https://img.redbull.com/images/q_auto,f_auto/redbullcom/2020/11/4/yhcorsas0ymty8bvpkeq/the-range-valorant-guide-shooting'
rangeMenuVal = Image(url8, 60, 50, width=280, height = 160, visible=False)
#Vla retun
valRB = Group(
Rect(320,50,20,20,fill='red'),
Label('X',330,60,size=10,fill='white'))
valRB.visible=False
#valorant crosshair
chs = Group(
Line(200, 190, 200, 210, fill='white'),
Line(190, 200, 210, 200, fill='white')
)
chs.visible=False
#Valorant Bots def drawBots():
botX = random.randint(60,340)
botY = random.randint(50,210)
for b in range(len(botX)):
botColor = choice([ 'lightSalmon', 'mediumTurquoise', rgb(156, 100, 221) ])
botWidth = randrange(13, 18)
botHeight = randrange(27, 33)
x = botX [b]
y = botY [b]
bot = Oval(x, y, botWidth, botHeight, fill=botColor)
#hitcounter
hitC = 0
hitLabel = Label(hitC, 160, 75, size=40)
hitLabel.visible = False
#times missed missC = 0
missLabel = Label(missC, 240, 75, size=40)
missLabel.visible = False
#scoremenu (stats of bots)
scoremenu = Group(
Rect(0, 0, 400, 400, fill='lightGray'),
Label('GJ', 200, 100, size = 100),
)
scoremenu.visible = False
##Minecraft functions##
####Code for apps####
def onMousePress(mouseX,mouseY):
##Sign in Screen##
if signInBox.hits(mouseX,mouseY) and signin.visible == True:
sign_in = app.getTextInput('WhAt Is ThE pAsSwOrD?')
if sign_in == 'csp2023':
signInBox.visible = False
signin.visible = False windowsBG.visible = True
##app code for Google##
if googleAPP.hits(mouseX,mouseY) and windowsBG.visible == True:
Load_Screen.visible = True
googleSE.visible = True
GSE_EX.visible = True
GSE_SB.visible = True
GSE_EX.toFront()
windowsBG.visible = False
elif (GSE_EX.hits(mouseX,mouseY) == True):
error404.visible = False
googleSE.visible = False
GSE_SB.visible = False
GSE_EX.visible = False
GSE_BB.visible = False
GSE_EX.toFront()
windowsBG.visible = True
Load_Screen.visible = False
elif GSE_BB.hits(mouseX,mouseY) and error404.visible == True: error404.visible = False
googleSE.visible = True
GSE_SB.visible = True
GSE_BB.visible = False
if ((GSE_SB.hits(mouseX,mouseY) and GSE_SB.visible) == True):
Search = app.getTextInput('Search')
if Search == 'Hello': #This works, we can use this to recognize user inputs
Label('CONFIRM',200,120,size=50,fill='white') #and then link it to "websites" or other interactable stuff.
elif Search != 'Hello': GSE_SB.visible = False
googleSE.visible = False
error404.visible = True
GSE_BB.toFront()
GSE_BB.visible = True
##YoutTube app code##
##Valorant app code##
if valAPP.hits(mouseX, mouseY) and windowsBG.visible == True:
Load_Screen.visible = True Load_Screen.toFront()
windowsBG.visible = False
valHS.visible = True
valPlay.visible = True
valExit.visible = True
valExit.toFront()
valPlay.toBack()
if valExit.hits(mouseX, mouseY) and valHS.visible == True:
valHS.visible = False
valExit.visible = False
valPlay.visible = False
windowsBG.visible = True
Load_Screen.visible = False
if valPlay.hits(mouseX, mouseY) and valHS.visible == True and Load_Screen.visible == False:
rangeMenuVal.visible = True
hitLabel.visible = True
missLabel.visible = True
drawBots()
if valRB.hits(mouseX, mouseY) and rangeMenuVal.visible == True:
chs.visible = False
mouse.visible = True
valRB.visible = False
rangeMenuVal.visible = False
hitLabel.visible = False
missLabel.visible = False
valHS.visible = True
valExit.visible = True
valPlay.visible = True
Download