Block Placement

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

    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.
https://gyazo.com/f7043c389b22e14bae7789d1e40ade50 I want to make it so players can't build in the world Build.. How do you make the command, so when they execute it. They are allowed to build in the world. Then when they execute it again, they disable it.

code_language.skript:
on break:
    if {build::%uuid of player%} is not set:
        cancel event
        
on place:
    if {build::%uuid of player%} is not set:
        cancel event       
        
command /build:
    trigger:
        if {build::%uuid of player%} is set:
            delete {build::%uuid of player%}
            send "off"
            stop
        set {build::%uuid of player%} to true
        send "on"
 
code_language.skript:
command /build [<player>]:
    trigger:
        if arg-1 is set:
            if player has permission "sk.build.other":
                if {buildmode::%uuid of arg-1%} is set:
                    delete {buildmode::%uuid of arg-1%}
                    send "&7Your Buildmode has been disabled." to arg-1
                    send "&7You disabled building for &6%arg-1%"
                else:
                    set {buildmode::%uuid of arg-1%} to true
                    send "&7Your Buildmode has been enabled." to arg-1
                    send "&7You allowed building for &6%arg-1%"
            else:
                send "You dont have permission to execute this command"
        else:
            if player has permission "sk.build.yourself":
                set {buildmode::%uuid of player%} to true
                send "Your Buildmode has been enabled."
            else:
                send "You dont have permission to execute this command"
               
on break:
    if {buildmode::%uuid of player%} is set:
        cancel event
   
on place:
    if {buildmode::%uuid of player%} is set:
        cancel event
 
Status
Not open for further replies.