This commit is contained in:
Nordi98 2025-08-11 16:10:18 +02:00
parent 23e3e52966
commit 68151e44fe
11 changed files with 594 additions and 0 deletions

View file

@ -0,0 +1,25 @@
<!-- [ Breathalyzer Script 0.1 Created By JKSensation ] -->
<!-- [ DO NOT RELEASE/LEAK/SHARE CODE WITHOUT PERMISSION FROM JKSENSATION ] -->

<html>
<head>
<link rel="stylesheet" href="reset.css" type="text/css">
<link rel="stylesheet" href="styles.css" type="text/css">
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
</head>
<body>
<div id="container">
<div class="image"></div>
<div class="screen">
<div class="middle">
<h4 class="bacLevel" id="bacLevel">0.00</h4>
</div>
</div>
<div class="buttonContainer">
<button id="start" class="green">START</button>
<button id="power" class="red">POWER</button>
</div>
</div>
<script src="./index.js" type="text/javascript"></script>
</body>
</html>

View file

@ -0,0 +1,43 @@
// [ Breathalyzer Script 0.1 Created By JKSensation ] //
// [ DO NOT RELEASE/LEAK/SHARE CODE WITHOUT PERMISSION FROM JKSENSATION ] //

$(function () {
function display(bool) {
if (bool) {
$("#container").show();
} else {
$("#container").hide();
}
}

display(false)

window.addEventListener('message', function(event) {
var item = event.data;
if (item.type === "ui") {
if (item.status == true) {
display(true)
} else {
display(false)
}
}else if(item.type === 'data'){
$('#bacLevel').text(item.bac)
$('#bacLevel').css("color", `var(${item.textColor})`)
}
})

document.onkeyup = function (data) {
if (data.which == 27) {
$.post('http://breathalyzer/exit', JSON.stringify({}));
return
}
};
$("#power").click(function () {
$.post('http://breathalyzer/exit', JSON.stringify({}));
return
})
$("#start").click(function () {
$.post('http://breathalyzer/startBac', JSON.stringify({}));
return
})
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,008 KiB

View file

@ -0,0 +1,99 @@
/* [ Breathalyzer Script 0.1 Created By JKSensation ] */
/* [ DO NOT RELEASE/LEAK/SHARE CODE WITHOUT PERMISSION FROM JKSENSATION ] */

body {
background: none !important;
}

:root{
--color-red: #ca2f2f;
}

@font-face {
font-family: digital;
src: url(digital-7.ttf);
}

#container {
position: fixed;
top: 50%;
left: 75%;
transform: translate(-50%, -50%);
display: flex;
justify-content: center;
align-items: center;
height: 600px;
width: 350px;
background-size: cover;
flex-direction: column;
}

.buttonContainer{
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
margin-top: 45px;
/* background-color: #00804d; */
}
button{
padding: 7px 0px;
width: 100px;
margin-bottom: 5px;
font-weight: 800;
font-size: 14px;
border: 2px solid #333;
border-radius: 5px;
transition: 0.2s;
}

.green{
background: #54BF54;
}

.green:hover{
background: #469e46;
}

.green:active{
background: #367a36;
}

.red{
background: #ca2f2f;
}

.red:hover{
background: #bb2b2b;
}

.red:active{
background: #a72626;
}

.screen{
position: absolute;
top: 75px;
display: flex;
flex-direction: column;
}

.middle{
font-family: digital;
font-size: 65px;
font-weight: 100;
height: 50px;
margin: 0px;
}

.image{
background-image: url('./portablebreathalyzer.png');
margin-left: 40px;
width: 500px;
height: 600px;
position: absolute;
background-size: contain;
background-repeat: no-repeat;
z-index: -100;
}