Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title> Login </title>
- <script type="text/javascript">
- //vars
- var user = prompt("What is your username?" , "Username");
- var pass = prompt("Enter your Password : ", "Password");
- //end vars
- //functions
- function doWelcome()
- {
- document.write("Welcome " + user)
- document.write("!")
- document.bgColor='green'
- }
- function doNoentry()
- {
- if (user == "joe")
- {
- document.write("Incorrect Password");
- }
- else if (user == "john")
- {
- document.write("Incorrect Password");
- }
- else if (user == "1337")
- {
- document.write("Incorrect Password");
- }
- else
- {
- document.write("Wrong UserName / Password");
- }
- }
- function doFail()
- {
- document.write("R U Dum? Enter something you noob");
- }
- //end fucntions
- //main
- function doMain()
- {
- if (user=="joe" && pass=="321")
- {
- doWelcome();
- }
- else if(user=="john" && pass=="123")
- {
- doWelcome();
- }
- else if(user=="" && pass=="")
- {
- doFail();
- }
- else if(user=="1337" && pass=="1337")
- {
- document.write(" You Iz soooo 1337!!11!!");
- }
- else
- {
- doNoentry();
- lightning();
- }
- }
- //Lighting script
- var flash=0
- function lightning()
- {flash=flash+1;
- if(flash==1){document.bgColor='white'; setTimeout("lightning()",100);}
- if(flash==2){document.bgColor='black'; setTimeout("lightning()",90);}
- if(flash==3){document.bgColor='red'; setTimeout("lightning()",85);}
- if(flash==4){document.bgColor='blue'; setTimeout("lightning()",80);}
- if(flash==5){document.bgColor='purple'; setTimeout("lightning()",75);}
- if(flash==6){document.bgColor='white'; setTimeout("lightning()",70);}
- if(flash==7){document.bgColor='black'; setTimeout("lightning()",65);}
- if(flash==8){document.bgColor='red'; setTimeout("lightning()",60);}
- if(flash==9){document.bgColor='blue'; setTimeout("lightning()",50);}
- if(flash==10){document.bgColor='purple'; setTimeout("lightning()",40);}
- if(flash==11){document.bgColor='black'; setTimeout("lightning()",30);}
- if(flash==12){document.bgColor='white'; setTimeout("lightning()",25);}
- if(flash==13){document.bgColor='red'; setTimeout("lightning()",20);}
- if(flash==14){document.bgColor='blue'; setTimeout("lightning()",10);}
- if(flash==15){document.bgColor='purple'; setTimeout("lightning()",5);}
- if(flash==16){document.bgColor='white'; setTimeout("lightning()",1);}
- if(flash==17){document.bgColor='black'; setTimeout("lightning()",1);}
- if(flash==18){document.bgColor='blue'; setTimeout("lightning()",1);}
- if(flash==19){document.bgColor='purple'; setTimeout("lightning()",1);}
- if(flash==20){flash=0; setTimeout("lightning()",100);}
- }
- doMain();
- </script>
- </head>
- <body>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement