@name Gun Store 0.1 by Jim Dangle
@inputs EGP:wirelink Up Down Select Money 
@outputs 
@persist L1:string L2:string L3:string L4:string L5:string L6:string L7:string L8:string P1 P2 P3 P4 P5 P6 P7 P8
@trigger 

if(first() || duped()){
    I1 = "Null"
    I2 = "Null"
    I3 = "Null"
    I4 = "Null"
    I5 = "Null"
    I6 = "Null"
    I7 = "Null"
    I8 = "Null"
    #Creating A Title
    EGP:egpText(1, "Erza's Gun Shop", vec2(150, 7))
    EGP:egpSize(1, 30)
    #Drawing A Line Under The Title
    EGP:egpLine(2, vec2(0, 40), vec2(800,40))
    EGP:egpSize(2, 4)
    #Dividing the screen into two one for prices one for items
    EGP:egpText(3, "ITEMS", vec2(40, 60))
    EGP:egpText(4, "PRICES", vec2(360, 60))
    #Line 
    EGP:egpLine(5, vec2(240, 40), vec2(240, 1000))
    #Adding A Dollar Sign before each price
    for(I=1, 8){
        EGP:egpText(5+I, "$", vec2(290, 50+50*I))
        #coloring the dollar signs
        EGP:egpColor(5+I, vec(255,216,0))
        }
    for(I=1, 8){
        EGP:egpCircle(13+I, vec2(30, 60+50*I), vec2(3,3))
        }
    
    }

runOnChat(1)
if(chatClk(owner())){
    Said = owner():lastSaid()
    CMD = owner():lastSaid():explode(" ")
    Item = owner():lastSaid():sub(5, Said:find("$")-1)
    Price = owner():lastSaid():sub(Said:find("$")+1):toNumber()
    #long chunks because I could not figure out how to put this into arrays and function normally
    if(CMD:string(1)=="/i1"){
        hideChat(1)
        I1 = Item
        P1 = Price
        EGP:egpText(100, Item, vec2(60, 100+50*1))
        EGP:egpText(200, Price+" ", vec2(299, 100+50*1))
        }
    if(CMD:string(1)=="/i2"){
        hideChat(1)
        I2 = Item
        P2 = Price
        EGP:egpText(101, Item, vec2(60, 100+50*2))
        EGP:egpText(201, Price+" ", vec2(299, 100+50*2))
        }
        if(CMD:string(1)=="/i3"){
        hideChat(1)
        I3 = Item
        P3 = Price
        EGP:egpText(102, Item, vec2(60, 100+50*3))
        EGP:egpText(202, Price+" ", vec2(299, 100+50*3))
        }
        if(CMD:string(1)=="/i4"){
        hideChat(1)
        I1 = Item
        P1 = Price
        EGP:egpText(103, Item, vec2(60, 100+50*1))
        EGP:egpText(203, Price+" ", vec2(299, 100+50*1))
        }
        if(CMD:string(1)=="/i5"){
        hideChat(1)
        I1 = Item
        P1 = Price
        EGP:egpText(104, Item, vec2(60, 100+50*1))
        EGP:egpText(204, Price+" ", vec2(299, 100+50*1))
        }
    
    
    }
