Any Skript experts around who are willing to commit into looking into my killstreak skript problem?

  • 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!

Auoraaa

Member
Apr 22, 2025
1
0
1
Code:
# Killstreak.sk
# Killstreak tracker with randomized broadcast messages every 5 kills

variables:
[CODE]{killstreaks::} = 0

# --- Killstreak System ---
on death of a player:
    attacker is a player
    victim is a player

    # Increase attacker's killstreak
    add 1 to {killstreaks::%attacker%}
    set {_streak} to {killstreaks::%attacker%}

    # Send message to attacker
    send "&aYou are on a killstreak of &e%{_streak}%!" to attacker

    # Randomized broadcast every 5 kills: 5, 10, 15, 20, ...
    if {_streak} mod 5 = 0:
        set {killstreakmsgs::*} to
        "&c⚔ %attacker% is going wild with &e%{_streak}% kills in a row!",
        "&6 %attacker% is dominating with a &e%{_streak}x killstreak!",
        "&b No one can stop %attacker%! &7(&e%{_streak}% kills&7)",
        "&d %attacker% is a beast! &e%{_streak}% kills and counting!",
        "&4‼ %attacker% just hit a &e%{_streak}x killstreak&4. This is getting dangerous!"
      
        # Select a random message from the killstreak list
        set {_message} to random element out of {killstreakmsgs::*}
      
        # Broadcast the message to all players
        broadcast "%{_message}%"

    # Reset victim's killstreak
    if {killstreaks::%victim%} is set:
        set {_lost} to {killstreaks::%victim%}
        send "&7Your killstreak of &c%{_lost}% &7has ended." to victim
        delete {killstreaks::%victim%}
[/CODE]
 
first I found this {killstreaks::} = 0 should be set {killstreaks::*} = 0
second you can make is simpler if you remove victim is a player because it is specified in the trigger
and that is all that I realy caught