So im trying to figure out a way to make a player move faster the more they walk/sprint if they have a certain item, and if its tier 1 the cap is 7 blocks per second, but if its tier 2 the cap is 10 bps.
on load:
set {leofrog} to firework star named "<##21F6EF>&lʟᴇᴏᴘᴀʀᴅ &aғʀᴏɢ" with lore "&e< ᴘᴀssɪᴠᴇ > <##21F6EF>&lʟɪɢʜᴛsᴘᴇᴇᴅ &8:", "&7ᴛʜᴇ ᴍᴏʀᴇ ʏᴏᴜ sᴘʀɪɴᴛ, ᴛʜᴇ ғᴀsᴛᴇʀ ʏᴏᴜ ʙᴇᴄᴏᴍᴇ", "&8( ᴄᴀᴘ : 7 ʙʟᴏᴄᴋs ᴘᴇʀ sᴇᴄᴏɴᴅ #if an item called an unlocker is used this is 10 blocks per second)"
set custom model data of {leofrog} to 102
on join:
while player is online:
if player's inventory contains {leofrog}:
if player is sprinting:
if {unlocked::%player's uuid%} is false:
if {leospeed} < 7:
set player's generic movement speed attribute to (player's generic movement speed attribute + 0.5)
add 0.5 to {leospeed}
if {unlocked::%player's uuid%} is true:
if {leospeed} < 10:
set player's generic movement speed attribute to (player's generic movement speed attribute + 0.5)
add 0.5 to {leospeed}
wait 5 ticks