Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # RedirectAFriend Skript v1.7
- # By DinPro
- #
- options:
- prefix: &b&lRedirect-A-Friend
- sound: note.harp
- command /redirectafriend <text>:
- aliases: /raf
- trigger:
- if arg 1 is "help":
- message "&a---------------&3Redirect&a---------------"
- message "&a/redirect send <player> &7- &6Send a redirect request"
- message "&a/redirect accept <player> &7- &6Accepts a redirect request"
- message "&a/redirect deny <player> &7- &6Deny a redirect request"
- message "&a/redirectafriend admin &7- &6Admin Help - Admins ONLY"
- message "&a/redirectafriend help &7- &6Show this help menu"
- exit
- if arg 1 is "admin":
- if player has permission "redirect.admin":
- message "&a---------------&3Redirect&a---------------"
- message "&a/redirectafriend &7- &6Reload the Skript"
- message "&a/redirectafriend reload &7- &6Reloads the skript"
- message "&a/redirectafriend version &7- &6Shows the current version"
- message "&a/redirectafriend author &7- &6Shows the Author of the plugin"
- exit
- else:
- message "{@prefix} &cYou don't have the permission &6redirect.admin&c!"
- if arg 1 is "reload":
- if player has permission "redirect.reload":
- make console execute command "/sk reload RedirectAFriend"
- message "{@prefix} &bSuccessfully reloaded &aRedirect A Friend"
- exit
- else:
- message "{@prefix} &cYou don't have the permission &6redirect.reload&c!"
- if arg 1 is "version":
- if player has permission "redirect.version":
- message "{@prefix} &aYou are currently running &6Redirect A Friend &aon the version &81.7"
- exit
- else:
- message "{@prefix} &cYou don't have the permission &6redirect.version&c!"
- if arg 1 is "author":
- if player has permission "redirect.author":
- message "{@prefix} &aThe Author of this Skript Is &6DinPro&a!"
- exit
- else:
- message "{@prefix} &cYou don't have the permission &6redirect.author&c!"
- else:
- Make the player execute command "/raf help"
- command /redirect <text> <player>:
- trigger:
- if arg 1 is "send":
- if arg 2 is a player:
- if arg 2 is online:
- player isn't arg-2
- if {redirect.%player%.send.%arg-2%} isn't set:
- set {redirect.%player%.send.%arg-2%} to true
- message "{@prefix} &eSuccessfully sent the request to %arg 2%"
- send "{@prefix} &e%player% &asent you a redirect request." to arg 2
- send "{@prefix} &aAccept by typing &b/redirect accept %player%" to arg 2
- exit
- else:
- send "{@prefix} &cYou already sent &6%arg-2% &ca redirect"
- else:
- message "{@prefix} &6%arg-2% &cis not online!"
- if arg 1 is "accept":
- if arg 2 is a player:
- if arg 2 is online:
- player isn't arg-2
- if {redirect.%arg-2%.send.%player%} is set:
- message "{@prefix} &eSuccessfully accepted the request to %arg 2%"
- make the console execute "eco give %player% 50" #the command you want (rewards)
- make the console execute "eco give %arg-2% 50" #the command you want (rewards)
- execute console command "/playsound @a {@sound}" #the sound you want to be played when someone redirects
- broadcast "{@prefix} &b%player% &aand &b%arg-2% &ahave REDIRECTED! Redirect a friend and earn rewards! &b/redirect"
- exit
- else:
- send "{@prefix} &6%arg-2% &chasn't redirected you."
- else:
- message "{@prefix} &6%arg-2% &cis not online!"
- if arg 1 is "deny":
- if arg 2 is a player:
- if arg 2 is online:
- if {redirect.%arg-2%.send.%player%} is set:
- message "{@prefix} &eSuccessfully denied the request to %arg 2%"
- message "{@prefix} &cSuccessfully denied the request from &6%arg 2%"
- send "{@prefix} &6%player% &cDenied your request." to arg 2
- exit
- else:
- message "&6%arg-2% &cis not online!"
- else:
Advertisement
Add Comment
Please, Sign In to add comment