Your browser does not support JavaScript or its disabled!
Please turn it on, or be aware that some features on this website will not work correctly.
1.1K
Orb Counter #71
This counts orbs when you stand on them.
430b | 13 lines.
 --[[
  Script made by Lee (Discord: l33_) - www.trainorcreations.com
  If you want to support my work, feel free to donate at https://trainorcreations.com/donate
  PS. Stop ripping off my work and selling it as your own.
 ]]--
function matchPos(pos, pos2)
    return pos2.x == pos.x and pos2.y == pos.y and pos2.z == pos.z
end
local orbCount = 0
orbCounter = UI.Label("Orbs collected: ".. orbCount)
onRemoveThing(function(tile, thing)
    if thing:getId() == 31601 then
        if matchPos(pos(), thing:getPosition()) then
            orbCount = orbCount + 1
            orbCounter:setText("Orbs collected: ".. orbCount)
        end
    end
end)

17 Nov 2021
Ads