Welcome to SkriptTools.net!

SkriptTools is now part of the skUnity family! skUnity will keep SkriptTools running, updating and adding new features.


- You can now search scripts by author by doing "author:name". For example: "author:nfell2009"

- Login to SkriptTools using your skUnity account to save your favourite scripts and come back to them

Login

Script Viewer

View the code of the script directly in your browser without downloading anything.

Current File: skunitybackup-78.sk - Download / View on the skUnity Parser

options:
# ----------------------------------------------------------------------------------------------

# /-----  |      |-----\  /-----\ |        |
# |       | /    |     |  |     | |        |
# \-----\ |/     |-----/  |     | |        |
#       | |\     |    \   |     | |        |
# \_____/ | \    |     \  \_____/ |_____   |_____

# Made by bigfoot49211 for all to use.
# http://twitter.com/thebigfoot49211
# All I ask is that you don't remove this part... please? :D

# ----------------------------------------------------------------------------------------------

# SETTINGS:

  # Permissions:
	# (Do not leave these blank)
	perm.setrollitems: skript.op 
	perm.roll: skript.roll
	perm.rollmob: skript.op

	# Ignore perms on chest/mob click:
	# (Can roll using a chest/mob even if they don't have the perm defined above)
	ignoreperms: true #true/false

  # Roll Mobs:
	# The name of a roll mob:
	roll.mob.name: &a&lRoll!
	
	# The type of roll mob to spawn
	mobtype: pig
	
	# The amount of time between checking location of roll mobs
	roll.mob.update: 10 ticks

# ----------------------------------------------------------------------------------------------
					# DO NOT CHANGE ANYTHING PAST HERE PLEASE! :)
	version: 0.4

on join:
	if player has permission "skript.op":
		set {_version} to text from "http://pastebin.com/raw.php?i=tsiVb3kg"
		if "%{_version}%" isn't "{@version}":
			wait 1 second
			message ""
			message ""
			message "&6&lAttention! &e&lThere is an update for SkRoll!"
			message "&e&lDownload v&6&l%{_version}% &e&lfrom here: &6&nhttp://bit.ly/Sk-Roll"
			message "&6Notable changes: &e%text from ""http://pastebin.com/raw.php?i=u7TW50KX""%"
			message ""
			message ""
command /setrollitems:
	permission: {@perm.setrollitems}
	trigger:
		clear {item::*}
		loop items in player's inventory:
			add loop-item to {item::*}
			add 1 to {_n}
		message "&eSet &6%{_n}% items&e!"
command /rollmob <text>:
	permission: {@perm.rollmob}
	usage: /rollmob <spawn/remove>
	trigger:
		if arg 1 isn't "spawn" or "remove":
			execute player command "/rollmob"
			stop
		if arg 1 is "spawn":
			give player 1 stick named "&eSpawn Roll Mob"
		if arg 1 is "remove":
			give player 1 blaze rod named "&6Remove Roll Mob"
command /roll:
	trigger:
		if {ignoreperms::%player%} is true:
			delete {ignoreperms::%player%}
		else if player doesn't have permission "{@perm.roll}":
			message "You don't have permission!"
			stop
		if {isrolling::%player%} is true:
			stop
		set {isrolling::%player%} to true
		open chest with 3 rows named "&d&lRolling..." to player
		wait 1 tick
		loop 9 times:
			format slot (loop-number - 1) of player with white stained glass pane named "&7" to be unstealable
		loop 9 times:
			format slot ((loop-number - 1)+18) of player with white stained glass pane named "&7" to be unstealable
		format slot 4 of player with gray stained glass pane named "&7Your item!" to be unstealable
		format slot 22 of player with gray stained glass pane named "&7Your item!" to be unstealable
		set {_loop} to a random integer between 20 and 25
		loop {_loop} times:
			set {_rolling::9} to {_rolling::8}
			set {_rolling::8} to {_rolling::7}
			set {_rolling::7} to {_rolling::6}
			set {_rolling::6} to {_rolling::5}
			set {_rolling::5} to {_rolling::4}
			set {_rolling::4} to {_rolling::3}
			set {_rolling::3} to {_rolling::2}
			set {_rolling::2} to {_rolling::1}
			set {_rolling::1} to a random element out of {item::*}
			loop 9 times:
				set {_n} to loop-number-2
				set {_i} to {_rolling::%loop-number-2%}
				if inventory name of player's current inventory contains "Rolling":
					format slot (({_n} - 1)+9) of player with {_rolling::%loop-number-2%} to be unstealable
			add 1 to {_notesound}
			if {_notesound} > 3:
				set {_notesound} to 1
			if {_notesound} = 1:
				play "NOTE_PLING" specifically to player with pitch 2 and volume 0.5
			if {_notesound} = 2:
				play "NOTE_PLING" specifically to player with pitch 1 and volume 0.5
			if {_notesound} = 3:
				play "NOTE_PLING" specifically to player with pitch 0 and volume 0.5
			wait 2 ticks
		set {_loop} to a random integer between 10 and 18
		loop {_loop} times:
			set {_rolling::9} to {_rolling::8}
			set {_rolling::8} to {_rolling::7}
			set {_rolling::7} to {_rolling::6}
			set {_rolling::6} to {_rolling::5}
			set {_rolling::5} to {_rolling::4}
			set {_rolling::4} to {_rolling::3}
			set {_rolling::3} to {_rolling::2}
			set {_rolling::2} to {_rolling::1}
			set {_rolling::1} to a random element out of {item::*}
			loop 9 times:
				set {_n} to loop-number-2
				set {_i} to {_rolling::%loop-number-2%}
				if inventory name of player's current inventory contains "Rolling":
					format slot (({_n} - 1)+9) of player with {_rolling::%loop-number-2%} to be unstealable
			add 1 to {_notesound}
			if {_notesound} > 3:
				set {_notesound} to 1
			if {_notesound} = 1:
				play "NOTE_PLING" specifically to player with pitch 2 and volume 0.5
			if {_notesound} = 2:
				play "NOTE_PLING" specifically to player with pitch 1 and volume 0.5
			if {_notesound} = 3:
				play "NOTE_PLING" specifically to player with pitch 0 and volume 0.5
			wait 4 ticks
		set {_loop} to a random integer between 7 and 15
		loop {_loop} times:
			set {_rolling::9} to {_rolling::8}
			set {_rolling::8} to {_rolling::7}
			set {_rolling::7} to {_rolling::6}
			set {_rolling::6} to {_rolling::5}
			set {_rolling::5} to {_rolling::4}
			set {_rolling::4} to {_rolling::3}
			set {_rolling::3} to {_rolling::2}
			set {_rolling::2} to {_rolling::1}
			set {_rolling::1} to a random element out of {item::*}
			loop 9 times:
				set {_n} to loop-number-2
				set {_i} to {_rolling::%loop-number-2%}
				if inventory name of player's current inventory contains "Rolling":
					format slot (({_n} - 1)+9) of player with {_rolling::%loop-number-2%} to be unstealable
			add 1 to {_notesound}
			if {_notesound} > 3:
				set {_notesound} to 1
			if {_notesound} = 1:
				play "NOTE_PLING" specifically to player with pitch 2 and volume 0.5
			if {_notesound} = 2:
				play "NOTE_PLING" specifically to player with pitch 1 and volume 0.5
			if {_notesound} = 3:
				play "NOTE_PLING" specifically to player with pitch 0 and volume 0.5
			wait 6 ticks
		set {_loop} to a random integer between 3 and 7
		loop {_loop} times:
			set {_rolling::9} to {_rolling::8}
			set {_rolling::8} to {_rolling::7}
			set {_rolling::7} to {_rolling::6}
			set {_rolling::6} to {_rolling::5}
			set {_rolling::5} to {_rolling::4}
			set {_rolling::4} to {_rolling::3}
			set {_rolling::3} to {_rolling::2}
			set {_rolling::2} to {_rolling::1}
			set {_rolling::1} to a random element out of {item::*}
			loop 9 times:
				set {_n} to loop-number-2
				set {_i} to {_rolling::%loop-number-2%}
				if inventory name of player's current inventory contains "Rolling":
					format slot (({_n} - 1)+9) of player with {_rolling::%loop-number-2%} to be unstealable
			add 1 to {_notesound}
			if {_notesound} > 3:
				set {_notesound} to 1
			if {_notesound} = 1:
				play "NOTE_PLING" specifically to player with pitch 2 and volume 0.5
			if {_notesound} = 2:
				play "NOTE_PLING" specifically to player with pitch 1 and volume 0.5
			if {_notesound} = 3:
				play "NOTE_PLING" specifically to player with pitch 0 and volume 0.5
			wait 8 ticks
		set {_loop} to a random integer between 1 and 3
		loop {_loop} times:
			set {_rolling::9} to {_rolling::8}
			set {_rolling::8} to {_rolling::7}
			set {_rolling::7} to {_rolling::6}
			set {_rolling::6} to {_rolling::5}
			set {_rolling::5} to {_rolling::4}
			set {_rolling::4} to {_rolling::3}
			set {_rolling::3} to {_rolling::2}
			set {_rolling::2} to {_rolling::1}
			set {_rolling::1} to a random element out of {item::*}
			loop 9 times:
				set {_n} to loop-number-2
				set {_i} to {_rolling::%loop-number-2%}
				if inventory name of player's current inventory contains "Rolling":
					format slot (({_n} - 1)+9) of player with {_rolling::%loop-number-2%} to be unstealable
			add 1 to {_notesound}
			if {_notesound} > 3:
				set {_notesound} to 1
			if {_notesound} = 1:
				play "NOTE_PLING" specifically to player with pitch 2 and volume 0.5
			if {_notesound} = 2:
				play "NOTE_PLING" specifically to player with pitch 1 and volume 0.5
			if {_notesound} = 3:
				play "NOTE_PLING" specifically to player with pitch 0 and volume 0.5
			wait 10 ticks
		set {_item} to {_rolling::5}
		if "%name of {_item}%" isn't "<none>":
			message "&eYou won %name of {_item}%!"
		else:
			message "&eYou won %{_item}%!"
		if inventory name of player's current inventory contains "Rolling":
			format slot 9 of player with white stained glass pane named "&7" to be unstealable
			format slot 17 of player with white stained glass pane named "&7" to be unstealable
		wait 5 ticks
		if inventory name of player's current inventory contains "Rolling":		
			format slot 10 of player with white stained glass pane named "&7" to be unstealable
			format slot 16 of player with white stained glass pane named "&7" to be unstealable
		wait 5 ticks
		if inventory name of player's current inventory contains "Rolling":
			format slot 11 of player with white stained glass pane named "&7" to be unstealable
			format slot 15 of player with white stained glass pane named "&7" to be unstealable
		wait 5 ticks
		if inventory name of player's current inventory contains "Rolling":
			format slot 12 of player with white stained glass pane named "&7" to be unstealable
			format slot 14 of player with white stained glass pane named "&7" to be unstealable
		wait 1 second
		give player {_item}
		delete {isrolling::%player%}
		wait 1 tick
		close player's inventory
on quit:
	delete {isrolling::%player%}
on inventory close:
	if {isrolling::%player%} is true:
		wait 1 tick
		open chest with 3 rows named "&d&lRolling..." to player
		wait 1 tick
		loop 9 times:
			format slot (loop-number - 1) of player with white stained glass pane named "&7" to be unstealable
		loop 9 times:
			format slot ((loop-number - 1)+18) of player with white stained glass pane named "&7" to be unstealable
		format slot 4 of player with gray stained glass pane named "&7Your item!" to be unstealable
		format slot 22 of player with gray stained glass pane named "&7Your item!" to be unstealable
on right click on ender chest or chest or trapped chest:
	if player is not sneaking:
		set {_b} to block 2 blocks below clicked block
		if line 1 of {_b} contains "roll_chest":
			cancel the event
			if "{@ignoreperms}" is "true":
				set {ignoreperms::%player%} to true
			wait 1 tick
			execute player command "/roll"
on right click:
	if name of player's tool contains "&eSpawn Roll Mob":
		if target block is set:
			spawn 1 {@mobtype} at location of block above event-block
			apply slowness 10 to last spawned entity for 999 days
			set {loc::%last spawned entity%} to location of last spawned entity
			set name of last spawned entity to "{@roll.mob.name}"
			message "&eRoll mob spawned!"
every {@roll.mob.update}:
	loop all {@mobtype}s:
		if {loc::%loop-entity%} is set:
			if location of loop-entity isn't {loc::%loop-entity%}:
				teleport loop-entity to {loc::%loop-entity%}
on damage:
	if name of victim contains "{@roll.mob.name}":
		cancel the event
		if name of attacker's tool contains "&6Remove Roll Mob":
			delete {loc::%victim%}
			delete victim
			send "&eRoll mob removed!" to attacker
on right click on {@mobtype}:
	if name of event-entity contains "{@roll.mob.name}":
		cancel the event
		if "{@ignoreperms}" is "true":
			set {ignoreperms::%player%} to true
		wait 1 tick
		execute player command "/roll"