Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #MaxThreads 20
- URLDownloadToFile, https://i.imgur.com/hn1Eo0L.png, npc1-.png
- URLDownloadToFile, https://i.imgur.com/gxYVLbY.png, npc2-.png
- URLDownloadToFile, https://i.imgur.com/iujlpMO.png, npc3-.png
- URLDownloadToFile, https://i.imgur.com/jjvPyLm.png, kmhm1.png
- URLDownloadToFile, https://i.imgur.com/3AEQjDX.png, kmhm2.png
- Gui, Add, Picture, x40 y110 w34 h55 vplayer, npc1-.png
- GuiControlGet, player, Pos
- Gui, Add, button, x20 y159 w200 h10 ved1,
- Gui, Add, button, x260 y159 w180 h10 ved2,
- Gui, Add, Text, x40 y40 w250 h20 vloc,
- SetTimer, TimerGravity, 50
- SetTimer, TimerMap, 100
- Gui, Color, 884488
- counting=0
- Gui, Show, w479 h379, Right/Left or A/D; Space to Jump; F to fire energy blast
- return
- TimerMap:
- GuiControlGet, ed1, pos
- GuiControlGet, ed2, pos
- GuiControlGet, player, Pos
- far1:=ed1w+ed1x
- far2:=ed2w+ed2x
- GuiControl, Text, loc, %counting% points! ;with %ed1x% : %far1% and %ed2X% : %far2%
- if (ed1X<0)
- {
- SetTimer, TimerGravity, off
- newloc1:=ed2X+ed2W+30
- Guicontrol, MoveDraw, ed1, X%newloc1%, w150 h10 Y%ed1Y%
- GuiControlGet, ed1, pos
- GuiControlGet, ed2, pos
- counting:=counting+1000
- }
- if (ed2X<0)
- {
- SetTimer, TimerGravity, off
- GuiControlGet, ed1, pos
- GuiControlGet, ed2, pos
- newloc2:=ed1X+ed1W+30
- Guicontrol, MoveDraw, ed2, X%newloc2%, Y%ed2Y%
- counting:=counting+1000
- }
- if(playerX > 350)
- {
- Loop, 30
- {
- sleep, 25
- floor1X:=ed1X-10
- floor2X:=ed2X-10
- newX:=playerX-12
- newY:=playery
- if (ed1X+ed1W>0)
- {
- Guicontrol, MoveDraw, ed1, X%floor1X%, Y%ed1Y%
- Guicontrol, MoveDraw, ed2, X%floor2X%, Y%ed2Y%
- GuiControl, MoveDraw, player, X%newX% Y%newY%
- counting:=counting+1000
- }
- }
- }
- SetTimer, TimerGravity, 50
- return
- TimerGravity:
- GuiControl, Text, loc, %counting% points!
- GuiControlGet, player, Pos
- GuiControlGet, ed1, Pos
- GuiControlGet, ed2, Pos
- ;~ if (playerx < ed1X or playerx > ed1W+ed1X and playerx < ed2X-15 or playerx > ed2W+ed2X)
- ;~ {
- ;~ if(playerY >=110)
- ;~ {
- ;~ SetTimer, TimerGravity, off
- ;~ SetTimer, TimerFall, 50
- ;~ }
- close1:=ed1x-5
- close2:=ed2x-5
- far1:=ed1w+ed1x
- far2:=ed2w+ed2x
- if playerx not between %close1% and %far1%
- {
- if playerx not between %close2% and %far2%
- {
- if(playerY >=110)
- {
- SetTimer, TimerGravity, off
- SetTimer, TimerFall, 50
- }
- }
- }
- return
- TimerFall:
- GuiControlGet, player, Pos
- newX:=playerX
- newY:=playery+15
- GuiControl, MoveDraw, player, X%newX% Y%newY%
- if (playerY > 380)
- {
- Reload
- }
- return
- counter=0
- timerBlast:
- hotkey, F, off
- counter++
- GuiControlGet, player, Pos
- newX:=playerX+25
- newY:=playery+15
- sameY:=playerY
- Gui, Add, Picture, X%newX% Y%newY% vwave%counter%, kmhm1.png
- sleep, 250
- GuiControl,, wave, kmhm2.png
- GuiControl, MoveDraw, wave, X%newX% Y%sameY%
- settimer, timerblastpath, 75
- settimer, timerblast, off
- hotkey, F, on
- return
- timerBlastpath:
- GuiControlGet, wave%counter%, Pos
- newX:=wave%counter%X+25
- sameY:=wave%counter%Y
- GuiControl,, wave%counter%, kmhm2.png
- GuiControl, MoveDraw, wave%counter%, X%newX% Y%sameY%
- if(wave%counter%X > 480)
- {
- settimer, timerBlastpath, off
- }
- return
- timerLeft:
- GuiControlGet, player, Pos
- newX:=playerX-5
- newY:=playery
- GuiControl, MoveDraw, player, X%newX% Y%newY%
- GuiControl,, player, npc1-.png
- GuiControl,, player, npc2-.png
- GuiControl,, player, npc3-.png
- return
- F::
- SetTimer, TimerBlast, 49
- return
- timerRight:
- GuiControlGet, player, Pos
- newX:=playerX+5
- newY:=playery
- GuiControl, MoveDraw, player, X%newX% Y%newY%
- GuiControl,, player, npc1-.png
- GuiControl,, player, npc2-.png
- GuiControl,, player, npc3-.png
- return
- TimerJump:
- SetTimer, TimerGravity, off
- delay=50
- loop, 7
- {
- sleep, %delay%
- GuiControlGet, player, Pos
- newX:=playerX
- newY:=playery-4
- GuiControl, MoveDraw, player, X%newX% Y%newY%
- delay+=10
- }
- delay=50
- loop, 7
- {
- sleep, %delay%
- GuiControlGet, player, Pos
- newX:=playerX
- newY:=playery+4
- GuiControl, MoveDraw, player, X%newX% Y%newY%
- delay-=6
- }
- SetTimer, TimerGravity, 50
- return
- D::
- SetTimer, TimerRight, 49
- KeyWait, D
- SetTimer, TimerRight, Off
- return
- Right::
- SetTimer, TimerRight, 49
- KeyWait, Right
- SetTimer, TimerRight, Off
- return
- A::
- SetTimer, TimerLeft, 49
- KeyWait, A
- SetTimer, TimerLeft, Off
- return
- Left::
- SetTimer, TimerLeft, 49
- KeyWait, Left
- SetTimer, TimerLeft, Off
- return
- Space::
- SetTimer, TimerJump, 52
- KeyWait, Space
- SetTimer, TimerJump, Off
- return
- GuiClose:
- ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement