script/phd_generator.rb
def writeToFile users,filename="loop.mcfunction"
	f = File.new(filename,"w+")
	f.write("##########################################
# Author: MadCat (youtube.com/MadCatHoG) 
# Date: Jun 29, 2018
# Version: 2.0
# Minecraft Version 1.13
# Description:
# Player Head Drop loop Function
##########################################
")
	users.each { |user| f.write("\n"); f.write(genCommand user); f.write("\n") }

	f.write("
##########################################
scoreboard players set @a[scores={phd.deaths=1..}] phd.deaths 0
scoreboard players set @a[scores={phd.kills=1..}] phd.kills 0
")
	f.close
	p "Commands generated and written in "+filename
end
#Writes a function with all the player head textures and commands.
#Needs an Array with all the users IGN.
Writes a function with all the player head textures and commands.
Needs an Array with all the users IGN.
Writes a function with all the player head textures and commands . Needs an Array with all the users IGN .
def writeToFile users,filename="loop.mcfunction"
	f = File.new(filename,"w+")
	f.write("##########################################
# Author: MadCat (youtube.com/MadCatHoG) 
# Date: Jun 29, 2018
# Version: 2.0
# Minecraft Version 1.13
# Description:
# Player Head Drop loop Function
##########################################
")
	users.each { |user| f.write("\n"); f.write(genCommand user); f.write("\n") }
	f.write("
##########################################
scoreboard players set @a[scores={phd.deaths=1..}] phd.deaths 0
scoreboard players set @a[scores={phd.kills=1..}] phd.kills 0
")
	f.close
	p "Commands generated and written in "+filename
end
def writeToFile users , filename = "loop.mcfunction" f = File . new ( filename , "w+" ) f . write ( "##########################################
# Author: MadCat (youtube.com/MadCatHoG) 
# Date: Jun 29, 2018
# Version: 2.0
# Minecraft Version 1.13
# Description:
# Player Head Drop loop Function
##########################################
" ) users . each { | user | f . write ( "\n" ) ; f . write ( genCommand user ) ; f . write ( "\n" ) } f . write ( "
##########################################
scoreboard players set @a[scores={phd.deaths=1..}] phd.deaths 0
scoreboard players set @a[scores={phd.kills=1..}] phd.kills 0
" ) f . close p "Commands generated and written in " + filename end
Writes a function with all the player head textures and commands.
Writes a function with all the player head textures and commands .
users
filename