XPHandler because i couldn’t think of any better name & because i dont see anything similar to it here
This module provides a fully-working “XP orb” system, in which you can drop XP anywhere in the world for any reason; including prioritizing players and a ‘magnet’ function similar to the one in Minecraft, as well as a customizable XP formula.
Features:
- Comes with a Level System: A fully functional leveling system baked in - but you can customize the module to use any existing system if you know what you’re doing.
- Plug & Play: You can run the module anywhere if you know how to make it a require.
- Customizable: Everything in the module is customizable, as long as you know how to not break code.
- Open Source: ¯\_(ツ)_/¯
How to use & Functions;
In order to init the module, you need to require it. That’s all there is to it.
local XPHandler = require(path);
From there, you can start dropping XP anywhere you want in the world using XPHandler.DropXP, which takes Position, XP amount and a priority target.
For example;
XPHandler.DropXP(VictimHumanoid.Parent:FindFirstChild('HumanoidRootPart').Position, VictimHumanoid.MaxHealth/5, Killer);
If you want to get a player’s level, you can simply do XPHandler.GetLevel on a player.
For example;
XPHandler.GetLevel(Killer);
There are other functions such as CreateXP and GetXP, but they are a bit less useful if you ask me.
…yeah idk how to explain this any more than i already have, but if you got suggestions feel free to reply here. If you find any bugs, it’s better to contact me directly on the SME Discord rather than here because I barely look here.
