Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Created by MisterBasic
- #
- # API for addons:
- # alert(<message>, <player>)
- # gekick(<reason>, <player>)
- # gecmd(<cmd>, <player>)
- #
- #
- options:
- prefix: &8[&6GoldenEyes&8]&e
- version: 0.1
- #Checks
- autoclicker: 15
- autoclicker-kick: 30
- reach: 4
- fastplace: 20
- on join:
- if player has permission "goldeneyes.joinmessage":
- gecmd("version", player)
- # Fast Clicks
- on left click:
- target entity is set
- distance between target block and player > 3
- player's held item is not a pickaxe, axe, shovel, or hoe
- add 1 to {goldeneyes.cps::%player%}
- player does not have permission "goldeneyes.autoclicker.bypass"
- if {goldeneyes.cps::%player%} >= {@autoclicker}:
- add 1 to {goldeneyes.autoclicker.%player%.vl}
- alert("%player% failed AutoClicker [VL %{goldeneyes.autoclicker.%player%.vl}%]", player)
- if {goldeneyes.cps::%player%} >= {@autoclicker-kick}:
- gekick("AutoClicker", player)
- every second:
- clear {goldeneyes.cps::*}
- clear {goldeneyes.fastplace::*}
- clear {goldeneyes.lastplace::*}
- # FastBow
- on shoot:
- shooter does not have permission "goldeneyes.fastbow.bypass"
- if {goldeneyes.lastshot.%shooter%} is not set:
- set {goldeneyes.lastshot.%shooter%} to now
- stop
- if difference between {goldeneyes.lastshot.%shooter%} and now < 2 ticks:
- set {goldeneyes.lastshot.%shooter%} to now
- alert("%shooter% failed FastBow", shooter)
- add 1 to {goldeneyes.fastbow.%shooter%.vl}
- stop
- # Reach
- on damage:
- attacker does not have permission "goldeneyes.reach.bypass"
- attacker is a player
- attacker's gamemode is not creative or spectator
- victim is player
- damage cause is not a projectile
- if distance between attacker and victim is greater than {@reach}+attacker's ping/200:
- add 1 to {goldeneyes.reach.%attacker%.vl}
- alert("%attacker% failed Reach [VL %{goldeneyes.reach.%attacker%.vl}%] (Distance: %distance between attacker and victim% blocks)", attacker)
- # Scaffold / Fastplace
- on place:
- player does not have permission "goldeneyes.fastplace.bypass"
- add 1 to {goldeneyes.fastplace::%player%}
- if {goldeneyes.lastplace::%player%} is not set:
- set {goldeneyes.lastplace::%player%} to now
- stop
- if difference between {goldeneyes.lastplace::%player%} and now < 0.9 ticks:
- cancel event
- add 1 to {goldeneyes.fastplace.%player%.vl}
- alert("%player% failed FastPlace [VL %{goldeneyes.fastplace.%player%.vl}%]", player)
- reset {goldeneyes.lastplace::%player%}
- stop
- if {goldeneyes.fastplace::%player%} >= {@fastplace}:
- cancel event
- add 1 to {goldeneyes.fastplace.%player%.vl}
- alert("%player% failed FastPlace [VL %{goldeneyes.fastplace.%player%.vl}%]", player)
- stop
- # AutoSneak
- on chat:
- player does not have permission "goldeneyes.autosneak.bypass"
- if player is sneaking:
- add 1 to {goldeneyes.autosneak.%player%.vl}
- alert("%player% failed AutoSneak [VL %{goldeneyes.autosneak.%player%.vl}%]", player)
- on inventory close:
- player does not have permission "goldeneyes.autosneak.bypass"
- if player is sneaking:
- add 1 to {goldeneyes.autosneak.%player%.vl}
- alert("%player% failed AutoSneak [VL %{goldeneyes.autosneak.%player%.vl}%]", player)
- # Little extra
- clear {menu.%player%}
- on inventory click:
- player does not have permission "goldeneyes.autosneak.bypass"
- if player is sneaking:
- add 1 to {goldeneyes.autosneak.%player%.vl}
- alert("%player% failed AutoSneak [VL %{goldeneyes.autosneak.%player%.vl}%]", player)
- # WaterWalk
- on walk on water:
- player does not have permission "goldeneyes.waterwalk.bypass"
- set {_lilypad} to 0
- player is not flying
- loop all blocks in radius 2 around player:
- if loop-block is a lily pad:
- add 1 to {_lilypad}
- {_lilypad} < 1
- if block below the player is water:
- if block left of block below the player is water:
- if block right of block below the player is water:
- if block behind the block below the player is water:
- if block infront of block below the player is water:
- if block at player is not water:
- if block above player is not water:
- player is on ground
- add 1 to {goldeneyes.waterwalk.%player%.vl}
- alert("%player% failed WaterWalk [VL %{goldeneyes.waterwalk.%player%.vl}%]", player)
- if {_lilypad} > 1:
- stop
- # Liquid Interact
- on right click on water or lava:
- player does not have permission "goldeneyes.liquidinteract.bypass"
- cancel event
- add 1 to {goldeneyes.liquidinteract.%player%.vl}
- alert("%player% failed LiquidInteract [VL %{goldeneyes.liquidinteract.%player%.vl}%]", player)
- on block break:
- player does not have permission "goldeneyes.liquidinteract.bypass"
- if event-block is water or lava:
- gekick("LiquidInteract", player)
- on block damage:
- player does not have permission "goldeneyes.liquidinteract.bypass"
- if event-block is water or lava:
- gekick("LiquidInteract", player)
- # Flight
- on any movement:
- block below the player is air
- block at the player is air
- player is not riding
- # This part here is really the check, if the player is on the ground and is in the air, it is impossible.
- player is on ground
- set {_blocks} to 0
- player's gamemode is not Creative or Spectator:
- # Possible problems if this wasn't here
- loop all blocks in radius 3 around player:
- if loop-block is stairs or slab:
- stop
- # Checks if the player is in the air
- loop all blocks in radius 2 around player:
- if loop-block is not air:
- add 1 to {_blocks}
- if {_blocks} is greater than 0:
- stop
- if {_blocks} is less than 1:
- # Alerts
- add 1 to {goldeneyes.move.%player%.vl}
- add 1 to {goldeneyes.move.%player%}
- alert("%player% failed Movement [VL %{goldeneyes.move.%player%.vl}%]", player)
- cancel event
- if {goldeneyes.move.%player%} is greater than 5:
- clear {goldeneyes.move.%player%}
- gekick("Flight", player)
- every minute:
- loop all players:
- clear {goldeneyes.move.%loop-player%}
- # CommandManager
- command /goldeneyes [<text>] [<text>] [<text>]:
- description: Main GoldenEyes Command.
- permission: goldeneyes.maincommand
- permission message: Unknown Command. Type /help for help.
- executable by: players and console
- trigger:
- if arg 1 is not set:
- gecmd("version", player)
- else if arg 1 is "checks":
- gecmd("checks", player)
- else if arg 1 is "reload":
- gecmd("reload", player)
- else if arg 1 is "version":
- gecmd("version", player)
- else if arg 1 is "help":
- gecmd("help", player)
- else if arg 1 is "notify":
- if arg 2 is "true":
- gecmd("notify-true", player)
- else if arg 2 is "false":
- gecmd("notify-false", player)
- else:
- send "{@prefix} &cPlease specify a boolean: /goldeneyes notify &4<true|false>&c!"
- else if arg 1 is "reset":
- if arg 3 contains "autoclicker":
- clear {goldeneyes.autoclicker.%arg 2%.vl}
- send "{@prefix} Reset all of %arg 2%'s violations for AutoClicker!" to player
- if arg 3 contains "fastplace":
- clear {goldeneyes.fastplace.%arg 2%.vl}
- send "{@prefix} Reset all of %arg 2%'s violations for Fastplace!" to player
- if arg 3 contains "fastbreak":
- clear {goldeneyes.nuker.%arg 2%.vl}
- send "{@prefix} Reset all of %arg 2%'s violations for FastBreak!" to player
- if arg 3 contains "liquidinteract":
- clear {goldeneyes.liquidinteract.%arg 2%.vl}
- send "{@prefix} Reset all of %arg 2%'s violations for LiquidInteract!" to player
- if arg 3 contains "waterwalk":
- clear {goldeneyes.waterwalk.%arg 2%.vl}
- send "{@prefix} Reset all of %arg 2%'s violations for WaterWalk!" to player
- if arg 3 contains "autosneak":
- clear {goldeneyes.autosneak.%arg 2%.vl}
- send "{@prefix} Reset all of %arg 2%'s violations for AutoSneak!" to player
- if arg 3 contains "reach":
- clear {goldeneyes.reach.%arg 2%.vl}
- send "{@prefix} Reset all of %arg 2%'s violations for Reach!" to player
- if arg 3 contains "movement":
- clear {goldeneyes.move.%arg 2%.vl}
- send "{@prefix} Reset all of %arg 2%'s violations for Movement!" to player
- if arg 3 contains "*" or "all":
- send "{@prefix} Reset all of %arg 2%'s violations!" to player
- clear {goldeneyes.reach.%arg 2%.vl}
- clear {goldeneyes.autosneak.%arg 2%.vl}
- clear {goldeneyes.waterwalk.%arg 2%.vl}
- clear {goldeneyes.liquidinteract.%arg 2%.vl}
- clear {goldeneyes.fastplace.%arg 2%.vl}
- clear {goldeneyes.autoclicker.%arg 2%.vl}
- else if arg 1 is "info":
- if arg 2 is set:
- open chest with 4 rows named "&6&n&lGoldenEyes Player Info" to player
- format slot 4 of player with player head named "&6%arg 2%" with lore "&7Name: %display name of arg 2 parsed as player%||&7UUID: %uuid of arg 2 parsed as player%" to be unstealable
- format slot 13 of player with black stained glass named "&8Work in progress" to be unstealable
- set {menu.%player%} to true
- else:
- gecmd("unknowncmd", player)
- # Functions Manager
- function gecmd(t: text, p: player):
- if {_t} is "version":
- send "{@prefix} Running Version {@version}" to {_p}
- if {_t} is "checks":
- send "{@prefix} Avaliable Checks:%nl%AutoClicker, Reach/Killaura, FastBow, FastPlace/Scaffold, WaterWalk, LiquidInteract, AutoSneak, Flight" to {_p}
- if {_t} is "reload":
- make console execute "/sk reload %script name%.sk"
- send "{@prefix} Fully reloaded GoldenEyes v{@version}!" to {_p}
- if {_t} is "unknowncmd":
- send "{@prefix} Invaild Argument. Usage: /goldeneyes (reload|checks|version|notify) [value]" to {_p}
- if {_t} is "notify-true":
- set {goldeneyes.notify::%{_p}%} to true
- send "{@prefix} Set notifications to True!" to {_p}
- if {_t} is "notify-false":
- set {goldeneyes.notify::%{_p}%} to false
- send "{@prefix} Set notifications to False!" to {_p}
- if {_t} is "help":
- send "&8[&a-=-&8]&7&m-----&8[&6GoldenEyes&8]&7&m-----&8[&a-=-&8]&r" to {_p}
- send "&8[&a!&8]&6 /goldeneyes reload&e: Reload" to {_p}
- send "&8[&a!&8]&6 /goldeneyes version&e: Get the version" to {_p}
- send "&8[&a!&8]&6 /goldeneyes notify <true|false>&e: Toggle notifications" to {_p}
- send "&8[&a!&8]&6 /goldeneyes checks&e: See the Cheat Checks" to {_p}
- send "&8[&a!&8]&6 /goldeneyes help&e: Get Help" to {_p}
- send "&8[&a!&8]&6 /goldeneyes info <player>&e: Get Info" to {_p}
- send "&8[&a!&8]&6 /goldeneyes reset <player> <violations>&e: Reset Violations" to {_p}
- send "&8[&a-=-&8]&7&m-----&8[&6GoldenEyes&8]&7&m-----&8[&a-=-&8]&r" to {_p}
- function alert(m: text, p: player):
- loop all players:
- loop-player has permission "goldeneyes.notify":
- if {goldeneyes.notify::%loop-player%} is true:
- send "{@prefix} %{_m}% (Ping: %{_p}'s ping%)" to loop-player
- send "[GoldenEyesAntiCheat] %{_m}% (Ping: %{_p}'s ping%)" to console
- function gekick(m: text, p: player):
- kick {_p} due to "{@prefix} You were disconnected from the server.%nl%%nl%&4Reason: %{_m}%%nl%%nl%&7Please do not do this again!"
- send "[GoldenEyesAntiCheat] %{_p}% was kicked from the server. Reason: %{_m}%" to console
- loop all players:
- if loop-player has permission "goldeneyes.notify" or "goldeneyes.notify.kick":
- send "{@prefix} %{_p}% was kicked from the server. Reason: %{_m}%" to loop-player
- # End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement