Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; #Warn ; Enable warnings to assist with detecting common errors.
- SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir%\png ; easy way to find images
- #SingleInstance,force
- SetBatchLines,-1
- #Include,<hellbents_gdip>
- popUp:=Layered_Window_SetUp(4,200,400,A_ScreenWidth,A_ScreenHeight,1,"+alwaysontop")
- s:=20
- n:=5
- map := Gdip_CreateBitmap(3*s*n + s, 4*s)
- g := Gdip_GraphicsFromImage(map)
- gdip_GetImageDimensions(map, w, h)
- fill_boxx(g,"9279B4",0,0,w,h)
- map0:=Gdip_CloneBitmapArea(map,0,0,w,h)
- ;~ map0:=map
- ;~ map := Gdip_CreateBitmap(3*s*n + s, 4*s)
- ;~ g := Gdip_GraphicsFromImage(map)
- x:=s
- y:=s
- maps:=[]
- maps[0]:=map0
- loop % n {
- fill_boxx(g,"0ff0fa",x,y,2*s,2*s)
- mapt := Gdip_CreateBitmap(3*s*n + s, 4*s)
- gt := Gdip_GraphicsFromImage(mapt)
- Gdip_DrawImage(gt, map, 0, 0 ,w,h)
- maps[A_Index]:=mapt
- x+=3*s
- }
- myPassword=% makeItUp(n,keys)
- UpdateLayeredWindow(popUp.hwnd, popUp.hdc, popUp.x, popUp.y, popUp.w, popUp.h)
- t:=0
- deadline:= 80000
- slept:=25
- gosub start
- loop % deadline//slept {
- Sleep slept
- if(getkeystate(keys[t+1]))
- t++
- Gdip_GraphicsClear(popUp.g)
- Gdip_DrawImage(popup.g, map0, 0, 0 ,w,h)
- Gdip_DrawImage(popup.g, maps[t], 0, 0 ,w,h)
- pass:=mod(A_Index,15)
- (pass > 5 )?(Gdip_DrawImage(popup.g, maps[5], 0, 0 ,w,h))0
- Gdip_TextToGraphics(popup.g, mypassword,"x20 y0 s50 cffff0000 ", "Segoe Print")
- UpdateLayeredWindow(popUp.hwnd, popUp.hdc)
- if(t=5){
- SoundBeep
- goto win
- }
- }
- gosub lose
- return
- makeItUp(n,byref keys){
- it=
- keys:=[]
- loop % n {
- random,nextdigit,0,9
- it.=nextdigit " "
- keys.insert(nextdigit)
- }
- return it
- }
- lose:
- Gdip_GraphicsClear(popUp.g)
- Gdip_DrawImage(popup.g, maps[0], 0, 0 ,w,h)
- Gdip_TextToGraphics(popup.g, "YOU LOSE!","x0 y0 s50 cffff0000 ", "Segoe Print")
- UpdateLayeredWindow(popUp.hwnd, popUp.hdc)
- return
- win:
- Gdip_GraphicsClear(popUp.g)
- Gdip_DrawImage(popup.g, maps[0], 0, 0 ,w,h)
- Gdip_TextToGraphics(popup.g, "YOU WIN!","x0 y0 s50 cff000000 ", "Segoe Print")
- UpdateLayeredWindow(popUp.hwnd, popUp.hdc)
- return
- start:
- Sleep 250
- Gdip_GraphicsClear(popUp.g)
- Gdip_DrawImage(popup.g, maps[0], 0, 0 ,w,h)
- Gdip_TextToGraphics(popup.g, "'bout to start","x0 y0 s35 cffff0000 ", "Segoe Print")
- UpdateLayeredWindow(popUp.hwnd, popUp.hdc)
- Sleep 750
- return
- r::Reload
- 1::
- return
- 2::
- return
- 3::
- return
- 4::
- return
- 5::
- return
- 6::
- return
- 7::
- return
- 8::
- return
- 9::
- return
- 0::
- return
- x::
- Layered_Window_ShutDown(popUp)
- ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement