point system 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!

mcbluetnt

Member
Jul 22, 2020
4
0
1
22
ok so im currently working on a server and i need like a point system script for example parkour when someone makes it to the end theyll get a point but i only need that part as a command doe cuz im using an npc which is fine but i need a script that gives players points and itll make it to the scoreboard/leaderboard

commands i need:
/points add <number> %player_name%
/points remove <number> %player_name%
/points leaderboards restart (itll remove everyones points)

and thats it please give me a example skript for this cuz im like a begginer and idk how objects work so like... yeah.. i think its easy (I HAVE NO IDEA BTW!!) but if you can help me on this 1 please do

much love!!
-luis
 
Here:
Also i use 2 spaces and not a tab
and i dont know how to make a /points leaderboards restart


Code:
on first join:
  set {points::%player%} to 0

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

command /pointsadd [<player>] [<integer>]:
  permission:sk.addpoints
  trigger:
    add arg-2 to {points::%arg-1%}
    send "&cAdded &3%arg-2% &3points to &6%arg-1%"

command /pointsremove [<player>] [<integer>]:
  permission:sk.removepoints
  trigger:
    remove arg-2 from {points::%arg-1%}
    send "&cRemoved &3%arg-2% &3points from &6%arg-1%"

command /points [<player>]:
  cooldown:1 second
  trigger:
    if arg-1 is not set:
      send "%{points::%player%}%"
    else:
      send "%{points::%arg-1%}%"