@name StreamRadio Song List
@inputs 
@outputs Song:string Play Volume 
@persist Songs:table Follow 
@trigger 
interval(100)
runOnChat(1)

Volume = 100

if (first()) {
    Songs = table(
        "1" = "https://www.youtube.com/watch?v=Bznxx12Ptl0&index=1&list=PLMuN1DlTRm2JRXHZCwE3rjGWLYJeWWZ5U",
        "2" = "https://www.youtube.com/watch?v=_w-NakcRsxk&index=2&list=PLMuN1DlTRm2JRXHZCwE3rjGWLYJeWWZ5U",
        "3" = "https://www.youtube.com/watch?v=RgKAFK5djSk&list=PLMuN1DlTRm2JRXHZCwE3rjGWLYJeWWZ5U&index=3",
        "4" = "https://www.youtube.com/watch?v=npvNPORFXpc&list=PLMuN1DlTRm2JRXHZCwE3rjGWLYJeWWZ5U&index=4",
        "5" = "https://www.youtube.com/watch?v=-XqTeZgiipA&index=5&list=PLMuN1DlTRm2JRXHZCwE3rjGWLYJeWWZ5U",
        "6" = "https://www.youtube.com/watch?v=mw2kKyJu9gY&index=6&list=PLMuN1DlTRm2JRXHZCwE3rjGWLYJeWWZ5U",
        "7" = "https://www.youtube.com/watch?v=TKOa6r01uUs&index=7&list=PLMuN1DlTRm2JRXHZCwE3rjGWLYJeWWZ5U",
        "8" = "https://www.youtube.com/watch?v=aMPr67Z24j8&list=PLMuN1DlTRm2JRXHZCwE3rjGWLYJeWWZ5U&index=8",
        "9" = "https://www.youtube.com/watch?v=g1rWCYPhYRc&list=PLMuN1DlTRm2JRXHZCwE3rjGWLYJeWWZ5U&index=9",
        "10" = "https://www.youtube.com/watch?v=12CeaxLiMgE&list=RDGMEMHDXYb1_DDSgDsobPsOFxpAVM12CeaxLiMgE",
        "11" = "https://www.youtube.com/watch?v=SUNt8E8EWrA&index=3&list=RDGMEMHDXYb1_DDSgDsobPsOFxpAVM12CeaxLiMgE",
        "12" = "https://www.youtube.com/watch?v=M7teCL3gFSs&list=PLMuN1DlTRm2JRXHZCwE3rjGWLYJeWWZ5U&index=11"
    )
}

if (chatClk(owner())) {
    local LS = owner():lastSaid():lower()
    
    if (Songs:exists(LS)) {
        hideChat(1)
        Song = Songs[LS,string]
        Play = 1
    }
    elseif (LS == "-stop") {
        hideChat(1)
        Play = 0
    }
}

R = owner():keyWalk()

if (changed(R) & R) {if(Follow == 0) {Follow = 1} else {Follow = 0}}

if (Follow == 1) {entity():isWeldedTo():setPos(owner():pos() + vec(0,0,100))}
if (Follow == 0) {}
