Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

AweLife

<style>
  * {
      background-color: rgb(50, 50,50);
      color: white;
  }
  .title { 
  }
</style>
<h1 class="title">Welcome to AweLife! The Awesome Life Simulator</h1>
<h3>By Hype Games</h3>
<button onclick="ageButton()">Add Age</button>
<button onclick="collegeButton()">Law</button>
<button onclick="collegeButton1()">Computer Science</button>
<button onclick="collegeButton2()">Nursing</button>
<button onclick="collegeButton3()">Education</button>
<button onclick="collegeButton4()">Business</button>
<button onclick="collegeButton5()">Communication</button>
<button onclick="dropOut()">Drop Out</button>
<button onclick="lawJob1()">Lawyer</button>

<p id = "test"></p> <p id = "test0"></p> <p id = "test00"></p>
<p id = "test1"></p> <p id = "test2"></p> <p id = "test3"></p> 
<p id = "test4"></p> <p id = "test44"></p> <p id = "test5"></p> 
<p id = "test6"></p> <p id = "test7"></p> <p id = "test8"></p> 
<p id = "test9"></p> <p id = "test10"></p> <p id = "test11"></p> 
<p id = "test12"></p>

<script>

const name = Math.floor(Math.random()*100)

if (name < 10) {
    document.getElementById("test0").innerText = "Hello! Welcome to life, Gregory Manches! You were born a male in New York City in the USA."
} else if (name < 20) {
    document.getElementById("test0").innerText = "Hello! Welcome to life, Amelia Suesin! You were born a female in London in the UK."
} else if (name < 30) {
    document.getElementById("test0").innerText = "Hello! Welcome to life, Donny Crabdople! You were born a male in Toronto which is in Canada."
} else if (name < 40) {
    document.getElementById("test0").innerText = "Hello! Welcome to life, Lisa Phososon! You were born a female in Manila in the Philippines."
} else if (name < 50) {
    document.getElementById("test0").innerText = "Hello! Welcome to life, Maraiah Dangle! You were born a female in Little Rock in the USA"
} else if (name < 60) {
    document.getElementById("test0").innerText = "Hello! Welcome to life, Evan Hughes! You were born a male in Portland in the USA"
} else if (name < 70) {
    document.getElementById("test0").innerText = "Hello! Welcome to life, Tara Carter! You were born a female in St. Paul in the USA"
} else if (name < 80) {
    document.getElementById("test0").innerText = "Hello! Welcome to life, Juan Fernando! You were born a male in Tijuana in Mexico"
} else if (name < 90) {
    document.getElementById("test0").innerText = "Hello! Welcome to life, Saima Lieb! You were born a female in Tel Aviv in Israel"
} else if (name < 100) {
    document.getElementById("test0").innerText = "Hello! Welcome to life, Steve Eaden! You were born a male in Los Angeles in the USA"
}

//Generates Parent Names and Ages
const dadAge = Math.floor(Math.random()*35+18)
const parentAge = Math.floor(Math.random()*35+15)

var momName = ["Susan Dandelion","Mary Wrengworth","Kelly Amaimo","Patricia Boizen","Beatrice Treenut"]
var dadName = ["Mark Twainy","Walter Udalo","Henry Elope","Richard Watson","Clark Jenglewhisp"]
var job = ["Dentist","Construction Worker","Engineer","Computer Programmer","Graphic Designer","Nurse","Business Manager","Trucker","Social Media Manager","Teacher","Author"]

if (name < 5) {
    document.getElementById("test00").innerText = "Your mom is "+momName[0]+" and is "+parentAge+". Your dad is "+dadName[0]+" and is "+dadAge+". Your mom is a "+job[0]+". Your dad is a "+job[1]+"."
} else if (name > 5 && name < 10) {
    document.getElementById("test00").innerText = "Your mom is "+momName[1]+" and is "+parentAge+". Your dad is "+dadName[1]+" and is "+dadAge+". Your mom is a "+job[2]+". Your dad is a "+job[0]+"."
} else if (name > 10 && name < 15) {
    document.getElementById("test00").innerText = "Your mom is "+momName[2]+" and is "+parentAge+". Your dad is "+dadName[2]+" and is "+dadAge+". Your mom is a "+job[3]+". Your dad is a "+job[4]+"."
} else if (name > 15 && name < 20) {
    document.getElementById("test00").innerText = "Your mom is "+momName[3]+" and is "+parentAge+". Your dad is "+dadName[3]+" and is "+dadAge+". Your mom is a "+job[4]+". Your dad is a "+job[6]+"."
} else if (name > 20 && name < 25) {
    document.getElementById("test00").innerText = "Your mom is "+momName[4]+" and is "+parentAge+". Your dad is "+dadName[4]+" and is "+dadAge+". Your mom is a "+job[7]+". Your dad is a "+job[9]+"."
} else if (name > 25 && name < 30) {
    document.getElementById("test00").innerText = "Your mom is "+momName[0]+" and is "+parentAge+". Your dad is "+dadName[1]+" and is "+dadAge+". Your mom is a "+job[1]+". Your dad is a "+job[3]+"."
} else if (name > 30 && name < 35) {
    document.getElementById("test00").innerText = "Your mom is "+momName[2]+" and is "+parentAge+". Your dad is "+dadName[0]+" and is "+dadAge+". Your mom is a "+job[9]+". Your dad is a "+job[8]+"."
} else if (name > 35 && name < 40) {
    document.getElementById("test00").innerText = "Your mom is "+momName[0]+" and is "+parentAge+". Your dad is "+dadName[3]+" and is "+dadAge+". Your mom is a "+job[2]+". Your dad is a "+job[5]+"."
} else if (name > 450 && name < 45) {
    document.getElementById("test00").innerText = "Your mom is "+momName[4]+" and is "+parentAge+". Your dad is "+dadName[0]+" and is "+dadAge+". Your mom is a "+job[7]+". Your dad is a "+job[10]+"."
} else if (name > 45 && name < 50) {
    document.getElementById("test00").innerText = "Your mom is "+momName[1]+" and is "+parentAge+". Your dad is "+dadName[2]+" and is "+dadAge+". Your mom is a "+job[4]+". Your dad is a "+job[10]+"."
} else if (name > 50 && name < 55) {
    document.getElementById("test00").innerText = "Your mom is "+momName[3]+" and is "+parentAge+". Your dad is "+dadName[1]+" and is "+dadAge+". Your mom is a "+job[7]+". Your dad is a "+job[4]+"."
} else if (name > 55 && name < 60) {
    document.getElementById("test00").innerText = "Your mom is "+momName[1]+" and is "+parentAge+". Your dad is "+dadName[4]+" and is "+dadAge+". Your mom is a "+job[5]+". Your dad is a "+job[6]+"."
} else if (name > 60 && name < 65) {
    document.getElementById("test00").innerText = "Your mom is "+momName[2]+" and is "+parentAge+". Your dad is "+dadName[1]+" and is "+dadAge+". Your mom is a "+job[1]+". Your dad is a "+job[8]+"."
} else if (name > 65 && name < 70) {
    document.getElementById("test00").innerText = "Your mom is "+momName[3]+" and is "+parentAge+". Your dad is "+dadName[2]+" and is "+dadAge+". Your mom is a "+job[2]+". Your dad is a "+job[10]+"."
} else if (name > 70 && name < 75) {
    document.getElementById("test00").innerText = "Your mom is "+momName[2]+" and is "+parentAge+". Your dad is "+dadName[4]+" and is "+dadAge+". Your mom is a "+job[10]+". Your dad is a "+job[3]+"."
} else if (name > 75 && name < 80) {
    document.getElementById("test00").innerText = "Your mom is "+momName[3]+" and is "+parentAge+". Your dad is "+dadName[1]+" and is "+dadAge+". Your mom is a "+job[9]+". Your dad is a "+job[7]+"."
} else if (name > 80 && name < 85) {
    document.getElementById("test00").innerText = "Your mom is "+momName[2]+" and is "+parentAge+". Your dad is "+dadName[3]+" and is "+dadAge+". Your mom is a "+job[4]+". Your dad is a "+job[9]+"."
} else if (name > 85 && name < 90) {
    document.getElementById("test00").innerText = "Your mom is "+momName[3]+" and is "+parentAge+". Your dad is "+dadName[4]+" and is "+dadAge+". Your mom is a "+job[9]+". Your dad is a "+job[10]+"."
} else if (name > 90 && name < 95) {
    document.getElementById("test00").innerText = "Your mom is "+momName[4]+" and is "+parentAge+". Your dad is "+dadName[1]+" and is "+dadAge+". Your mom is a "+job[4]+". Your dad is a "+job[4]+"."
} else if (name > 95 && name < 100) {
    document.getElementById("test00").innerText = "Your mom is "+momName[2]+" and is "+parentAge+". Your dad is "+dadName[4]+" and is "+dadAge+". Your mom is a "+job[4]+". Your dad is a "+job[4]+"."
}


let age = 0

function ageButton() {
    document.getElementById("test").innerText = ++age
    //Generates Death Statements
    if (name < 10 && age === 35) {
        document.writeln("You died from small pox.")
    }
    if (name < 20 && age === 85) {
        document.writeln("You died of old age, The best way to go.")
    }
    if (name < 30 && age === 73) {
        document.writeln("You died from an infectous disease known as Mumps.")
    }
    if (name < 40 && age === 105) {
        document.writeln("You died from an alergic reaction to cake.")
    }
    if (name < 50 && age === 47) {
        document.writeln("You died from being hit by a car.")
    }
    if (name < 60 && age === 57) {
        document.writeln("You died from standing in the middle of a warfeild in Russia.")
    }
    if (name < 70 && age === 78) {
        document.writeln("You died from being kicked out of your house and starving")
    }
    if (name < 80 && age === 83) {
        document.writeln("You died of old age, The best way to go.")
    }
    if (name < 90 && age === 134) {
        document.writeln("You died of EXTREME old age, You were the oldest living person.")
    }
    if (name < 100 && age === 95) {
        document.writeln("You died of old age, The best way to go.")
    }
    
    //Generates School Statements
    if (age === 5) {
        document.getElementById("test1").style.color = "red"
        document.getElementById("test1").innerText="You started elementary school."
    }
    if (age === 14) {
        document.getElementById("test2").style.color = "red"
        document.getElementById("test2").innerText = "You started high school."
    }
    if (age === 18) {
        document.getElementById("test3").style.color = "red"
        document.getElementById("test3").innerText = "You graduated high school. Time to go to college (If you wish to not go to college, just add an age)."
    }
    if (age === 22) {
        document.getElementById("test5").style.color = "red"
        document.getElementById("test5").innerText = "You graduated from college (If you didn't go to college or you dropped out, just ignore this cause you're a loser)."
    }
    //Generates Moms Death Statements
    if (name < 10 && age === 30) {
        document.getElementById("test10").style.color = "orange"
        document.getElementById("test10").innerText = "Your mom died of old age. You went to her funeral."    
    }
    if (name > 20 && name < 30 && age === 38) {
        document.getElementById("test10").style.color = "orange"
        document.getElementById("test10").innerText = "Your mom died of old age. You went to her funeral."    
    }
    if (name > 30 && name < 40 && age === 23) {
        document.getElementById("test10").style.color = "orange"
        document.getElementById("test10").innerText = "Your mom died of lung cancer. You went to her funeral."    
    }
    if (name > 40 && name < 50 && age === 46) {
        document.getElementById("test10").style.color = "orange"
        document.getElementById("test10").innerText = "Your mom died from being hit by a car. You went to her funeral."    
    }
    if (name > 50 && name < 60 && age === 56) {
        document.getElementById("test10").style.color = "orange"
        document.getElementById("test10").innerText = "Your mom died of a heart attack. You went to her funeral."    
    }
    if (name > 60 && name < 70 && age === 16) {
        document.getElementById("test10").style.color = "orange"
        document.getElementById("test10").innerText = "Your mom died of rectum cancer. You went to her funeral."    
    }
    if (name > 70 && name < 80 && age === 32) {
        document.getElementById("test10").style.color = "orange"
        document.getElementById("test10").innerText = "Your mom died of old age. You went to her funeral."    
    }
    if (name > 80 && name < 90 && age === 6) {
        document.getElementById("test10").style.color = "orange"
        document.getElementById("test10").innerText = "Your mom died from getting stabbed in an alleyway like Batman's parents. You went to her funeral."    
    }
    if (name > 90 && name < 100 && age === 41) {
        document.getElementById("test10").style.color = "orange"
        document.getElementById("test10").innerText = "Your mom died of old age. You went to her funeral."    
    }
    //Generates Dads Death Statements
    if (name < 10 && age === 37) {
        document.getElementById("test11").style.color = "orange"
        document.getElementById("test11").innerText = "Your dad died of old age. You went to his funeral."    
    }
    if (name > 10 && name < 20 && age === 34) {
        document.getElementById("test11").style.color = "orange"
        document.getElementById("test11").innerText = "Your dad died of Cardiac Arrest. You went to his funeral."    
    }
    if (name > 20 && name < 30 && age === 43) {
        document.getElementById("test11").style.color = "orange"
        document.getElementById("test11").innerText = "Your dad died from a Jigsaw Trap, So sad. You went to his funeral."    
    }
    if (name > 30 && name < 40 && age === 57) {
        document.getElementById("test11").style.color = "orange"
        document.getElementById("test11").innerText = "Your dad died from the bubonic plague. You went to his funeral."    
    }
    if (name > 40 && name < 50 && age === 53) {
        document.getElementById("test11").style.color = "orange"
        document.getElementById("test11").innerText = "Your dad died from being rammed by a deer. You went to his funeral."    
    }
    if (name > 80 && name < 100 && age === 44) {
        document.getElementById("test11").style.color = "orange"
        document.getElementById("test11").innerText = "Your dad died of old age. You went to his funeral."    
    }
}

//Generates College Options

function collegeButton() {
    if (age === 18) {
        document.getElementById("test4").style.color = "red"
        document.getElementById("test4").innerText = "You went to school for Law."
    }
}

function collegeButton1() {
    if (age === 18) {
        document.getElementById("test4").style.color = "red"
        document.getElementById("test4").innerText = "You went to school for Computer Science."
    }
}

function collegeButton2() {
    if (age === 18) {
        document.getElementById("test4").style.color = "red"
        document.getElementById("test4").innerText = "You went to school for Nursing."
    }
}

function collegeButton3() {
    if (age === 18) {
        document.getElementById("test4").style.color = "red"
        document.getElementById("test4").innerText = "You went to school for Education."
    }
}

function collegeButton4() {
    if (age === 18) {
        document.getElementById("test4").style.color = "red"
        document.getElementById("test4").innerText = "You went to school for Business."
    }
}

function collegeButton5() {
    if (age === 18) {
        document.getElementById("test4").style.color = "red"
        document.getElementById("test4").innerText = "You went to school for Communication."
    }
}

function dropOut() {
    if (age > 18 && age < 22) {
        document.getElementById("test44").style.color = "red"
        document.getElementById("test44").innerText = "You dropped out of school."
    }
}

function lawJob1() {
    if (age === 22) {
        document.getElementById("test12").style.color = "red"
        document.getElementById("test12").innerText = "You became a Lawyer. Your salary is $89,354."
    }
}

</script>

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.