Jump to content

Points System ( Karma )


ForUToo

Recommended Posts

Code:

Spoiler

# Made by ForUToo

options:
    server: &7[&6Server&7]

on first join:
    set {karma::%player%} to 0

on join:
    if {karma::%player%} is not set:
        set {karma::%player%} to 0

on death of player:
    wait 2 ticks
    broadcast "{@server}&7 Say F in the chat for &6%player%&7!"
    wait 1 tick
    loop all players:
        wait 1 tick
        set {fmessage::%player%} to true
        set {fmessageanti::%player%} to false
        stop
        
on death:
    wait 3 ticks
    if victim is player:
        send "{@server}&7 You murdered &c%victim%&7! how could you? &d-10 Karma!" to attacker
        remove 10 from {karma::%attacker%}
        stop

on chat:
    if message is "f" or "F":
        if {fmessage::%player%} is true:
            wait 0.1 second
            message "{@server} &d+10 Karma!"
            add 10 to {karma::%player%}
            set {fmessageanti::%player%} to true
            set {fmessage::%player%} to false
            stop
on chat:
    if message is "f" or "F":
        if {fmessageanti::%player%} is true:
            cancel event
            
command /givekarma [<player>] [<integer>]:
    permission: sk.givekarma
    permission message: {@server} &cYou are not allowed to give karma!
    trigger:
        add arg-2 to {karma::%arg-1%}
        send "{@server}&e Added &6%arg-2% &ekarma to &e%arg-1%"
        
command /delkarma [<player>] [<integer>]:
    permission: sk.delkarma
    permission message: {@server} &cYou are not allowed to remove karma!
    trigger:
        remove arg-2 from {karma::%arg-1%}
        send "{@server}&e Removed &6%arg-2% &ekarma to &e%arg-1%"
        
command /reskarma [<player>]:
    permission: sk.reskarma
    permission message: {@server} &cYou are not allowed to reset karma!
    trigger:
        if arg-1 is not set:
            set {karma::%player%} to 0
            message "{@server}&e Reset &6%player%&e's karma."
        else if arg-1 is set:
            set {karma::%arg-1%} to 0
            message "{@server}&e Reset &6%arg-1%&e's karma."

Took me a while lol 🙂

Link to comment
Share on other sites

  • 2 weeks later...
On 11/30/2021 at 6:31 PM, Mrbizarre said:

I was gonna make a scoreboard and have karma as my currency how can i list how much karma i have? On the scoreboard?

 

(Im using skbee)

 

Set the line to whatever you want and the variable to show it would be %{karma::%loop-player%}% or {karma::%player%} depends if you are using a loop or an 'on join' thing

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...