Skip to content

22aispro/DiddyLevel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 

Repository files navigation

DiddyLevel

Dynamic Leveling Module for Roblox

Why us?

  • We offer an easy to use leveling system so you don't have to make one from scratch.
  • Handles XP and player progression automatically.
  • Flexible enough to add your own custom leveling methods.

Setup

  • Place DiddyLevel in ServerStorage
  • Include LevelMethods and LevelHandler inside DiddyLevel

Features

  • Track and award XP
  • Flexible leveling system
  • Works out of the box

Usage Examples

Initialize Levels

  • Simply make a table of the levels you want and their required XP, and use DiddyLevel.InitializeLevels(Tbl) as shown below.
local levels = {
    {Level = 1, XPRequired = 0},
    {Level = 2, XPRequired = 100},
    {Level = 3, XPRequired = 250},
}

DiddyLevel.InitializeLevels(levels)

Intialize Player

  • To do this simply make a players.PlayerAdded connection
game.Players.PlayerAdded:Connect(function(player)
    local playerData = {Level = 1, XP = 0} -- PlayerLevelObject
    DiddyLevel.InitializePlayer(player, playerData)
end)

Create custom leveling methods

  • These are simply methods the player can use to gain XP
  • You can do this by calling DiddyLevel.CreateLevelMethod(MethodInfo) MethodInfo is a table
local customMethod = {
   key = "TestMethod";
    Callback = function(player, char, ...)
        DiddyLevel.AwardXP(player, amount (e.g. 5))
    end
}

DiddyLevel.CreateLevelMethod(customMethod)

Force a method to fire

  • This will force a method to fire for a player; Please dont allow clients to exploit this.
DiddyLevel.ForceMethod("TestMethod", player, character)

Award XP directly

  • This can be done if you want to possible make a command to award XP
  • The first argument will be the player that gets the XP, the second will be how much XP is awarded.
DiddyLevel.AwardXP(player, 5)

About

Dynamic leveling module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages