Just a game.

Working code ( Credit me when using this.) 

HTML:

<!doctype html>

<html>

<head>

  <title>Codeski - Redeem</title>

    

    <!-- Box for the logo and stuff. -->

    <div style="background-color: aqua; border: 0px solid black; padding: 3px;">

  <h1>Codeski</h1>

</div>

    <!-- Styling the site -->

    <h2>Redeem</h2>

    <h3>Redeem your Codeski codes here.</h3>

    <link href="style.css" rel="stylesheet">

</head>

<body>

  <input type="text" id="answer" style="

  border: 105px solid linear-gradient(to right, blue, purple);

  background-color: black;

  color: white;

  padding: 10px;

  font-size: 16px;

  outline: none;

">

  <button onclick="

    var codes = [

      This contains all codes, put your own here please.

                   

    ];

    var code = document.getElementById('answer').value;

    var isRedeemed = localStorage.getItem('code-' + code);

    if (isRedeemed) {

      alert('Code has already been redeemed!');

      return;

    }

// Redeem the code

var account = localStorage.getItem('account');

if (!account) {

  account = 0;

}

var account;

if (!localStorage.getItem('account')) {

  account = 0;

} else {

  account = localStorage.getItem('account');

}

                   

                   function addMoney(value) {

  account += value;

  counter.innerHTML = account;

}

var value = Math.floor(Math.random() * 10000) + 100;

account += value;

localStorage.setItem('account', account);

alert('Verified! ' + value + ' has been added to your account. Your balance is now ' + account);

  "button type="submit" style="

  background-color: blue;

  color: white;

  padding: 10px;

  font-size: 16px;

  border: none;

  cursor: pointer;

">

  Submit

</button>

    

</body>

</html>


CSS:

body {

  margin: 0;

  font-family: Arial,sans-serif;

    background-color: yellow ;

}


Leave a comment

Log in with itch.io to leave a comment.