This is a password protection thing I made BUT BEFORE YOU LEAVE FROM BOREDOM!!!!!! It's not just an ordinary looking thing that everyone makes, it has a window (not an actual Windows window, one i made using boxes and stuff) and it has an x button so you can leave (I tried to make a file button with a toolbar but i couldnt
) and the text isnt just a normal input, its proper centered text with a flashing cursor. the password is "Because_elephants_are_blue" (Not with the inverted commas)
Use it if you like, but include me in ur credits (Alastair Zotos if you dont know my name) and if you try it reply with what you think of it.
`¯_Password Protection System_¯
`Created by Alastair Zotos 11:2:2005
`Password: Because_elephants_are_blue
`______________________________
Sync on
Sync Rate 300
start:
`Screen Properties
Set display mode 1024,768,32
width=screen width()/2
height=screen height()/2
cls rgb(0,0,50)
ink rgb(150,150,150),1
`Create a box for password
ink rgb(150,150,150),1
box width-300,height-100,width+300,height+100
ink rgb(0,0,0),0
box width-200,height-14,width+200,height+14
ink rgb(0,0,200),0
box width-300,height-120,width+300,height-100
`Create boxes for decoration
ink rgb(200,200,200),0
box width-303,height-100,width-300,height+100
box width+300,height-100,width+303,height+100
box width-303,height+100,width+303,height+103
box width-202,height-14,width-199,height+14
box width+199,height-14,width+202,height+14
box width-202,height+13,width+202,height+16
box width-202,height-16,width+202,height-13
ink rgb(255,255,255),0
box width-303,height-102,width+303,height-100
box width-303,height-122,width+303,height-121
box width-303,height-122,width-300,height-99
box width+300,height-122,width+303,height-99
`Text
Ink rgb(255,255,255),0
Set text font "Comic Sans MS"
Set Text to Bold
Set text size 20
Text width-290,height-122,"Please Enter Your Password."
`grab screen image
get image 1,0,0,screen width(),screen height()
`stuff
pass$="Because_elephants_are_blue"
`MAIN LOOP ->
`¯¯¯¯¯¯¯¯¯¯
Do
`attend to a few needed things
paste image 1,0,0
`___________________________________________
`Build line string
new$=entry$()
for n=1 to len(new$)
if asc(mid$(new$,n))=8
line$=left$(line$,len(line$)-1)
else
line$=line$+mid$(new$,n)
endif
next n
clear entry buffer
`Make simple cursor
if flash$=" " then flash$="|" else flash$=" "
`Show Entry Buffer
ink rgb(255,255,255),0
center text width-1,height-8,line$+flash$
if line$=pass$
text 722,384,"Correct"
center text 722,399,"Click anywhere to end"
passed=1
else
text 722,384,"Uncorrect"
passed=0
endif
`Verify that you have passed
if passed=1
if mouseclick()=1
cls rgb(0,200,255)
ink rgb(255,255,255),0
Set text size 50
set text font "comic sans MS"
set text to bold
Center text width,height,"...Exiting..."
gosub end
endif
endif
`__________________________________________
`Create a button so you can exit
buttonselected=0
clickselected=0
if makebutton(width+292,height-112,"X")>0 then buttonselected=1
if buttonselected=1
cls rgb(0,200,255)
ink rgb(255,255,255),0
Set text size 50
set text font "comic sans MS"
set text to bold
Center text width,height,"...Exiting..."
gosub end
endif
`End Loop
Sync
cls
Loop
`End program
end:
wait 1000
end
Return
`Create Buttons
function makebutton(x,y,desc$)
buttonpressed=0
ink rgb(130,130,130),0 : box x-7,y-7,x+7,y+7
ink rgb(55,55,0),0
myx=mousex() : myy=mousey()
if myx>x-20 and myx<x+20
if myy>y-10 and myy<y+10
buttonpressed=1
endif
endif
if buttonpressed=0
ink rgb(0,0,0),0
endif
if buttonpressed=1
ink rgb(255,0,0),0
endif
set text size 18 : center text x,y-8,desc$
if mouseclick()=0 then buttonpressed=0
endfunction buttonpressed
"Well, if he dies, it'll teach him not to do it again." - Me