function onCreatePost()	-- adds the noise shader

	setSpriteShader('plswork','noiseShader')
	
	setShaderFloat('plswork','u_ratio', 0.30)

	for i=0,3 do -- an over complicated way to remove op notes
	noteTweenAlpha(i+16, i, math.floor(curStep/9999), 0.3)
	noteTweenAlpha(i+16, i, math.floor(curStep/9999), 4-7)
	end

end


local timePassed = 0 

function onUpdate(elapsed)

    setShaderFloat('plswork','iTime',timePassed)

    timePassed = timePassed + elapsed
end

function opponentNoteHitPre(index, noteData, noteType, isSustain)

    if isSustain then

        setPropertyFromGroup('notes',index, 'noAnimation',true)

        setProperty('dad.holdTimer',0)
		
    end

	
end

    local customNoteColors = { -- left, down, up, right
    r = {"9EDCD8", "9EDCD8", "9EDCD8", "9EDCD8"},
    g = {"000000", "000000", "000000", "000000"},
    b = {"000000", "000000", "000000", "000000"},
}

    for key, value in pairs(customNoteColors) do
        for i = 0, getProperty("unspawnNotes.length") - 1 do
            setPropertyFromGroup("unspawnNotes", i, "rgbShader." .. key, getColorFromHex(value[getPropertyFromGroup("unspawnNotes", i, "noteData") + 1]))
        end
        for j = 0, getProperty("strumLineNotes.length") - 1 do
            setPropertyFromGroup("strumLineNotes", j, "rgbShader." .. key, getColorFromHex(value[getPropertyFromGroup("strumLineNotes", j, "noteData") + 1]))
            setPropertyFromGroup("strumLineNotes", j, "rgbShader.enabled", false)
        end
end
	

function onCreate()	
	
	setProperty('skipCountdown',true)
	makeLuaSprite('startDark', '', 0, 0)
	makeGraphic('startDark', 1500, 1500, '000000')
	setObjectCamera('startDark', 'camHUD')
	setScrollFactor('startDark', 0, 0);
	addLuaSprite('startDark', false)

	--removing UI

	setProperty('healthBar.alpha', tonumber(0))
	setProperty('iconP1.alpha', tonumber(0))
	setProperty('iconP2.alpha', tonumber(0))
	setProperty('scoreTxt.alpha', tonumber(0))
	setProperty('healthBarContainer.visible', false)
	setProperty("showComboNum", false)
	setProperty("showRating", false)
	setProperty('timeBar.visible',false)
	setProperty('timeTxt.visible', false);

	triggerEvent("Camera Follow Pos", 0, 300)

	scaleObject('boyfriend', 2.5, 2.5) 
    doTweenX('boyfriendX2', 'boyfriend', -900, 0.1)
    doTweenY('boyfriendY2', 'boyfriend', 500, 0.1)

end

function onStepHit()

	if curStep == 1 then

		doTweenX('boyfriendintro', 'boyfriend', 100, 4, 'quadInOut')

	end	

	if curStep == 8 then

		doTweenAlpha('startBlackFade', 'startDark', 0, 7, 'linear')

	end

	if curStep == 1088 then

		doTweenX('boyfriendOUTRO', 'boyfriend', 1600, 6, 'linear')

        runHaxeCode([[
            game.boyfriend.playAnim('cry',true);
            game.boyfriend.specialAnim = true;
        ]])

		doTweenAlpha('startBlackFade', 'startDark', 1, 6, 'linear')

	end	

end