PlayerEvents.loggedOut((event) => {
    // console.log("LOGOUT")
    let entity = event.entity
    var oldSpeedColor = palladium.getProperty(entity, 'arrzenhanced.oldSpeedColor')
    // palladium.setProperty(entity, 'arrzenhanced.tachyonBoost', 0)
    palladium.setProperty(entity, 'arrzenhanced.speedColor', oldSpeedColor)
})

PlayerEvents.loggedIn((event) => {
    // console.log("LOGIN")
    let entity = event.entity
    var tachBoost = palladium.getProperty(entity, 'arrzenhanced.tachyonBoost')
    var maxSpeed = palladium.getProperty(entity, 'arrzenhanced.maxSpeed')
    // console.log("TACH IS" + tachBoost)
    // console.log("SPEED IS " + maxSpeed)
    palladium.setProperty(entity, 'arrzenhanced.tachyonBoost', 0)
    palladium.setProperty(entity, 'arrzenhanced.maxSpeed', maxSpeed - tachBoost)
})