Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Flex
- █▀▀ █▀▀█ █▀▀▄ █▀▀█ █▀█ █▀▀█ ▄█ █▀▀
- █▀▀ █▄▄▀ █ █ █ █ ▄▀ █▄▀█ █ ▀▀▄
- ▀▀▀ ▀ ▀▀ ▀ ▀ ▀▀▀▀ █▄▄ █▄▄█ ▄█▄ ▄▄▀
- --]]
- local notes = {
- --[[Clock Time -->]] ["15"] = "rbxassetid://1838601237"; --[[<-- Music Id]]--
- ["16"] = "rbxassetid://1837871067"
- }
- local L = game:GetService("Lighting")
- function getCurrentHour()
- local hour = tonumber(string.split(L.TimeOfDay, ":")[1])
- return hour
- end
- while wait() do
- local currentTime = getCurrentHour()
- if currentTime then
- local music, timePos
- for t, id in pairs(notes) do
- if tonumber(t) == currentTime then
- music = Instance.new("Sound")
- music.Parent = workspace
- music.Name = "Music"
- music.SoundId = id
- music.Looped = false
- music:Play()
- timePos = tonumber(t)
- break
- end
- end
- if music then
- repeat
- currentTime = getCurrentHour()
- wait()
- until currentTime ~= timePos
- print(currentTime, timePos)
- print("Out Of Cycle")
- music:Destroy()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement