Hello! I have an autocompressor skript, which is kinda poorly coded, it's not very efficient, can someone help me fix the code?
Code:
function compress(player:player):
while {_player} has 64 oak log named "<##8A3E0C>Oak":
remove 64 of oak logs named "<##8A3E0C>Oak" from {_player}
give {_player} shiny oak log named "&aCompressed &8» &fOak" with lore "&7Information:" and "&fSource: &aOak Mines" and "&fWorld: &aOverworld" and "" and "&7Rarity &x&7&E&7&E&7&E&lC&x&9&8&9&8&9&8&lO&x&B&2&B&2&B&2&lM&x&C&B&C&B&C&B&lM&x&E&5&E&5&E&5&lO&x&F&F&F&F&F&F&lN"
while {_player} has 64 stone named "&7Stone":
remove 64 of stone named "&7Stone" from {_player}
give {_player} shiny stone named "&aCompressed &8» &fStone" with lore "&7Information:" and "&fSource: &aStone Mines" and "&fWorld: &aOverworld" and "" and "&7Rarity &x&7&E&7&E&7&E&lC&x&9&8&9&8&9&8&lO&x&B&2&B&2&B&2&lM&x&C&B&C&B&C&B&lM&x&E&5&E&5&E&5&lO&x&F&F&F&F&F&F&lN"