Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local anotherPowerDownLib = {}
- anotherPowerDownLib.enabled = true
- function anotherPowerDownLib.onInitAPI()
- registerEvent(anotherPowerDownLib, "onDraw", "onDraw", true)
- end
- local playerData = {}
- function anotherPowerDownLib.onDraw()
- if not isOverworld and anotherPowerDownLib.enabled then
- for _, p in ipairs(Player.get()) do
- playerData[p] = playerData[p] or {}
- playerData[p].curState = playerData[p].curState or 0
- playerData[p].stateTimer = playerData[p].stateTimer or 0
- if p.ForcedAnimationTimer == 0 then
- playerData[p].curState = p.CurrentPowerup
- end
- if p.ForcedAnimationState == 2 then
- if playerData[p].curState == 2 then return end
- if not anotherPowerDownLib.enabled then return end
- p.ForcedAnimationState = 227
- p.ForcedAnimationTimer = 1
- end
- if p.ForcedAnimationState == 227 and anotherPowerDownLib.enabled then
- p.ForcedAnimationTimer = 1
- playerData[p].stateTimer = playerData[p].stateTimer + 1
- if playerData[p].stateTimer % 5 == 0 then
- if p.CurrentPowerup == 2 then
- p.CurrentPowerup = playerData[p].curState
- else
- p.CurrentPowerup = 2
- end
- end
- if playerData[p].stateTimer >= 50 then
- if p.CurrentPowerup == playerData[p].curState then
- p.CurrentPowerup = 2
- end
- p.BlinkTimer = 150
- p.BlinkState = true
- p.ForcedAnimationState = 0
- p.ForcedAnimationTimer = 0
- playerData[p].stateTimer = 0
- end
- end
- end
- end
- end
- return anotherPowerDownLib
Add Comment
Please, Sign In to add comment