Roblox/luau_corpus huggingface dataset:
-- ================================================================================
-- LOCAL FUNCTIONS
-- ================================================================================
local function CheckNAN(value, returnIfNan)
	return (value == value and value or returnIfNan)
end -- CheckNAN

local function DeltaAngle(current, target)
	local num = (target - current) % TAU
	if num > PI then
		num = (num - TAU)
	end
	return num
end -- DeltaAngle()

local function DeltaAngleV3(pos1, pos2)
	local x = DeltaAngle(pos1.X, pos2.X)
	local y = DeltaAngle(pos1.Y, pos2.Y)
	local z = DeltaAngle(pos1.Z, pos2.Z)
	return V3(x, y, z)
end -- DeltaAngleV3()
--	carSeat.Parent.Body.Dash.Screen.G.Radio.VOLMENU.VolumeText.Text = "VOLUME: "..carSeat.Parent.Body.MP.Sound.Volume
end

F.updateValue = function(Val, Value)
	if Val then
		Val.Value = Value
	end
end


F.FMSwitch = function(FM)
	if carSeat.Stations.mood.Value == 5 then
		carSeat.Parent.Body.MP.Sound:Stop()
		carSeat.Stations.mood.Value = 2
-- Waits for the child of the specified parent
local function WaitForChild(parent, childName)
	while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
	return parent[childName]
end

local Tool = script.Parent

local Animations = {}
local MyHumanoid
local MyCharacter


local function PlayAnimation(animationName)
	if Animations[animationName] then
		Animations[animationName]:Play()
	end
end

local function StopAnimation(animationName)
	if Animations[animationName] then
		Animations[animationName]:Stop()
	end
end


function OnEquipped(mouse)
	MyCharacter = Tool.Parent
	MyHumanoid = WaitForChild(MyCharacter, 'Humanoid')
	if MyHumanoid then
		Animations['IdleAnim'] = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'Idle'))
	end
	PlayAnimation('IdleAnim')
end

function OnUnequipped()
	for animName, _ in pairs(Animations) do
		StopAnimation(animName)
	end
end

Tool.Equipped:connect(OnEquipped)
Tool.Unequipped:connect(OnUnequipped)
---////==========================================\\\---	
--Controller for: Railroad Crossing Sounder
Sounder = script.Parent.Parent.ControlBox.CrossingValues.Bell
--// All global vars will be wiped/replaced except script
--// All guis are autonamed client.Variables.CodeName..gui.Name

return function(data, env)
	if env then
		setfenv(1, env)
	end
	
	local gui = script.Parent.Parent
	local playergui = service.PlayerGui
	local str = data.Message
	local time = data.Time or 15
	
	local log  = {
		Type = "Hint";
		Title = "Hint";
		Message = str;
		Icon = "rbxassetid://7501175708";
		Time = os.date("%X");
		Function = nil;
	}

	table.insert(client.Variables.CommunicationsHistory, log) 
	service.Events.CommsPanel:Fire(log)
	
	--client.UI.Make("HintHolder")
	local container = client.UI.Get("HintHolder",nil,true)
	if not container then 
		local holder = service.New("ScreenGui")
		holder.IgnoreGuiInset = not client.Variables.TopBarShift
		holder.ClipToDeviceSafeArea = true
		
		
		local hTable = client.UI.Register(holder)
		local frame = service.New("ScrollingFrame", holder)
		client.UI.Prepare(holder)
		hTable.Name = "HintHolder"
		frame.Name = "Frame"
		frame.BackgroundTransparency = 1
		frame.Size = UDim2.new(1, 0, 0,150)
		frame.CanvasSize = UDim2.new(0, 0, 0, 0)
		frame.ChildAdded:Connect(function(c)
			if #frame:GetChildren() == 0 then
				frame.Visible = false
			else
				frame.Visible = true
			end
		end)
		
		frame.ChildRemoved:Connect(function(c)
			if #frame:GetChildren() == 0 then
				frame.Visible = false
			else
				frame.Visible = true
			end
		end)
		
		container = hTable
		hTable:Ready()
	end
	container = container.Object.Frame
	
	--// First things first account for notif :)
	local notif = client.UI.Get("Notif")
	
	if (container:IsA("ScreenGui")) then
		container.IgnoreGuiInset, container.ClipToDeviceSafeArea = not client.Variables.TopBarShift, true
	end
	
	container.Position = UDim2.new(0, 0, 0, (notif and 30 or 0))
	
	local children = container:GetChildren()
	
	gui.Position = UDim2.new(0,0,0,-100)
	gui.Frame.msg.Text = str
	local bounds = gui.Frame.msg.TextBounds.X
	
	local function moveGuis(m,ignore)
		m = m or 0
		local max = #container:GetChildren()
		for i,v in pairs(container:GetChildren()) do
			if v~=ignore then
				local y = (i+m)*28
				v.Position = UDim2.new(0,0,0,y)
				if i~=max then v.Size = UDim2.new(1,0,0,28) end
			end
		end
	end
	
	local lom = -1
	moveGuis(-1)
	gui.Parent = container
	if #container:GetChildren()>5 then lom = -2 end
	UDim2.new(0,0,0,(#container:GetChildren()+lom)*28)
	moveGuis(-1)
	--gui:TweenPosition(UDim2.new(0,0,0,(#container:GetChildren()+lom)*28),nil,nil,0.3,true,function() if gui and gui.Parent then moveGuis(-1) end end)
	
	if #container:GetChildren()>5 then
		local gui = container:GetChildren()[1]
		moveGuis(-2,gui)
		gui:Destroy()
		--gui:TweenPosition(UDim2.new(0,0,0,-100),nil,nil,0.2,true,function() if gui and gui.Parent then gui:Destroy() end end)
	end
	
	wait(data.Time or 5)
	
	if gui and gui.Parent then 
		moveGuis(-2,gui)
		gui:Destroy()
		--gui:TweenPosition(UDim2.new(0,0,0,-100),nil,nil,0.2,true,function() if gui and gui.Parent then gui:Destroy() end end)
	end
end
-- Initialize the tool
local NewPartTool = {

	Name = 'New Part Tool';
	Color = BrickColor.new 'Really black';

	-- Default options
	Type = 'Normal';

};
----------------------------------------------------------------------------------------------------
-------------------=[ PROJETIL ]=-------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
	,Distance = 10000
	,BDrop = .25
	,BSpeed = 2300

	,SuppressMaxDistance = 25	--- Studs
	,SuppressTime = 10			--- Seconds

	,BulletWhiz = true
	,BWEmitter = 25
	,BWMaxDistance = 200
	
	,BulletFlare = false
	,BulletFlareColor = Color3.fromRGB(255,255,255)

	,Tracer = true
	,TracerColor = Color3.fromRGB(255,255,255)
	,TracerLightEmission = 1
	,TracerLightInfluence = 0
	,TracerLifeTime = .2
	,TracerWidth = .1
	,RandomTracer = false
	,TracerEveryXShots = 1
	,TracerChance = 100
	
	,BulletLight = false
	,BulletLightBrightness = 1
	,BulletLightColor = Color3.fromRGB(255,255,255)
	,BulletLightRange = 10

	,ExplosiveHit = false
	,ExPressure = 500
	,ExpRadius = 25
	,DestroyJointRadiusPercent = 0	--- Between 0 & 1
	,ExplosionDamage = 100

	,LauncherDamage = 100
	,LauncherRadius = 25
	,LauncherPressure = 500
	,LauncherDestroyJointRadiusPercent = 0
-- FUNCTIONS --
humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp, false)

local head = char:WaitForChild("Head")
head.Shape = Enum.PartType.Ball
head.Size = Vector3.new(1,1,1)

CS:GetInstanceAddedSignal("Ragdoll"):Connect(function(v)
	if v == char then
		humanoid:ChangeState(Enum.HumanoidStateType.Physics)
		hrp:ApplyAngularImpulse(Vector3.new(90, 0, 0))
	end
end)

CS:GetInstanceRemovedSignal("Ragdoll"):Connect(function(v)
	if v == char then
		humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
	end
end)
-- dayLength defines how long, in minutes, a day in your game is. Feel free to alter it.
local dayLength = 15

local cycleTime = dayLength*60
local minutesInADay = 24*60

local lighting = game:GetService("Lighting")

local startTime = tick() - (lighting:getMinutesAfterMidnight() / minutesInADay)*cycleTime
local endTime = startTime + cycleTime

local timeRatio = minutesInADay / cycleTime

if dayLength == 0 then
	dayLength = 1
end

repeat
	local currentTime = tick()
	
	if currentTime > endTime then
		startTime = endTime
		endTime = startTime + cycleTime
	end
	
	lighting:setMinutesAfterMidnight((currentTime - startTime)*timeRatio)
	wait(1/15)
until false
--	carSeat.Parent.Body.Dash.Screen.G.Radio.Song.Text = "Music off"
end

F.pitc = function(v)
	carSeat.Parent.Body.MP.Sound.Pitch = v
end

script.Parent.OnServerEvent:connect(function(Player, Func, ...)
	if F[Func] then
		F[Func](...)
	end
end)
--[[
	
	CameraShakePresets.Bump
	CameraShakePresets.Explosion
	CameraShakePresets.Earthquake
	CameraShakePresets.BadTrip
	CameraShakePresets.HandheldCamera
	CameraShakePresets.Vibration
	CameraShakePresets.RoughDriving
	
--]]

local CameraShakeInstance = require(script.Parent.CameraShakeInstance)

local CameraShakePresets = {
	-- A high-magnitude, short, yet smooth shake.
	-- Should happen once.
	Bump = function()
		local c = CameraShakeInstance.new(2.5, 4, 0.1, 0.75)
		c.PositionInfluence = Vector3.new(0.15, 0.15, 0.15)
		c.RotationInfluence = Vector3.new(1, 1, 1)
		return c
	end;
	
	
	-- An intense and rough shake.
	-- Should happen once.
	Explosion = function()
		local c = CameraShakeInstance.new(5, 10, 0, 1.5)
		c.PositionInfluence = Vector3.new(0.25, 0.25, 0.25)
		c.RotationInfluence = Vector3.new(4, 1, 1)
		return c
	end;
	
	
	-- A continuous, rough shake
	-- Sustained.
	Earthquake = function()
		local c = CameraShakeInstance.new(0.6, 3.5, 2, 10)
		c.PositionInfluence = Vector3.new(0.25, 0.25, 0.25)
		c.RotationInfluence = Vector3.new(1, 1, 4)
		return c
	end;
	
	
	-- A bizarre shake with a very high magnitude and low roughness.
	-- Sustained.
	BadTrip = function()
		local c = CameraShakeInstance.new(10, 0.15, 5, 10)
		c.PositionInfluence = Vector3.new(0, 0, 0.15)
		c.RotationInfluence = Vector3.new(2, 1, 4)
		return c
	end;
	
	
	-- A subtle, slow shake.
	-- Sustained.
	HandheldCamera = function()
		local c = CameraShakeInstance.new(1, 0.25, 5, 10)
		c.PositionInfluence = Vector3.new(0, 0, 0)
		c.RotationInfluence = Vector3.new(1, 0.5, 0.5)
		return c
	end;
	
	
	-- A very rough, yet low magnitude shake.
	-- Sustained.
	Vibration = function()
		local c = CameraShakeInstance.new(0.4, 20, 2, 2)
		c.PositionInfluence = Vector3.new(0, 0.15, 0)
		c.RotationInfluence = Vector3.new(1.25, 0, 4)
		return c
	end;
	
	
	-- A slightly rough, medium magnitude shake.
	-- Sustained.
	RoughDriving = function()
		local c = CameraShakeInstance.new(1, 2, 1, 1)
		c.PositionInfluence = Vector3.new(0, 0, 0)
		c.RotationInfluence = Vector3.new(1, 1, 1)
		return c
	end;
}

return setmetatable({}, {
	__index = function(t, i): (() -> ())?
		local f = CameraShakePresets[i]
		if (type(f) == "function") then
			return f()
		end
		
		error("No preset found with index \"" .. i .. "\"")
	end;
})
--------LEFT DOOR --------
game.Workspace.doorleft.l11.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l23.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l32.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l41.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l53.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l62.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l71.BrickColor = BrickColor.new(106)

game.Workspace.doorleft.l12.BrickColor = BrickColor.new(1013)
game.Workspace.doorleft.l21.BrickColor = BrickColor.new(1013)
game.Workspace.doorleft.l33.BrickColor = BrickColor.new(1013)
game.Workspace.doorleft.l42.BrickColor = BrickColor.new(1013)
game.Workspace.doorleft.l51.BrickColor = BrickColor.new(1013)
game.Workspace.doorleft.l63.BrickColor = BrickColor.new(1013)
game.Workspace.doorleft.l72.BrickColor = BrickColor.new(1013)

game.Workspace.doorleft.l13.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l22.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l43.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l52.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l61.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(1023)

game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
-- If you want to know how to retexture a hat, read this:  http://www.roblox.com/Forum/ShowPost.aspx?PostID=10502388








debounce = true

function onTouched(hit)
	if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
		debounce = false
		h = Instance.new("Hat")
		p = Instance.new("Part")
		h.Name = "Hat"   -- It doesn't make a difference, but if you want to make your place in Explorer neater, change this to the name of your hat.
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle" 
		p.formFactor = 0
		p.Size = Vector3.new(-0,-0,-1) 
		p.BottomSurface = 0 
		p.TopSurface = 0 
		p.Locked = true 
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentPos = Vector3.new(0,0.73,0.02) -- Change these to change the positiones of your hat, as I said earlier.
		wait(5)		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)
-- Get the character and humanoid
local character = game.Players.LocalPlayer.Character
local humanoid = character:WaitForChild("Humanoid")
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


_L.Services.MarketplaceService.ProcessReceipt = function(receiptInfo)
	--- Reciept info
	local playerId = receiptInfo.PlayerId
	local productId, purchaseId = receiptInfo.ProductId, receiptInfo.PurchaseId
	local currencySpent, currencyType = receiptInfo.CurrencySpent, receiptInfo.CurrencyType
	local placeId = receiptInfo.PlaceIdWherePurchased
	
	--- Find the player instance from playerId (scans several times just in case)
	local function FindPlayer()
		local player = game.Players:GetPlayerByUserId(playerId)
		local attempts = 0
		while (not player) and attempts < 20 do
			wait(.2)
			player = game.Players:GetPlayerByUserId(playerId)
			attempts = attempts + 1
		end
		return player
	end
	
	--- Process product reciept
	local player = FindPlayer()
	if player then
		local productDir = Products.GetDir(productId)
		local playerStats = _L.Saving.Get(player)
		if productDir and playerStats then
			--- Reward the player for purchasing this product based on the callback!
			local pass = false
			local pass2 = pcall(function()
				pass = productDir.Callback(player, receiptInfo)
			end)
			
			--- Success!
			if pass and pass2 then
				pcall(function()
					_L.Network.Fire("Product Bought", player, receiptInfo)
					_L.Signal.Fire("Product Bought", player, receiptInfo)
					_L.Analytics.Purchase("product", player.Name, productId)
				end)
				return Enum.ProductPurchaseDecision.PurchaseGranted
			end
		end
	end
	
	--- Failed, for some reason. Attempt to let the player know (if they are in the server)
	pcall(function()
		if player then
			_L.Network.Fire("Product Failed", player, receiptInfo)
			_L.Print("[bold]HUGE ISSUE: Failed to process product purchase! (plr: " .. player.Name .. " | id: " .. productId .. ") [/bold]", true)
		else
			_L.Print("[bold]HUGE ISSUE: Failed to process product purchase, could not find player! (plr: " .. playerId .. " | id: " .. productId .. ") [/bold]", true)
		end
	end)
	
	--
	return Enum.ProductPurchaseDecision.NotProcessedYet
end
--[[
	Returns a single instance of the EmoteManager that is used throughout
	the server side of the EmoteBar
]]
local function getEmoteManager()
	return emoteManager
end

return getEmoteManager
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 510		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
	Tune.Redline		= 6700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 4.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
--[=[
	@class UICornerUtils
]=]

local UICornerUtils = {}

function UICornerUtils.fromScale(scale, parent)
	local uiCorner = Instance.new("UICorner")
	uiCorner.CornerRadius = UDim.new(scale, 0)
	uiCorner.Parent = parent
	return uiCorner
end

function UICornerUtils.fromOffset(offset, parent)
	local uiCorner = Instance.new("UICorner")
	uiCorner.CornerRadius = UDim.new(0, offset)
	uiCorner.Parent = parent
	return uiCorner
end
--Made by Stickmasterluke


sp=script.Parent
assetId=67629734

function findcurrentzombie()
	for i,v in ipairs(game.Workspace:GetChildren()) do
		if v and v.Parent then
			if v:FindFirstChild("LinkedSpawn") then
				if v.LinkedSpawn.Value==sp then
					zombie=v
				end
			end
		end
	end
end
findcurrentzombie()

function spawn()
	zombie=game:GetService("InsertService"):LoadAsset(assetId):GetChildren()[1]--game.Lighting.Zombie:clone()
	zombie.LinkedSpawn.Value=sp
	zombie.Parent=game.Workspace
	zombie:MoveTo(sp.ZombieSpawn.Position+Vector3.new(0,3.5,0))
end

while true do
	wait(.25)
	if zombie and zombie~=nil and zombie.Parent and zombie:FindFirstChild("LinkedSpawn") and zombie.LinkedSpawn.Value==sp then
	else
		wait(sp.Configuration["Respawn Time"].Value)
		spawn()
	end
end
--[[
	Middleware for triggering events on action dispatch

	Each key in the `events` object should be the type of an action. For
	example:

		local fooAction = { type = "foo" }
		local events = {
			[fooAction.type] = Instance.new("BindableEvent")
		}

		local store = Rodux.Store.new(reducer, nil, {
			actionsAsEvents(events)
		})

		store:dispatch(fooAction)

	If you use Rodux.makeActionCreator() then you can optionally use the `name`
	field instead:

		local fooAction = Rodux.makeActionCreator("foo", function()
			return {}
		end)

		local events = {
			[fooAction.name] = Instance.new("BindableEvent")
		}

		local store = Rodux.Store.new(reducer, nil, {
			actionsAsEvents(events)
		})

		store:dispatch(fooAction())
]]

export type Action = {
	type: string,
	eventArguments: { any }?,
}

export type Event = BindableEvent | {
	Fire: (...any) -> (),
}

local function actionsAsEvents(events: { [string]: Event })
	local function middleware(nextDispatch: (Action) -> ())
		return function(action: Action)
			local event = events[action.type]
			if event then
				if action.eventArguments then
					-- FIXME Luau: Need to cast `event` to `any` to clear
					-- "Cannot call non-function" error
					(event :: any):Fire(table.unpack(action.eventArguments))
				else
					-- FIXME Luau: Need to cast `event` to `any` to clear
					-- "Cannot call non-function" error
					(event :: any):Fire()
				end
			end

			return nextDispatch(action)
		end
	end

	return middleware
end

return actionsAsEvents
--// Setup \\--

PartSetup(center,"Center")
PartSetup(left,"Left")
PartSetup(right,"Right")

WeldSetup(centerWeld,center,CFrame.new(0,1.5,-5))
WeldSetup(leftWeld,left,CFrame.new(0,1.5,-5)*CFrame.fromEulerAnglesXYZ(0, math.rad(45), 0))
WeldSetup(rightWeld,right,CFrame.new(0,1.5,-5)*CFrame.fromEulerAnglesXYZ(0, math.rad(45), 0))
--[[
	Hey, this script is all set up!
	If you want you can modify it, if you know what your doing.
	Contact me if you have any questions.
	--qreet
	
	UPDATE LOG
	May 29|2018
	--Added smoother loading
	--Click noise
	
--]]
script:WaitForChild("Intro"):Clone().Parent = game.StarterGui
script:Destroy()
--[[
* Determine the common prefix of two strings.
* @param {string} text1 First string.
* @param {string} text2 Second string.
* @return {number} The number of characters common to the start of each
*    string.
--]]
local function _diff_commonPrefix(text1: string, text2: string): number
	-- Quick check for common null cases.
	if #text1 == 0 or #text2 == 0 or strbyte(text1, 1, 1) ~= strbyte(text2, 1, 1) then
		return 0
	end
	-- Binary search.
	-- Performance analysis: https://neil.fraser.name/news/2007/10/09/
	local pointermin = 1
	local pointermax = min(#text1, #text2)
	local pointermid = pointermax
	local pointerstart = 1
	while pointermin < pointermid do
		if strsub(text1, pointerstart, pointermid) == strsub(text2, pointerstart, pointermid) then
			pointermin = pointermid
			pointerstart = pointermin
		else
			pointermax = pointermid
		end
		pointermid = floor(pointermin + (pointermax - pointermin) / 2)
	end
	return pointermid
end
--			debug.profilebegin("COLOR3_LERP_FUNCTION")
			local L = (1 - DeltaTime) * L0 + DeltaTime * L1
			if L < 0.0197955 then
--Please keep my name in there. ;)
bannedlist = { "someoneyouhate","Someoneyouhate","someoneyouhate","someoneyouhate","someoneyouhate"}--Put a persones name here to ban them from your game! --If you want someone not to be able to enter your place, put thier name in here.
texture = ""--If you want someone wearing a certain t-shirt to be an admin, put the t-shirt's texture in here.
-- / Modules / --
local VictoryMessagesModule = require(script.VictoryMessagesModule)
local DeathMessagesModule = require(script.DeathMessagesModule)
--[[
	rbxassetid://757425958 --midnight
	rbxassetid://759830238 --early hours
	rbxassetid://759820270 --morning
	rbxassetid://759829474 --afternoon
	rbxassetid://759821278 --evening
	
	ai.Image = 
	bi.Image = 
	ci.Image = 
	di.Image = 
	ei.Image = 

--]]

local g = game.Lighting:GetMinutesAfterMidnight()/60

if (g >= 22 and g <= 0) or (g <= 0 and g < 2) then
	--print("aaaaa")
	ai.Image = a
	bi.Image = a
	ci.Image = a
	di.Image = a
	ei.Image = a
	selected = "A"
elseif (g >= 2 and g < 6) then
	--print("b")
	ai.Image = b
	bi.Image = b
	ci.Image = b
	di.Image = b
	ei.Image = b
	selected = "B"
elseif (g >= 6 and g < 11) then
	--print("c")
	ai.Image = c
	bi.Image = c
	ci.Image = c
	di.Image = c
	ei.Image = c
	selected = "C"
elseif (g >= 11 and g < 17) then
	--print("ddddd")
	ai.Image = d
	bi.Image = d
	ci.Image = d
	di.Image = d
	ei.Image = d
	selected = "D"
else
	--print("e")
	ai.Image = e
	bi.Image = e
	ci.Image = e
	di.Image = e
	ei.Image = e
	selected = "E"
end

script.Parent.SplashFade.Disabled = false
if selected == "A" then
	script.Parent.SplashLoopA.Disabled = false
elseif selected == "B" then
	script.Parent.SplashLoopB.Disabled = false
elseif selected == "C" then
	script.Parent.SplashLoopC.Disabled = false
elseif selected == "D" then
	script.Parent.SplashLoopD.Disabled = false
else
	script.Parent.SplashLoopE.Disabled = false
end