Jump to content

protected gen skript - WORKING


DaveRoll

Recommended Posts

this skript is rlly just somthin i did cuz i was bored here it is:
also if you would like me to make it so anyone can break it and it will remove 1 from the player who placed its gen cap msg in da comment thinge

#the options are editable,
#but everything else please dont edit
#nm means the message that will send if the gen broken is not theres
#gencapMSG is the message that it will send if the player has max gen placed
#permMSG is the message that will send if the player does not have the permission to execute the command
#blockRAD is the radius of blocks away the gen has to be for it to function, 
#NOTE: dont put blockRAD to a giant number there for it will not couse LOTS of lag
options:
	nm: &7[&6&lGens&7] &7» &4this is not your gen to break
	gencapMSG: &bYou have reached your Gen Cap!
	permMSG: &cNope!
	blockRAD: 8

on place of coal block:
	set {genlocation::%location of event-block%} to uuid of player
    set {gens::%location of event-block%} to uuid of player
    if {gens::%player's uuid%} < 10:
        add 1 to {gens::%player's uuid%}
    else:
        send "" to player
        send "{@gencapMSG} &7%{gens::%player's uuid%}%&b/&710" to player
        send "" to player
        cancel event

command /gencap [<player>] [<text>] [<number>]:
	permission: gencap.use
	permission message: {@permMSG}
	trigger:
		if arg-1 is set:
			if arg-2 is "reset":
				set {gens::%arg-1's uuid%} to 0
				send "&cYou have just reset %arg-1%&c's gen cap!" to player

command /gens:
	trigger:
		send "" to player
		send "&bYou have used %{gens::%player's uuid%}%&7/&b10 gen space!" to player
		send "" to player

command /sell:
	trigger:
		set {_amount} to amount of paper named "&e$1" in player's inventory
		add {_amount} to {money::%player's uuid%}
		remove {_amount} of paper named "&e$1" item from player's inventory
		send "&7You have just sold &a%{_amount}% &7$1 notes!" to player
		send "&7Total Balance&f: &a%{money::%player's uuid%}%"

command /balance:
	trigger:
		send "" to player
		send "&bYou have &a%{money::%player's uuid%}% &bdollars!" to player
		send ""
        
       
#the function

every 80 ticks:
	loop all blocks in a radius of {radiusblock} of player:
		if loop-block is coal block:
			drop 1 paper named "&e$1" above loop-block
            
on right click:
	if player is holding a paper named "&e$1":
    	set {_amount} to amount of paper named "&e$1" in player's inventory
		add {_amount} to {money::%player's uuid%}
        remove {_amount} of paper named "&e$1" item from player's inventory
        
on break:
	if event-block is coal block:
		if {genlocation::%location of event-block%} is player's uuid:
			remove 1 from {gens::%player's uuid%}
		else:
			cancel event
			send "{@nm}"
            
	

 

Link to comment
Share on other sites

Thanks man.

 

UNTESTED

About Me.

I love minehut And I am hoping to work here soon!

Thanks for reading!

\/ Feel free to dm me! \/

Socals:

Discord: kieranl29#3675

Twitter: @Intorsetorpoli1

Twitch: [kieranl29_] https:// www .twitch.tv/ kieranl29_/ 

IGN: Kieranl29

 

Skills

Skript, Node.js, Script, Python.

 

rules.png.8a72235873ba44b7ce16c69d94fd0d7c.pngreport.png.b068d77eea73dc611507b6649cf3c39e.pngapeal.png.d5a7266a2b7960bd014f7d5be25150f9.png                                     Minehut Pannelapeal.png.d5a7266a2b7960bd014f7d5be25150f9.png

Link to comment
Share on other sites

  • 6 months later...

Please do not necropost.

Locked.

Joined on January 17th 2016

VIP since April 5 2017 - August 1st 2019

JrMod since August 1st

Mod since October 1st

SrMod since November 2nd - 2/7/21

Patron since February 8 - 3/7/21

Mod since March 8 2021

Retired since idk when

 

    [IMG]    button.png?t=Appeal&f=Calibri-Bold&ts=26&tc=fff&tshs=1&tshc=000&hp=20&vp=8&c=10&bgt=gradient&bgc=1d0dea&ebgc=1a0855&be=1 button.png?t=Rules&f=Calibri-Bold&ts=26&tc=fff&tshs=1&tshc=000&hp=20&vp=8&c=10&bgt=gradient&bgc=1d0dea&ebgc=1a0855&be=1  

If I helped or entertained you at all today, please react with a heart.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...