Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ENT:Use( activator )
- if( self:Getexperience() == 0 ) then return end
- if( activator:IsValid() and activator:IsPlayer() ) then
- activator:addXP( self:Getexperience() or 0 )
- self:Setexperience( 0 )
- if self.Charges <= 0 then
- activator:ChatPrint("You have finished reading "..self:Gettitle().."!")
- self:Remove()
- else
- activator:ChatPrint("You have read a few chapters of "..self:Gettitle().."!")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement