XP Skript

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

aarav9999

Member
Oct 4, 2022
3
0
1
20
Hello, I am really confused about how to make an XP skript. I would want it to be like if a player killed a cow they would get 1 XP whereas if they kill an enderman they get 10 XP.

And if they reach certain levels, they get access to things (I could do that)

Thank You.
 
If you're talking about actual xp that is seen in the xp bar, then you could do something such as:
Code:
on death:
    victim is not player
    if victim is cow:
        add 1 to total experience of player
    else if victim is enderman:
        add 10 to total experience of player
Afaik, Skript doesn't have an actual player experience expression (correct me if I'm wrong!). This total experience expression is from the addon SkBee.

And for leveling up:
Code:
on player level up:
    #do stuff
 
Status
Not open for further replies.