Tested this out in a level pack I'm working on, and I can confirm that it works just fine if you use an event to activate the script.
Simply put all the code in the luna.lua that comes with the revive script into an onEvent function in your
level's luna.lua, which should look something like this:
Code: Select all
function onEvent(eventName)
if eventName == "[eventnamehere]" then
local playerRevive = require("playerRevive")
function onPlayerKill(eventToken)
player.deathTimer = 1
eventToken.cancelled = true
end
end
end
I personally made this get triggered by an axe that I changed to look like a Totem of Undying from Minecraft, but I'm sure there's other ways to use it with an event.