@name Unscammable MoneyDetector
@inputs Amount Detector:wirelink
@outputs AMT Range
@persist WorldMonies:array Status:string Held
@persist LastAMT Ent:entity
@trigger all
runOnChat(1)
interval(1000)
if (first()) {
    Ent=Detector:entity()
}
    findInSphere(Ent:pos(),Range)
    findSortByDistance(Ent:pos())
    findByClass("spawned_money")
    Monies=findToArray()

    for (I=1, Monies:count()) {
        if (Monies[I,entity]:isPlayerHolding()) {Held=1}
    }

Range=7
if (!Held & changed(Amount)) {AMT=Amount LastAMT=Amount Status="Usual"} elseif (Held) {AMT=LastAMT Status="Money being held."}
setName("Status: " + Status)

Held=0
entity():setAlpha(0)
