Advertisement
Guest User

Untitled

a guest
Jun 1st, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1.     on_use = function(itemstack, user, pointed_thing)
  2.         local player
  3.         if pointed_thing.type == "object" then
  4.             if pointed_thing.ref:is_player() then
  5.                 player = pointed_thing.ref
  6.             else return end
  7.         else return end
  8.         if not ace.goded[player:get_player_name()] then
  9.             if player:get_hp() <= 0 then return end
  10.             player:set_hp(player:get_hp() - math.random(1,3))
  11.             if player:get_hp() <= 0 then
  12.                 do_death(user:get_player_name(), player:get_player_name(), "grounded")
  13.             end
  14.         end
  15.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement