Josh64

random trinket2

Apr 20th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. local Mod = RegisterMod("Mod", 1)
  2. local game = Game()
  3.  
  4. local function Mod:onPlayerInit(player, trinket)
  5. if game:GetFrameCount() == 1 then
  6. local player = Isaac.GetPlayer(0)
  7. local trinket = math.random(125)
  8. player:ToPlayer():AddTrinket(TrinketType(trinket))
  9. end
  10. end
  11.  
  12. Mod:AddCallback(ModCallbacks.MC_POST_PLAYER_INIT, Mod.onPlayerInit)
Advertisement
Add Comment
Please, Sign In to add comment