Solved Skript only works for operators

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

BrokOlieSoep

Member
Oct 10, 2021
3
0
1
22
I am making a mmorpg script, and everything worked, but when I let a friend play it, they couldn't warp through right-clicking signs, until I made them operator. How can I solve this? Thanks in advance.
Code:
on exp spawn:
    cancel event
    
every 60 seconds:
    
    make console execute command "/fill 263 68 184 269 71 180 cobblestone"
    make console execute command "/fill 273 68 184 279 71 180 iron_ore"
    
on block break:
    
    event-block is iron ore
    drop 1 iron ingot at location of event-block

on death of pig:
    spawn 1 pig at victim's location
    set the last spawned entity's max health to 5
    set the last spawned entity's health to 5
    add 1 to {pig_kills.%attacker%}
    attacker is a player:
        give 1 exp to attacker
        
on death of cow:
    spawn 1 cow at victim's location
    set the last spawned entity's max health to 10
    set the last spawned entity's health to 10
    add 1 to {cow_kills.%attacker%}
    attacker is a player:
        give 2 exp to attacker
        
on death of zombie:
    spawn 1 zombie at victim's location
    set the last spawned entity's max health to 10
    set the last spawned entity's health to 10
    add 1 to {zombie_kills.%attacker%}
    attacker is a player:
        give 4 exp to attacker
        
on damage:
    attacker is a player:
        set {_dam} to damage * attacker's level * 0.1
        set damage to damage + {_dam}
        
        send action bar with text "<red>+%{_dam}% dmg" to attacker
        
on right click on sign:
    line 2 of event-block is "Warp to shop":
        if {pig_kills.%player%} is greater than 9:
            message "Warping to shop!"
            teleport player to location(333.5, 77, 36.5)
        else:
            set {tmp} to (10 - {pig_kills.%player%})
            message "<light red>You need %{tmp}% <light red>more pig kills to do this!"
            
    line 2 of event-block is "Warp to cows":
        if {pig_kills.%player%} is greater than 249:
            message "Warping to cows!"
            teleport player to location(215.5, 72, 172.5)
        else:
            set {tmp} to (250 - {pig_kills.%player%})
            message "<light red>You need %{tmp}% <light red>more pig kills to do this!"
    
    line 2 of event-block is "Warp to pigs":
        message "Warping to pigs!"
        teleport player to location(240.5, 70, 180.5)
        
    line 2 of event-block is "Warp to stone":
        message "Warping to stone!"
        teleport player to location(262.5, 68, 182.5)
        
    line 2 of event-block is "Warp to iron":
        if {cow_kills.%player%} is greater than 24:
            message "Warping to iron!"
            teleport player to location(272.5, 68, 182.5)
        else:
            set {tmp} to (25 - {cow_kills.%player%})
            message "<light red>You need %{tmp}% <light red>more cow kills to do this!"
            
    line 2 of event-block is "Warp to zombies":
        if {cow_kills.%player%} is greater than 99:
            message "Warping to zombies!"
            teleport player to location(202.5, 64, 219.5)
        else:
            set {tmp} to (100 - {cow_kills.%player%})
            message "<light red>You need %{tmp}% <light red>more cow kills to do this!"
        
    line 1 of event-block is "Wooden sword":
        
        player has 5 raw porkchop
        remove 5 raw porkchop from player
        give 1 wooden sword to player
        send action bar with text "<light green>+ Wooden sword" to player
        
    line 1 of event-block is "Wooden pickaxe":
        
        player has 10 raw porkchop
        remove 10 raw porkchop from player
        make console execute command "/give %player% wooden_pickaxe{CanDestroy:[""minecraft:cobblestone""]} 1"
        send action bar with text "<light green>+ Wooden pickaxe" to player
        
    line 1 of event-block is "Stone pickaxe":
        
        player has wooden pickaxe
        player has 32 cobblestone
        remove wooden pickaxe from player
        remove 32 cobblestone from player
        make console execute command "/give %player% stone_pickaxe{CanDestroy:[""minecraft:cobblestone"",""minecraft:iron_ore""]} 1"
        send action bar with text "<light green>+ Stone pickaxe" to player
        
    line 1 of event-block is "Stone sword":
        
        player has wooden sword
        player has 16 cobblestone
        remove wooden sword from player
        remove 16 cobblestone from player
        give stone sword to player
        send action bar with text "<light green>+ Stone sword" to player
        
    line 1 of event-block is "Iron chestplate":
        
        player has 32 iron ingots
        remove 32 iron ingots from player
        give iron chestplate to player
        send action bar with text "<light green>+ Iron chestplate" to player
        
    line 1 of event-block is "Protection 2":
        
        player has 64 iron ingots
        remove 64 iron ingots from player
        make console execute command "/give %player% enchanted_book{StoredEnchantments:[{id:""minecraft:protection"",lvl:2s}]} 1"
        send action bar with text "<light green>+ Protection 2" to player
    
    line 1 of event-block is "Iron sword":
        
        player has 32 iron ingots
        player has stone sword
        remove 32 iron ingots from player
        remove stone sword from player
        give iron sword to player
        send action bar with text "<light green>+ Iron sword" to player
 
I don't think that comes from skript, check if maybe you have a region there and they're not allowed to use signs, because that's what it does by default
 
Status
Not open for further replies.