Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Made By HDR @MartinRefseth
- sleep(0.2)
- os.loadAPI("button")
- for a,b in pairs(rs.getSides()) do
- if peripheral.getType(b) == 'monitor' then
- mon = peripheral.wrap(b)
- break
- end
- end
- -- Functions/Buttons
- function fillTable()
- button.setTable("13", Thir, 2,12,3,5)
- button.setTable("Cat", Cat, 14,24,3,5)
- button.setTable("Blocks", Blocks, 26,36,3,5)
- button.setTable("Chirp", Chirp, 38,48,3,5)
- button.setTable("Far", Far, 50,60,3,5)
- button.setTable("Mall", Mall, 2,12,7,9)
- button.setTable("Mellohi", Mellohi, 14,24,7,9)
- button.setTable("Stal", Stal, 26,36,7,9)
- button.setTable("Strad", Strad, 38,48,7,9)
- button.setTable("Ward", Ward, 50,60,7,9)
- button.setTable("11", Elev, 2,12,11,13)
- button.setTable("Wait", Wait, 14,24,11,13)
- button.setTable("???", Question, 26,36,11,13)
- button.setTable("Gaia 1", GaiaOne, 38,48,11,13)
- button.setTable("Gaia 2", GaiaTwo, 50,60,11,13)
- button.setTable("Still Alive", Slive, 20,30,15,17)
- button.setTable("Radio Loop", Roop, 8,18,15,17)
- button.setTable("Want You", WYG, 32,42,15,17)
- button.setTable("Wanderer", Wander, 44,54,15,17)
- button.setTable("Stop", Stop, 20,30,19,20)
- button.setTable("Reboot", Reboot, 32,42,19,20)
- button.screen()
- end
- function getClick()
- event,side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- -- Functions
- function Thir()
- button.flash("13")
- print("Loading 13")
- local title = "C418 - 13"
- peripheral.find("drive", disk.stopAudio)
- peripheral.find( "drive", function( name )
- if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
- disk.playAudio( name )
- end
- end )
- end
- function Cat()
- button.flash("Cat")
- print("Loading Cat")
- local title = "C418 - cat"
- peripheral.find("drive", disk.stopAudio)
- peripheral.find( "drive", function( name )
- if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
- disk.playAudio( name )
- end
- end )
- end
- function Blocks()
- button.flash("Blocks")
- print("Loading Blocks")
- peripheral.find("drive", disk.stopAudio)
- local title = "C418 - blocks"
- peripheral.find("drive", disk.stopAudio)
- peripheral.find( "drive", function( name )
- if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
- disk.playAudio( name )
- end
- end )
- end
- function Chirp()
- button.flash("Chirp")
- print("Loading Chirp")
- peripheral.find("drive", disk.stopAudio)
- local title = "C418 - chirp"
- peripheral.find("drive", disk.stopAudio)
- peripheral.find( "drive", function( name )
- if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
- disk.playAudio( name )
- end
- end )
- end
- function Far()
- button.flash("Far")
- print("Loading Far")
- peripheral.find("drive", disk.stopAudio)
- local title = "C418 - far"
- peripheral.find("drive", disk.stopAudio)
- peripheral.find( "drive", function( name )
- if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
- disk.playAudio( name )
- end
- end )
- end
- function Mall()
- button.flash("Mall")
- print("Loading Mall")
- peripheral.find("drive", disk.stopAudio)
- local title = "C418 - mall"
- peripheral.find("drive", disk.stopAudio)
- peripheral.find( "drive", function( name )
- if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
- disk.playAudio( name )
- end
- end )
- end
- function Mellohi()
- button.flash("Mellohi")
- print("Loading Mellohi")
- peripheral.find("drive", disk.stopAudio)
- local title = "C418 - mellohi"
- peripheral.find("drive", disk.stopAudio)
- peripheral.find( "drive", function( name )
- if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
- disk.playAudio( name )
- end
- end )
- end
- function Stal()
- button.flash("Stal")
- print("Loading Stal")
- peripheral.find("drive", disk.stopAudio)
- local title = "C418 - stal"
- peripheral.find("drive", disk.stopAudio)
- peripheral.find( "drive", function( name )
- if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
- disk.playAudio( name )
- end
- end )
- end
- function Strad()
- button.flash("Strad")
- print("Loading Strad")
- peripheral.find("drive", disk.stopAudio)
- local title = "C418 - strad"
- peripheral.find("drive", disk.stopAudio)
- peripheral.find( "drive", function( name )
- if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
- disk.playAudio( name )
- end
- end )
- end
- function Ward()
- button.flash("Ward")
- print("Loading Ward")
- peripheral.find("drive", disk.stopAudio)
- local title = "C418 - ward"
- peripheral.find("drive", disk.stopAudio)
- peripheral.find( "drive", function( name )
- if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
- disk.playAudio( name )
- end
- end )
- end
- function Elev()
- button.flash("11")
- print("Loading 11")
- peripheral.find("drive", disk.stopAudio)
- local title = "C418 - 11"
- peripheral.find("drive", disk.stopAudio)
- peripheral.find( "drive", function( name )
- if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
- disk.playAudio( name )
- end
- end )
- end
- function Wait()
- button.flash("Wait")
- print("Loading Wait")
- peripheral.find("drive", disk.stopAudio)
- local title = "C418 - wait"
- peripheral.find("drive", disk.stopAudio)
- peripheral.find( "drive", function( name )
- if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
- disk.playAudio( name )
- end
- end )
- end
- function Question()
- button.flash("???")
- print("Loading ???")
- peripheral.find("drive", disk.stopAudio)
- local title = "corruption"
- peripheral.find("drive", disk.stopAudio)
- peripheral.find( "drive", function( name )
- if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
- disk.playAudio( name )
- end
- end )
- end
- function GaiaOne()
- button.flash("Gaia 1")
- print("Loading Gaia 1")
- peripheral.find("drive", disk.stopAudio)
- local title = "botania:gaia1"
- peripheral.find("drive", disk.stopAudio)
- peripheral.find( "drive", function( name )
- if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
- disk.playAudio( name )
- end
- end )
- end
- function GaiaTwo()
- button.flash("Gaia 2")
- print("Loading Gaia 2")
- peripheral.find("drive", disk.stopAudio)
- local title = "botania:gaia2"
- peripheral.find("drive", disk.stopAudio)
- peripheral.find( "drive", function( name )
- if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
- disk.playAudio( name )
- end
- end )
- end
- function Roop()
- button.flash("Radio Loop")
- print("Loading Radio Loop")
- peripheral.find("drive", disk.stopAudio)
- local title = "portalgun:records.radioloop"
- peripheral.find("drive", disk.stopAudio)
- peripheral.find( "drive", function( name )
- if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
- disk.playAudio( name )
- end
- end )
- end
- function Slive()
- button.flash("Still Alive")
- print("Loading Still Alive")
- peripheral.find("drive", disk.stopAudio)
- local title = "portalgun:records.stillalive"
- peripheral.find("drive", disk.stopAudio)
- peripheral.find( "drive", function( name )
- if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
- disk.playAudio( name )
- end
- end )
- end
- function WYG()
- button.flash("Want You")
- print("Loading Want You Gone")
- peripheral.find("drive", disk.stopAudio)
- local title = "portalgun:records.wantyougone"
- peripheral.find("drive", disk.stopAudio)
- peripheral.find( "drive", function( name )
- if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
- disk.playAudio( name )
- end
- end )
- end
- function Wander()
- button.flash("Wanderer")
- print("Loading Wanderer")
- peripheral.find("drive", disk.stopAudio)
- local title = "wanderer"
- peripheral.find("drive", disk.stopAudio)
- peripheral.find( "drive", function( name )
- if disk.hasAudio( name ) and disk.getAudioTitle( name ) == title then
- disk.playAudio( name )
- end
- end )
- end
- function Stop()
- button.flash("Stop")
- print("Stopping Disk")
- peripheral.find("drive", disk.stopAudio)
- end
- function Reboot()
- button.flash("Reboot")
- print("Rebooting")
- peripheral.find("drive", disk.stopAudio)
- mon.clear()
- os.reboot()
- end
- -- Heading
- local greeting = "HDR's Music System V1.5"
- fillTable()
- button.heading(greeting)
- while true do
- getClick()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement