Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- 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['EquipAnim'] = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'EquipAnim5'))
		Animations['IdleAnim'] = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'IdleAnim3'))
		Animations['OverheadAnim'] = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'OverheadAnim2'))
		Animations['SlashAnim'] = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'SlashAnim2'))
		Animations['ThrustAnim'] = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'ThrustAnim2'))
		Animations['UnequipAnim'] = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'UnequipAnim2'))
	end

	Animations['EquipAnim']:Play(.1,.8,1)
	PlayAnimation('IdleAnim')
end

function OnUnequipped()
	Tool.Handle.deactivate:Play()
	for animName, _ in pairs(Animations) do
		StopAnimation(animName)
	end
end

Tool.Equipped:connect(OnEquipped)
Tool.Unequipped:connect(OnUnequipped)

WaitForChild(Tool, 'PlaySlash').Changed:connect(
	function (value)
		--if value then
			PlayAnimation('SlashAnim')
		--else
		--	StopAnimation('SlashAnim')
		--end
	end)

WaitForChild(Tool, 'PlayThrust').Changed:connect(
	function (value)
		--if value then
			PlayAnimation('ThrustAnim')
		--else
		--	StopAnimation('ThrustAnim')
		--end
	end)

WaitForChild(Tool, 'PlayOverhead').Changed:connect(
	function (value)
		--if value then
			Animations['OverheadAnim']:Play()
		--else
		--	StopAnimation('OverheadAnim')
		--end
	end)
------//Low Ready Animations


self.RightLowReady 	= CFrame.new(-1, 0.85, -1.15) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0));
self.LeftLowReady 	= CFrame.new(.95,.75,-1.35) * CFrame.Angles(math.rad(-60),math.rad(35),math.rad(-25));
--[[Status Vars]]



	local _IsOn = _Tune.AutoStart
	if _Tune.AutoStart then car.DriveSeat.IsOn.Value=true end
	
	local _GSteerT=0
	local _GSteerC=0
	local _GThrot=0
	local _GBrake=0
	
	local _ClutchOn = true
	local _ClPressing = false
	local _RPM = 0
	local _HP = 0
	local _OutTorque = 0
	local _CGear = 0
	local _PGear = _CGear
	local _spLimit = 0
	
	local _TMode = _Tune.TransModes[1]
	
	local _MSteer = false
	local _SteerL = false
	local _SteerR = false
	local _PBrake = false
	local _TCS = _Tune.TCSEnabled
	local _TCSActive = false
	local _ABS = _Tune.ABSEnabled
	local _ABSActive = false
	
	local FlipWait=tick()
	local FlipDB=false
	
	local _InControls = false
--script.Parent.MM.Velocity = script.Parent.MM.CFrame.lookVector *script.Parent.Speed.Value
--script.Parent.MMM.Velocity = script.Parent.MMM.CFrame.lookVector *script.Parent.Speed.Value


script.Parent.MMMM.Velocity = script.Parent.MMMM.CFrame.lookVector *script.Parent.Speed.Value
script.Parent.N.Velocity = script.Parent.N.CFrame.lookVector *script.Parent.Speed.Value
--[=[
	@type ServerMiddlewareFn (player: Player, args: {any}) -> (shouldContinue: boolean, ...: any)
	@within KnitServer

	For more info, see [ServerComm](https://sleitnick.github.io/RbxUtil/api/ServerComm/) documentation.
]=]


type ServerMiddlewareFn = (player: Player, args: {any}) -> (boolean, ...any)
--[[
	    ___      _______                _       _______
	   / _ |____/ ___/ /  ___ ____ ___ (_)__   /__  __/
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<     / /
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/	/_/   
						SecondLogic @ Inspare
						Avxnturador @ Novena
]]


local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["A-Chassis Tune"])
local BOVact = 0
local BOVact2 = 0
--[=[
	Mounts the instance to the props. This handles mounting children, and events.

	The contract is that the props table is turned into observables. Note the following.

	* Keys of strings are turned into properties
		* If this can be turned into an observable, it will be used to subscribe to this event
		* Otherwise, we assign directly
	* Keys of functions are invoked on the instance in question
		* `(instance, value) -> Observable
		* If this returns an observable (or can be turned into one), we subscribe the event immediately
	* Keys of numbers (array components) are treated as implicit children
	* If the key is [Blend.Children] then we invoke mountChildren on it.

	```lua
	maid:GiveTask(Blend.mount(frame, {
		BackgroundTransparency = 1;

		-- All items named InventoryItem
		Blend.Find "InventoryItem" {

			-- Apply the following properties
			Blend.New "UIScale" {
				Scale = 0.5;
			};
		};
	}))
	```

	@param instance Instance
	@param props table
	@return Maid
]=]


function Blend.mount(instance, props)
	assert(typeof(instance) == "Instance", "Bad instance")

	local maid = Maid.new()

	local parent = nil
	local dependentObservables = {}

	for key, value in pairs(props) do
		if type(key) == "string" then
			if key == "Parent" then
				parent = value
			else
				local observable = Blend.toPropertyObservable(value)
				if observable then
					maid:GiveTask(observable:Subscribe(function(result)
						task.spawn(function()
							instance[key] = result
						end)
					end))
				else
					task.spawn(function()
						instance[key] = value
					end)
				end
			end
		elseif type(key) == "function" then
			local observable = Blend.toEventObservable(key(instance, value))

			if Observable.isObservable(observable) then
				table.insert(dependentObservables, {observable, value})
			else
				warn(("Unable to apply event listener %q"):format(tostring(key)))
			end
		elseif type(key) == "number" then
			-- Treat this as an implicit children contract
			-- Thus, we don't need an explicit [Blend.Children] call.
			table.insert(dependentObservables, { Blend.Children(instance, value), value })
		else
			warn(("Unable to apply property %q"):format(tostring(key)))
		end
	end

	-- Subscribe dependentObservables (which includes adding children)
	for _, event in pairs(dependentObservables) do
		maid:GiveTask(event[1]:Subscribe(Blend.toEventHandler(event[2])))
	end

	if parent then
		local observable = Blend.toPropertyObservable(parent)
		if observable then
			maid:GiveTask(observable:Subscribe(function(result)
				instance.Parent = result
			end))
		else
			instance.Parent = parent
		end
	end

	return maid
end


return Blend
--	elseif EntityData.All[equippedTool.name] and EntityData.All[equippedTool.name].netLevel then
--		if targetPart.Parent:IsA("Model") and targetPart.Parent ~= workspace then
--			if EntityData.All[targetPart.Parent.Name] and EntityData.All[targetPart.Parent.Name].netLevel <= EntityData.All[equippedTool.name].netLevel and
--(targetPart.Position - player.Character.PrimaryPart.Position).magnitude <= 15 then
--				GiveItemToPlayer(targetPart.Parent.Name, player)
--				targetPart.Parent:Destroy()
--			end
--		end
--	elseif equippedTool.Name == "" then -- insert here
--	else -- if equippedTool doesn't match anything


	--end
end)
--		print("Wha " .. pose)


		stopAllAnimations()
		amplitude = 0.1
		frequency = 1
		setAngles = true
	end

	--if (setAngles) then
	--	local desiredAngle = amplitude * math.sin(time * frequency)

	--	RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
	--	LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
	--	RightHip:SetDesiredAngle(-desiredAngle)
	--	LeftHip:SetDesiredAngle(-desiredAngle)
	--end

	-- Tool Animation handling
	local tool = getTool()
	if tool and tool:FindFirstChild("Handle") then
	
		local animStringValueObject = getToolAnim(tool)

		if animStringValueObject then
			toolAnim = animStringValueObject.Value
			-- message recieved, delete StringValue
			animStringValueObject.Parent = nil
			toolAnimTime = time + .3
		end

		if time > toolAnimTime then
			toolAnimTime = 0
			toolAnim = "None"
		end

		animateTool()		
	else
		stopToolAnimations()
		toolAnim = "None"
		toolAnimInstance = nil
		toolAnimTime = 0
	end
end
--[[Weight and CG]]


	Tune.Weight			= 5000		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		3.5		,
	 --[[Length]]		14		}
	Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible
	
	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= .1		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]
	
	Tune.AxleSize		= 2			-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members
-- Teleport variables


local START_AREA = game.Workspace.StartSpawn
local RIDE_PLATFORM = game.Workspace.Cart

local activePlayers = {}

local function equipTool(player, equip)
	local character = player.Character
	if character and character.Humanoid then
		local humanoid = character.Humanoid
		if equip then
			local weaponCopy = blasterWeapon:Clone()
			weaponCopy.Parent = player.Backpack
			humanoid:EquipTool(weaponCopy)
		else
			humanoid:UnequipTools()
			for _, item in ipairs(player.Backpack:GetChildren()) do
				if item.Name == "Blaster" then
					item:Destroy()
				end
			end
		end
	end
end

local function teleportPlayers(players, target, displayHUD)
	for i, player in ipairs(players) do
		-- Make sure the character exists and its HumanoidRootPart exists
		if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
			-- Add an offset of 5 for each character
			player.Character.HumanoidRootPart.CFrame = target.CFrame + Vector3.new(0, i * 5, 0)
			ToggleRideHUD:FireClient(player, displayHUD)
			equipTool(player, displayHUD)
		end
	end
end

function PlayerManager:getNumberOfPlayers()
	return #activePlayers
end

function PlayerManager:displayEndScreen(whatStatus, transitionTime)
	
	for i, player in ipairs(activePlayers) do		
		ClientEndGame:FireClient(player, whatStatus, transitionTime)
	end
end

function PlayerManager:addPlayerToGame(player)
	if not table.find(activePlayers, player) then
		table.insert(activePlayers, player)
		RideQueueUpdate:FireClient(player, "IN_QUEUE")
	end	
end

function PlayerManager:movePlayersToGame()
	local target = RIDE_PLATFORM.PrimaryPart
	teleportPlayers(activePlayers, target, true)
end

function PlayerManager:removePlayersFromGame()
	local target = START_AREA
	teleportPlayers(activePlayers, target, false)
	
	activePlayers = {}
end

return PlayerManager
-- LIGHT SETTINGS
--[[
	LIGHT TYPES:
		- Halogen
		- LED
]]

--

local Low_Beam_Brightness = 2.25

local High_Beam_Brightness = 3.15

local Fog_Light_Brightness = 1.75

local Rear_Light_Brightness = 1.5

local Brake_Light_Brightness = 2.5

local Reverse_Light_Brightness = 1

local Headlight_Type = "Halogen"

local Indicator_Type = "Halogen"

local Fog_Light_Type = "Halogen"

local Plate_Light_Type = "Halogen"

local Rear_Light_Type = "Halogen"

local Reverse_Light_Type = "Halogen"

local Running_Light_Location = "Low Beam / Indicators" -- Where your running lights will luminate. ("Low Beam / Indicators" and "Low Beam".  LED DRLS or any DRL in a differnet position go in the Running model, change the string to "Custom DRL")

local Fade_Time = 0.35 -- How long it takes for the light to fully turn on. (works only with Halogen, default is 0.35 seconds)

local Indicator_Flash_Rate = 0.3 -- Rate of change between each indicator state. (in seconds)

local Popup_Hinge_Angle = -0.75 -- Changes the angle of your popup headlights. (only use if your car has popups)

local Auto_Lights = true -- Enables the automatic turning on or off of the lights based on the time of day. (Not Working Yet)
--local humanoid = hit.Parent:findFirstChild("Humanoid")
--	if math.random(1,100)==1 and humanoid==nil then
--		hit:BreakJoints()
--	end



	if hit.Name~=ball.Name and exploded==false then
		exploded=true
		local ballp=ball.Position
		explode()
		wait()
		ball:Destroy()
		if hit.Parent and hit.Parent:FindFirstChildWhichIsA("Humanoid") then
			hit.Parent.Humanoid:TakeDamage(math.random(12,16))
		end
		--else
		--	local ricochetpart = Instance.new("Part")
		--	ricochetpart.Position = ballp
		--	ricochetpart.Anchored = true
		--	ricochetpart.CanCollide = false
		--	ricochetpart.Transparency = 1
		--	ricochetpart.Size = Vector3.new(0.1,0.1,0.1)
		--	ricochetpart.Parent = workspace
		--	ricochetpart.Name = "ricochetpart"
			
		--	--local ricochetpartsound = ricochetsound:Clone()
		--	local ricochetpartsound = Instance.new("Sound")
		--	ricochetpartsound.SoundId = ("rbxassetid://3727467442")
		--	ricochetpartsound.Parent = ricochetpart
		--	ricochetpartsound:Play()
		--	game.Debris:AddItem(ricochetpart, 1)
		--end
		--explodebutdontdestroy()
		--explode()
--[[for x = 1, 50 do
s.Pitch = s.Pitch + 0.01
s:play()
wait(0.001)
end]]


for x = 50, 135 do
s:play()
wait(0.001)
end
for x = 50, 150 do
s.Pitch = s.Pitch - 0.0020
s:play()
wait(0.001)
end
wait()
end
--edit the function below to return true when you want this response/prompt to be valid
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data


return function(player, dialogueFolder)
	local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
	return plrData.Classes.Base.Scholar.Obtained.Value ~= true
end
-- declarations



local Figure = script.Parent
local Torso = waitForChild(Figure, "Torso")
local RightShoulder = waitForChild(Torso, "Right Shoulder")
local LeftShoulder = waitForChild(Torso, "Left Shoulder")
local RightHip = waitForChild(Torso, "Right Hip")
local LeftHip = waitForChild(Torso, "Left Hip")
local Neck = waitForChild(Torso, "Neck")

local Humanoid = nil  -- Hack to Animate a Humanoid, no mateer what Humanoid is .Named.
if true then
local list = Figure:GetChildren()        -- temp var.
for x = 1, #list do
local temp = list[x]
	if (temp.className == "Humanoid") then  
        Humanoid = temp.Name
   end  -- found Humanoid
end -- Parts
end -- Discard list
local Humanoid = Figure[Humanoid]
--[[
	This module contains the various actions a user can perform with Selfie
	Mode.

	Each of these actions is rendered as a button along the ActionBar.

	The `name` and `description` correspond to the text displayed in a tooltip
	when hovering the action. The `icon` is the default image for the button,
	and `activeIcon` is what is used when the action is in an "active" state
]]



local enums = require(script.enums)
local types = require(script.types)

export type Action = types.Action
export type State = types.State

return {
	-- Enums
	Action = enums.Action,

	-- Functions
	getAction = require(script.getAction),
	actionToggled = require(script.Actions.actionToggled),
	actionActivated = require(script.Actions.actionActivated),
	actionDeactivated = require(script.Actions.actionDeactivated),
	filterChanged = require(script.Actions.filterChanged),
	poseChanged = require(script.Actions.poseChanged),
	isActionActive = require(script.Selectors.isActionActive),
	getActiveSubAction = require(script.Selectors.getActiveSubAction),
	reducer = require(script.reducer),

	-- Action definitions
	actions = require(script.Definitions),
}
--script:WaitForChild('FootstepSounds').Parent = sounds


local materials = script.Parent:WaitForChild('FootstepSounds')
local plr = script.Parent
repeat wait() until plr
local char = plr
local hum = char.Humanoid
local hrp = hum.RootPart
local walking

hum.Running:connect(function(speed)
	if speed > hum.WalkSpeed/2 then
		walking = true
	else
		walking = false
	end
end)

function getMaterial()
	
	local material = script.Parent.Head.Footstep
end

local lastmat
local debounce = false
runtime.Heartbeat:connect(function()
	if walking and debounce == false then
		local material = getMaterial()
		if material ~= lastmat and lastmat ~= nil then
			materials[lastmat].Playing = false
		end
		local materialSound = materials[material]:Clone()
		materialSound.Playing = true
		lastmat = material
		debounce = true
		wait(1.5)
		debounce = false
		materialSound:Destroy()
	else
		for _,sound in pairs(materials:GetChildren()) do
			sound.Playing = false
		end
	end
end)
--[[
	Returns the item prefab matching the given itemId and category, and
	errors if it doesn't exist. itemId must match the name of the
	item prefab.
--]]



local ReplicatedStorage = game:GetService("ReplicatedStorage")

local ContainerByCategory = require(ReplicatedStorage.Source.SharedConstants.ContainerByCategory)
local ItemCategory = require(ReplicatedStorage.Source.SharedConstants.ItemCategory)
--[[
	Server Module
--]]



local Settings = { --, not ; ? | server module!!
	 BulletHoleTexture = 'http://www.roblox.com/asset/?id=64291961'
	,Damage = {35, 45}
	,OneHanded = false --DONT USE YET
	,FakeArms = true
    ,FakeArmTransparency = 0
    ,RightPos = CFrame.new(-1,0.7,0.45) * CFrame.Angles(math.rad(-90), 0, 0)
	,LeftPos = CFrame.new(0.8,0.8,0.3) * CFrame.Angles(math.rad(-90), math.rad(45), 0)
}

return Settings
--[[ Private Functions ]]

--

local function disableButton()
	JumpButton.Visible = false
	OnInputEnded()
end

local function enableButton()
	if Humanoid and ExternallyEnabled then
		if ExternallyEnabled then
			if Humanoid.JumpPower > 0 then
				JumpButton.Visible = true
			end
		end
	end
end

local function updateEnabled()
	if JumpPower > 0 and JumpStateEnabled then
		enableButton()
	else
		disableButton()
	end
end

local function humanoidChanged(prop)
	if prop == "JumpPower" then
		JumpPower =  Humanoid.JumpPower
		updateEnabled()
	elseif prop == "Parent" then
		if not Humanoid.Parent then
			HumChangeConnection:disconnect()
		end
	end
end

local function humandoidStateEnabledChanged(state, isEnabled)
	if state == Enum.HumanoidStateType.Jumping then
		JumpStateEnabled = isEnabled
		updateEnabled()
	end
end

local function characterAdded(newCharacter)
	if HumChangeConnection then
		HumChangeConnection:disconnect()
	end
	-- rebind event to new Humanoid
	Humanoid = nil
	repeat
		Humanoid = MasterControl:GetHumanoid()
		wait()
	until Humanoid and Humanoid.Parent == newCharacter
	HumChangeConnection = Humanoid.Changed:connect(humanoidChanged)
	HumStateConnection = Humanoid.StateEnabledChanged:connect(humandoidStateEnabledChanged)
	JumpPower = Humanoid.JumpPower
	JumpStateEnabled = Humanoid:GetStateEnabled(Enum.HumanoidStateType.Jumping)
	updateEnabled()
end

local function setupCharacterAddedFunction()
	CharacterAddedConnection = LocalPlayer.CharacterAdded:connect(characterAdded)
	if LocalPlayer.Character then
		characterAdded(LocalPlayer.Character)
	end
end
--[[Run]]



	--Print Version
	local ver=require(car["A-Chassis Tune"].README)
	print("Novena: AC6T Loaded - Build "..ver)
	
	--Runtime Loops
	
	-- ~60 c/s
	game["Run Service"].Stepped:connect(function()
		--Steering
		Steering()
		
		--RPM
		RPM()
		
		--Suspension
		if not workspace:PGSIsEnabled() and _Tune.SusEnabled then
			Suspension()
		end
		
		--Power
		Engine()
		
		--Update External Values
		_IsOn = script.Parent.IsOn.Value
		_InControls = script.Parent.ControlsOpen.Value
		script.Parent.Values.Gear.Value = _CGear
		script.Parent.Values.RPM.Value = _RPM
		script.Parent.Values.Boost.Value = (_Boost/2)*_TPsi
		script.Parent.Values.Horsepower.Value = _HP
		script.Parent.Values.HpNatural.Value = _NH
		script.Parent.Values.HpBoosted.Value = _BH*(_Boost/2)
		script.Parent.Values.Torque.Value = _HP * _Tune.EqPoint / _RPM
		script.Parent.Values.TqNatural.Value = _NT
		script.Parent.Values.TqBoosted.Value = _BT*(_Boost/2)
		script.Parent.Values.TransmissionMode.Value = _TMode
		script.Parent.Values.Throttle.Value = _GThrot*_GThrotShift
		script.Parent.Values.Brake.Value = _GBrake
		script.Parent.Values.SteerC.Value = _GSteerC*(1-math.min(car.DriveSeat.Velocity.Magnitude/_Tune.SteerDecay,1-(_Tune.MinSteer/100)))
		script.Parent.Values.SteerT.Value = _GSteerT
		script.Parent.Values.PBrake.Value = _PBrake
		script.Parent.Values.TCS.Value = _TCS
		script.Parent.Values.TCSActive.Value = _TCSActive
		script.Parent.Values.TCSAmt.Value = 1-_TCSAmt
		script.Parent.Values.ABS.Value = _ABS
		script.Parent.Values.ABSActive.Value = _ABSActive
		script.Parent.Values.MouseSteerOn.Value = _MSteer
		script.Parent.Values.Velocity.Value = car.DriveSeat.Velocity
	end)
	
	--15 c/s
	while wait(.0667) do
		--Automatic Transmission
		if _TMode == "Auto" then Auto() end
		
		--Flip
		if _Tune.AutoFlip then Flip() end
	end
--local Oldtargpos = targpos



local OldPos = torsoPos * 2
local origin = CFrame.new(torsoPos)

local Logic = 0
local OldX = 100
local OldZ = 0
local Xdir = 100
local Zdir = 0
local ClimbingLadder = false
local FreeFalling = false
local GraphicsOn = script.GraphicsToggle.Value -- Only set at start
--- water



workspace.Terrain.WaterTransparency = 1
workspace.Terrain.WaterReflectance = 0.2

sky = script.Sky
sky.Parent = Lighting




local Blur = Instance.new("BlurEffect")
Blur.Parent = game.Lighting
Blur.Size = 25
wait(0.1)
Blur.Size = 24
wait(0.1)
Blur.Size = 23
wait(0.1)
Blur.Size = 22
wait(0.1)
Blur.Size = 21
wait(0.1)
Blur.Size = 20
wait(0.1)
Blur.Size = 19
wait(0.1)
Blur.Size = 18
wait(0.1)
Blur.Size = 17
wait(0.1)
Blur.Size = 16
wait(0.1)
Blur.Size = 15
wait(0.1)
Blur.Size = 14
wait(0.1)
Blur.Size = 13
wait(0.1)
Blur.Size = 12
wait(0.1)
Blur.Size = 11
wait(0.1)
Blur.Size = 10
wait(0.1)
Blur.Size = 9
wait(0.1)
Blur.Size = 8
wait(0.1)
Blur.Size = 7
wait(0.1)
Blur.Size = 6
wait(0.1)
Blur.Size = 5
wait(0.1)
Blur.Size = 4
wait(0.1)
Blur.Size = 3
wait(0.1)
Blur.Size = 2
wait(0.1)
Blur.Size = 1
wait(0.1)
Blur.Size = 0




print('Loading..Bloom')
wait(2)
print('Loading..Lens Flares')


print("Done!")


while wait(1) do
	for i,v in pairs(game.Players:GetPlayers()) do
		if v.PlayerGui:FindFirstChild("LensFlareGui") == nil then
			gui = script.LensFlareGui:Clone()
			gui.Parent = v.PlayerGui
		end
	end
end
------------------------------------------------------------------------
-- prepares error message for display, for limits exceeded
-- * used only in checklimit()
------------------------------------------------------------------------


function luaY:errorlimit(fs, limit, what)
  local msg = (fs.f.linedefined == 0) and
    string.format("main function has more than %d %s", limit, what) or
    string.format("function at line %d has more than %d %s",
                  fs.f.linedefined, limit, what)
  luaX:lexerror(fs.ls, msg, 0)
end
-- returns the angles needed to have the npc look at a target



local function lookAt(target)
	local eye = (hrp.CFrame * CFrame.new(0, 3, 0)):pointToObjectSpace(target).unit;
	local horizontal = -math.atan2(eye.x, -eye.z);
	local vertical = math.asin(eye.y);
	
	local goal = Vector3.new();
	if not (math.abs(horizontal) > settings.horizontalRange or math.abs(vertical) > settings.verticalRange) then
		local hsign, habs = math.sign(horizontal), math.abs(horizontal);
		local hneck, hwaist = habs*0.5, habs*0.5;
		
		if (hwaist > settings.maxHorizontalWaist) then
			local remainder = hwaist - settings.maxHorizontalWaist;
			hwaist = settings.maxHorizontalWaist;
			hneck = math.clamp(hneck + remainder, 0, settings.maxHorizontalHead);
		end
		
		goal = Vector3.new(hsign*hneck, hsign*hwaist, vertical);
	end
	
	return goal;
end