Help with script pls

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

Matixo55

Member
Jun 17, 2018
4
0
1
Can somedoby make script that tp players friom area to random place in another when somebody click button in specyfic location? Need it for ox
 
When requesting someone to make a skript for you, please use the REQUEST forum with the correct FORMAT

But since Its already here, i quickly whipped this one up for you
Its not the BEST option but its decent

I put 2 options at the top where you can set the max X and Z distances
Also the command is /rtp set to set your button
Permission is rtp.admin

code_language.skript:
options:
    maxX: 1000
    maxZ: 1000

command /rtp [<text>]:
    permission: rtp.admin
    permission message: &7[&3RTP&7] - &cYou do not have permission to use this command
    trigger:
        if arg-1 is set:
            if arg-1 is "set":
                set {rtp::set} to true
                send "&7[&3RTP&7] - &aClick button now to set it"

on right click:
    if target block is button:
        if {rtp::set} is set:
            if {rtp::set} is true:
                set {rtp::button} to location of target block
                send "&7[&3RTP&7] - &aRTP Buttong set at &b%location of target block%"
                delete {rtp::set}
        if {rtp::set} is not set:
            if {rtp::button} is location of target block:
                send "&7[&3RTP&7] - &6Stand still and wait for RTP"
                set {_x} to random number between 0 and {@maxX}
                set {_y} to 200
                set {_z} to random number between 0 and {@maxZ}
                set {_loc} to location {_x}, {_y}, and {_z}
                teleport player to {_loc}
                set {rtp::safety::%player%} to true

on damage:
    if {rtp::safety::%victim%} is true:
        cancel event
        wait 5 ticks
        set {rtp::safety::%victim%} to false
 
Status
Not open for further replies.