Josh64

Worth a try

Jan 10th, 2020
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. local Mod = RegisterMod(-- your mod, 1)
  2. local game = Game()
  3.  
  4. local wasRevived = false
  5. local isLazarus = false
  6.  
  7. function Mod:onPlayerUpdate(player)
  8. if player:HasCollectible(-- your item) then
  9. if wasRevived == false
  10. and player:IsDead() then
  11. player:Revive()
  12. wasRevived = true
  13. end
  14. if wasRevived == true
  15. and isLazarus == false
  16. and player:GetPlayerType() == PlayerType.PLAYER_LAZARUS) then
  17. isLazarus = true
  18. end
  19.  
  20. While (wasRevived == true
  21. and isLazarus == false
  22. and player:GetPlayerType() ~= PlayerType.PLAYER_LAZARUS) do
  23. -- give fake item for Clicker
  24. player:AddCollectible(1, false)
  25. player:UseActiveItem(482, false, false, false, false)
  26. end
  27. end
  28. end
  29. Mod:AddCallback(ModCallbacks.MC_POST_PLAYER_UPDATE, Mod.onPlayerUpdate)
Add Comment
Please, Sign In to add comment