Roblox/luau_corpus huggingface dataset:
-- Styles

local function CreateColor3(r, g, b) return Color3.new(r/255,g/255,b/255) end

local Styles = {
	Font = Enum.Font.Arial;
	Margin = 5;
	Black = CreateColor3(0,0,0);
	White = CreateColor3(255,255,255);
}

local Row = {
	Font = Styles.Font;
	FontSize = Enum.FontSize.Size14;
	TextXAlignment = Enum.TextXAlignment.Left;
	TextColor = Styles.Black;
	TextColorOver = Styles.White;
	TextLockedColor = CreateColor3(120,120,120);
	Height = 24;
	BorderColor = CreateColor3(216,216,216);
	BackgroundColor = Styles.White;
	BackgroundColorAlternate = CreateColor3(246,246,246);
	BackgroundColorMouseover = CreateColor3(211,224,244);
	TitleMarginLeft = 15;
}

local DropDown = {
	Font = Styles.Font;
	FontSize = Enum.FontSize.Size14;
	TextColor = CreateColor3(0,0,0);
	TextColorOver = Styles.White;
	TextXAlignment = Enum.TextXAlignment.Left;
	Height = 16;
	BackColor = Styles.White;
	BackColorOver = CreateColor3(86,125,188);
	BorderColor = CreateColor3(216,216,216);
	BorderSizePixel = 2;
	ArrowColor = CreateColor3(160,160,160);
	ArrowColorOver = Styles.Black;
}

local BrickColors = {
	BoxSize = 13;
	BorderSizePixel = 1;
	BorderColor = CreateColor3(160,160,160);
	FrameColor = CreateColor3(160,160,160);
	Size = 20;
	Padding = 4;
	ColorsPerRow = 8;
	OuterBorder = 1;
	OuterBorderColor = Styles.Black;
}

wait(1)

local Gui = script.Parent.Parent
local PropertiesFrame = Gui:WaitForChild("PropertiesFrame")
local ExplorerFrame = Gui:WaitForChild("ExplorerPanel")

local bindGetSelection = ExplorerFrame.GetSelection
local bindSelectionChanged = ExplorerFrame.SelectionChanged
local bindGetApi = PropertiesFrame.GetApi
local bindGetAwait = PropertiesFrame.GetAwaiting
local bindSetAwait = PropertiesFrame.SetAwaiting

local ContentUrl = ContentProvider.BaseUrl .. "asset/?id="

local SettingsRemote = Gui:WaitForChild("SettingsPanel"):WaitForChild("GetSetting")

local propertiesSearch = PropertiesFrame.Header.TextBox

local AwaitingObjectValue = false
local AwaitingObjectObj
local AwaitingObjectProp

function searchingProperties()
	if propertiesSearch.Text ~= "" and propertiesSearch.Text ~= "Search Properties" then
		return true
	end
	return false
end

local function GetSelection()
	local selection = bindGetSelection:Invoke()
	if #selection == 0 then
		return nil
	else
		return selection
	end 
end
-- Set up an on-screen thumbstick control:
local function ThumbstickSetup(frame, callback)
	local stick = frame:WaitForChild("Stick")
	local btn = frame:WaitForChild("Button")
	
	local btnDown = false
	
	-- Calculate relative position of thumbstick when dragged to screen position "pos":
	local function TouchDragged(pos)
		local x = (pos.X - frame.AbsolutePosition.X)
		local y = (pos.Y - frame.AbsolutePosition.Y)
		x = (x < 0 and 0 or x > frame.AbsoluteSize.X and frame.AbsoluteSize.X or x)
		y = (y < 0 and 0 or y > frame.AbsoluteSize.Y and frame.AbsoluteSize.Y or y)
		local ratioX = ((x / frame.AbsoluteSize.X) - 0.5) * 2
		local ratioY = -((y / frame.AbsoluteSize.Y) - 0.5) * 2
		stick.Position = UDim2.new(0, x, 0, y)
		callback(ratioX, ratioY)
	end
	
	local function StartTouch(pos)
		btnDown = true
		TouchDragged(pos)
		btn.Size = UDim2.new(10, 0, 10, 0)
	end
	
	local function StopTouch(pos)
		btnDown = false
		stick:TweenPosition(UDim2.new(0.5, 0, 0.5, 0), "Out", "Quint", 0.15, true)
		btn.Size = UDim2.new(1, 0, 1, 0)
		callback(0, 0)
	end
	
	btn.InputChanged:Connect(function(input)
		if (btnDown and input.UserInputType == Enum.UserInputType.Touch) then
			TouchDragged(input.Position)
		end
	end)
	
	btn.MouseButton1Down:Connect(function(x, y)
		StartTouch(Vector3.new(x, y, 0))
	end)
	
	btn.InputEnded:Connect(function(input)
		if input.UserInputType == Enum.UserInputType.Touch then
			StopTouch(input.Position)
		end
	end)
end -- ThumbstickSetup()
-- Get references to the DockShelf and the AppManager frame
local gui = script.Parent.Parent.Parent.Parent.AppManager.Settings
local openGui = gui.Main
local TweenService = game:GetService("TweenService")
-- Casts and recasts until it hits either: nothing, or something not transparent or collidable
local function PiercingCast(fromPoint, toPoint, ignoreList) --NOTE: Modifies ignoreList!
	repeat
		local hitPart, hitPoint = CastRay(fromPoint, toPoint, ignoreList)
		if hitPart and (hitPart.Transparency > 0.95 or hitPart.CanCollide == false) then
			table.insert(ignoreList, hitPart)
		else
			return hitPart, hitPoint
		end
	until false
end

local function ScreenToWorld(screenPoint, screenSize, pushDepth)
	local cameraFOV, cameraCFrame = Camera.FieldOfView, Camera.CoordinateFrame
	local imagePlaneDepth = screenSize.y / (2 * math.tan(math.rad(cameraFOV) / 2))
	local direction = Vector3.new(screenPoint.x - (screenSize.x / 2), (screenSize.y / 2) - screenPoint.y, -imagePlaneDepth)
	local worldDirection = (cameraCFrame:vectorToWorldSpace(direction)).Unit
	local theta = math.acos(math.min(1, worldDirection:Dot(cameraCFrame.lookVector)))
	local fixedPushDepth = pushDepth / math.sin((math.pi / 2) - theta)
	return cameraCFrame.p + worldDirection * fixedPushDepth
end

local function OnCameraChanged(property)
	if property == 'CameraSubject' then
		local newSubject = Camera.CameraSubject
		if newSubject and newSubject:IsA('VehicleSeat') then
			VehicleParts = newSubject:GetConnectedParts(true)
		else
			VehicleParts = {}
		end
	end
end

local function OnCharacterAdded(player, character)
	PlayerCharacters[player] = character
end

local function OnPlayersChildAdded(child)
	if child:IsA('Player') then
		child.CharacterAdded:connect(function(character)
			OnCharacterAdded(child, character)
		end)
		if child.Character then
			OnCharacterAdded(child, child.Character)
		end
	end
end

local function OnPlayersChildRemoved(child)
	if child:IsA('Player') then
		PlayerCharacters[child] = nil
	end
end

local function OnWorkspaceChanged(property)
	if property == 'CurrentCamera' then
		local newCamera = workspace.CurrentCamera
		if newCamera then
			Camera = newCamera
			
			if CameraChangeConn then
				CameraChangeConn:disconnect()
			end
			CameraChangeConn = Camera.Changed:connect(OnCameraChanged)
		end
	end
end
--easter egg
mouse.KeyDown:connect(function(key)
	if key=="u" and script.Blown.Value == false then
		Heat = Heat+100
	end
end)

if not FE then
	
radiator.Oil.Enabled = false
radiator.Antifreeze.Enabled = false
radiator.Liquid.Volume = 0
radiator.Fan:Play()
radiator.Fan.Pitch = 1+FanSpeed
radiator.Steam:Play()
radiator.Liquid:Play()
script.Blown.Value = false

while wait(.2) do
	if Heat > FanTemp and Fan == true then
		FanCool = -FanSpeed
		radiator.Fan.Volume = FanVolume
	elseif Heat < FanTempAlpha then
		FanCool = 0
		radiator.Fan.Volume = 0
	end
	
	Load = ((script.Parent.Parent.Values.Throttle.Value*script.Parent.Parent.Values.RPM.Value*10*OverheatSpeed)/math.ceil((car.DriveSeat.Velocity.magnitude+.0000001)/100)/75000)-CoolingEfficiency
	Heat = math.max(RunningTemp,(Heat+Load)+FanCool)
	
	if Heat >= BlowupTemp then
		Heat = BlowupTemp
		radiator.Break:Play()
		radiator.Liquid.Volume = .5
		radiator.Oil.Enabled = true
		radiator.Antifreeze.Enabled = true
		script.Parent.Parent.IsOn.Value = false
		script.Blown.Value = true
		car.Body.ExhaustH.Fire.Fire.Enabled = true
		car.Body.ExhaustH.Fire.FireLight.Enabled = true
		car.Body.ExhaustH.Fire.Smoke.Enabled = true
	elseif Heat >= BlowupTemp-20 then
		radiator.Smoke.Transparency = NumberSequence.new((BlowupTemp-Heat)/10,1)
		radiator.Smoke.Enabled = true
		radiator.Steam.Volume = math.abs(((BlowupTemp-Heat)-10)/10)
	else
		radiator.Smoke.Enabled = false
		radiator.Steam.Volume = 0
		car.Body.ExhaustH.Fire.Fire.Enabled = false
		car.Body.ExhaustH.Fire.FireLight.Enabled = false
		car.Body.ExhaustH.Fire.Smoke.Enabled = false
	end
	
	script.Celsius.Value = Heat
	script.Parent.Temp.Text = math.floor(Heat).."°c"
	script.Parent.Temp.TextColor3 = Color3.fromRGB(255,255-((Heat-FanTemp)*10),255-((Heat-FanTemp)*10))
end

else

	handler:FireServer("Initialize",FanSpeed)
while wait(.2) do
	
	if Heat > FanTemp and Fan == true then
		FanCool = -FanSpeed
		handler:FireServer("FanVolume",FanVolume)
	else
		FanCool = 0
		handler:FireServer("FanVolume",0)
	end
	
	Load = ((script.Parent.Parent.Values.Throttle.Value*script.Parent.Parent.Values.RPM.Value*10*OverheatSpeed)/math.ceil((car.DriveSeat.Velocity.magnitude+.0000001)/100)/75000)-CoolingEfficiency
	Heat = math.max(RunningTemp,(Heat+Load)+FanCool)
	
	if Heat >= BlowupTemp then
		Heat = BlowupTemp
		handler:FireServer("Blown")
		script.Parent.Parent.IsOn.Value = false
		script.Blown.Value = true
	elseif Heat >= BlowupTemp-10 then
		handler:FireServer("Smoke",true,BlowupTemp,Heat)
	else
		handler:FireServer("Smoke",false,BlowupTemp,Heat)
	end
	
	script.Celsius.Value = Heat
	script.Parent.Temp.Text = math.floor(Heat).."°c"
end
end
--- Add a task to clean up
-- @usage
-- Maid[key] = (function)         Adds a task to perform
-- Maid[key] = (event connection) Manages an event connection
-- Maid[key] = (Maid)             Maids can act as an event connection, allowing a Maid to have other maids to clean up.
-- Maid[key] = (Object)           Maids can cleanup objects with a `Destroy` method
-- Maid[key] = nil                Removes a named task. If the task is an event, it is disconnected. If it is an object,
--                                it is destroyed.
function Maid:__newindex(index, newTask)
	if Maid[index] ~= nil then
		error(("'%s' is reserved"):format(tostring(index)), 2)
	end

	local tasks = self._tasks
	local oldTask = tasks[index]
	tasks[index] = newTask

	if oldTask then
		if type(oldTask) == "function" then
			oldTask()
		elseif typeof(oldTask) == "RBXScriptConnection" then
			oldTask:Disconnect()
		elseif oldTask.Destroy then
			oldTask:Destroy()
		end
	end
end
--[[*
 * inlined Object.is polyfill to avoid requiring consumers ship their own
 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
 ]]
local function is(x: any, y: any): boolean
	return x == y and (x ~= 0 or 1 / x == 1 / y) or x ~= x and y ~= y -- eslint-disable-line no-self-compare
end
--[[
	Used to set a handler for when the promise resolves, rejects, or is
	cancelled. Returns a new promise chained from this promise.
]]
function Promise.prototype:finally(finallyHandler)
	self._unhandledRejection = false

	-- Return a promise chained off of this promise
	return Promise.new(function(resolve, reject)
		local finallyCallback = resolve
		if finallyHandler then
			finallyCallback = createAdvancer(finallyHandler, resolve, reject)
		end

		if self._status == Promise.Status.Started then
			-- The promise is not settled, so queue this.
			table.insert(self._queuedFinally, finallyCallback)
		else
			-- The promise already settled or was cancelled, run the callback now.
			finallyCallback(self._status)
		end
	end, self)
end
--[This script makes the movement that a conveyor would do.]
if script.Disabled == false then
	local conveyor = script.Parent
	conveyor.Velocity = conveyor.CFrame:vectorToWorldSpace(Vector3.new(0, 0, -conveyor.Configuration.Speed.Value))
end
-- Mimic roblox menu when opened and closed
guiService.MenuClosed:Connect(function()
	menuOpen = false
	if not IconController.controllerModeEnabled then
		IconController.setTopbarEnabled(IconController.topbarEnabled,false)
	end
end)
guiService.MenuOpened:Connect(function()
	menuOpen = true
	IconController.setTopbarEnabled(false,false)
end)

bindCamera()


return IconController
----------------------This is just an example-----------------------------
end

function onKeyPressG()
	print("G is pressed")
	PageLayout:JumpTo(script.Parent.Grenade)
--if another player picks up the pizza during the tutorial, give it to the persion in the tutorial
local Handle = script.Parent.Handle
script.Parent.Equipped:connect(function()
	local player = game.Players:GetPlayerFromCharacter(script.Parent.Parent)
	if player and Handle:FindFirstChild("Tutorial") and Handle.Tutorial.Value and Handle.Tutorial.Value ~= player then
		wait()
		script.Parent.Parent = Handle.Tutorial.Value.Character
	end
end)
--This script only activates when the ClickDetector's activation distance is over 0

function onClicked(p)
	script.Parent.Parent.Open.Transparency = 0 --Open the trap
	script.Parent.Parent.Close.Transparency = 1
	script.Parent.Captured.Value = false
	script.Parent.ClickDetector.MaxActivationDistance = 0 --Make it so that you can't click it
end
 
script.Parent.ClickDetector.MouseClick:connect(onClicked)
-- уничтожаем огонь и скрипт
script.Parent.Fire:Destroy()
script:Destroy()
--Weld stuff here


car.DriveSeat.ChildAdded:connect(function(child)
	if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
		child.C0=CFrame.new(0,-.4,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0)
	end
end)
-------------------
---[[Variables]]---
-------------------

local module = {}

local TweenService = game:GetService("TweenService")
--Made by Stickmasterluke


local sp=script.Parent

damage=40
cooldown=.30

debris=game:GetService("Debris")
check=true

function waitfor(parent,name)
	while true do
		local child=parent:FindFirstChild(name)
		if child~=nil then
			return child
		end
		wait()
	end
end

local handle=waitfor(sp,"Handle")
local debris=game:GetService("Debris")

function randomcolor()
	if handle then
		local m=handle:FindFirstChild("Mesh")
		if m~=nil then
			m.VertexColor=Vector3.new(math.random(1,2),math.random(1,2),math.random(1,2))*.5
		end
	end
end

function onButton1Down(mouse)
	if check then
		check=false
		mouse.Icon="rbxasset://textures\\GunWaitCursor.png"
		local h=sp.Parent:FindFirstChild("Humanoid")
		local t=sp.Parent:FindFirstChild("Torso")
		local anim=sp:FindFirstChild("RightSlash")
		if anim and t and h then
			theanim=h:LoadAnimation(anim)
			theanim:Play(nil,nil,1.5)
			if theanim and h.Health>0 then
				local sound=sp.Handle:FindFirstChild("SlashSound")
				if sound then
					sound:Play()
				end
				wait(.25)
				handle.Transparency=1
				local p=handle:clone()
				p.Name="Effect"
				p.CanCollide=false
				p.Transparency=1
				p.Script.Disabled=false
				local tag=Instance.new("ObjectValue")
				tag.Name="creator"
				tag.Value=h
				tag.Parent=p
				p.RotVelocity=Vector3.new(0,0,0)
				p.Velocity=(mouse.Hit.p-p.Position).unit*300+Vector3.new(0,60,0)
				p.CFrame=CFrame.new(handle.Position,mouse.Hit.p)*CFrame.Angles(-math.pi/2,0,0)
				debris:AddItem(p,20+math.random()*5)
				p.Parent=game.Workspace
			end
		end
		wait(cooldown-.25)
		mouse.Icon="rbxasset://textures\\GunCursor.png"
		randomcolor()
		handle.Transparency=1
		check=true
	end
end

sp.Equipped:connect(function(mouse)
	if mouse==nil then
		print("Mouse not found")
		return 
	end
	equipped=true
	mouse.Icon="rbxasset://textures\\GunCursor.png"
	mouse.Button1Down:connect(function()
		onButton1Down(mouse)
	end)
end)

sp.Unequipped:connect(function()
	equipped=false
	handle.Transparency=1
	randomcolor()
end)
--This script turns the light on at night and off in in the day!

b = script.Parent

local oh,om = 6,20	-- Open Time (hours,minutes)
local ch,cm = 17,45	-- Close Time (hours, minutes)

local l = game:service("Lighting")
if (om == nil) then om = 0 end
if (cm == nil) then cm = 0 end


function TimeChanged()
	local ot = (oh + (om/60)) * 60
	local ct = (ch + (cm/60)) * 60
	if (ot < ct) then
		if (l:GetMinutesAfterMidnight() >= ot) and (l:GetMinutesAfterMidnight() <= ct) then
b.Enabled = false
		else
b.Enabled = true
		end
	elseif (ot > ct) then
		if (l:GetMinutesAfterMidnight() >= ot) or (l:GetMinutesAfterMidnight() <= ct) then
b.Enabled = false
		else
b.Enabled = true
		end
	end
end

TimeChanged()
game.Lighting.Changed:connect(function(property)
			if (property == "TimeOfDay") then
				TimeChanged()
			end
		end)
--[=[
	Bootstraps the game by replicating packages to server, client, and
	shared.

	```lua
	local ServerScriptService = game:GetService("ServerScriptService")

	local loader = ServerScriptService:FindFirstChild("LoaderUtils", true).Parent
	local packages = require(loader).bootstrapGame(ServerScriptService.ik)
	```

	:::info
	The game must be running to do this bootstrapping operation.
	:::

	@server
	@function bootstrapGame
	@param packageFolder Instance
	@return Folder -- serverFolder
	@within Loader
]=]
local function bootstrapGame(packageFolder)
	assert(typeof(packageFolder) == "Instance", "Bad instance")
	assert(RunService:IsRunning(), "Game must be running")

	loader:Lock()

	local clientFolder, serverFolder, sharedFolder = LoaderUtils.toWallyFormat(packageFolder, false)

	clientFolder.Parent = ReplicatedStorage
	sharedFolder.Parent = ReplicatedStorage
	serverFolder.Parent = ServerScriptService

	return serverFolder
end

local function bootstrapPlugin(packageFolder)
	assert(typeof(packageFolder) == "Instance", "Bad instance")
	loader = LegacyLoader.new(script)
	loader:Lock()

	local pluginFolder = LoaderUtils.toWallyFormat(packageFolder, true)
	pluginFolder.Parent = packageFolder

	return function(value)
		if type(value) == "string" then
			if pluginFolder:FindFirstChild(value) then
				return require(pluginFolder:FindFirstChild(value))
			end

			error(("Unknown module %q"):format(tostring(value)))
		else
			return require(value)
		end
	end
end
--Dont mess with any of this
function boop(Player)
	if not Player.Backpack:FindFirstChild(Toolname) then
		local Tool = game.Lighting[Toolname]:clone()
		Tool.Parent = Player.Backpack
	end
end
script.Parent.ClickDetector.MouseClick:connect(boop)

function onTouch(obj)
	if obj.Parent:findFirstChild("Humanoid")~=nil then
		p=game.Players:findFirstChild(obj.Parent.Name)
		if p~=nil then
			ch=p.Backpack:getChildren()
			for i = 1, #ch do
				if ch[i].Name == Toolname then 
					ch[i]:Remove() 
				end
			end
		end
	end
end
script.Parent.Touched:connect(onTouch)
--[[Susupension]]
	Tune.SusEnabled		= true		-- Sets whether suspension is enabled for PGS
	
	--Front Suspension
	Tune.FSusStiffness	= 8500		-- Spring Force
	Tune.FSusDamping	= 450		-- Spring Dampening
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)
	
	Tune.FSusLength		= 2		-- Resting Suspension length (in studs)
	Tune.FPreCompress	= .2		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .8		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 75		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 2			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward
	
	--Rear Suspension
	Tune.RSusStiffness	= 8500	-- Spring Force
	Tune.RSusDamping	= 450		-- Spring Dampening
	Tune.RAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)
	
	Tune.RSusLength		= 2.1		-- Resting Suspension length (in studs)
	Tune.RPreCompress	= .2		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .8		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
	
	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 2			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics (PGS ONLY)
	Tune.SusVisible		= true			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Black"		-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 8				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
-- K is a tunable parameter that changes the shape of the S-curve
-- the larger K is the more straight/linear the curve gets
local k = 0.35
local lowerK = 0.8
local function SCurveTranform(t)
	t = CameraUtils.Clamp(-1,1,t)
	if t >= 0 then
		return (k*t) / (k - t + 1)
	end
	return -((lowerK*-t) / (lowerK + t + 1))
end

local DEADZONE = 0.1
local function toSCurveSpace(t)
	return (1 + DEADZONE) * (2*math.abs(t) - 1) - DEADZONE
end

local function fromSCurveSpace(t)
	return t/2 + 0.5
end
	
function CameraUtils.GamepadLinearToCurve(thumbstickPosition)
	local function onAxis(axisValue)
		local sign = 1
		if axisValue < 0 then
			sign = -1
		end
		local point = fromSCurveSpace(SCurveTranform(toSCurveSpace(math.abs(axisValue))))
		point = point * sign
		return CameraUtils.Clamp(-1, 1, point)
	end
	return Vector2.new(onAxis(thumbstickPosition.x), onAxis(thumbstickPosition.y))
end
--!strict
--[=[
	@function find
	@within Array

	@param array {T} -- The array to search.
	@param value? any -- The value to search for.
	@param from? number -- The index to start searching from.
	@return number? -- The index of the first item in the array that matches the value.

	Finds the index of the first item in the array that matches the value. This is
	mostly a wrapper around `table.find`, with the ability to specify a negative
	number as the start index (to search relative to the end of the array).

	#### Aliases
	`indexOf`

	```lua
	local array = { "hello", "world", "hello" }

	local index = Find(array, "hello") -- 1
	local index = Find(array, "hello", 2) -- 3
	```
]=]
local function find<T>(array: { T }, value: any?, from: number?): number?
	local length = #array

	from = if type(from) == "number" then if from < 1 then length + from else from else 1

	return table.find(array, value, from)
end

return find
--- Skill

local UIS = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local Mouse = plr:GetMouse()
local Debounce = true
Player = game.Players.LocalPlayer

UIS.InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.E and Debounce == true and Tool.Equip.Value == true and Tool.Active.Value == "None" then
		Debounce = false
		Tool.Active.Value = "LightBeam"
		Track1 = Player.Character.Humanoid:LoadAnimation(script.Anim01)
		Track1:Play()
		wait(0.27)
		script.Fire:FireServer(plr)
	local hum =  Player.Character.Humanoid
	for i = 1,2 do
		wait()
		hum.CameraOffset = Vector3.new(
			math.random(-1,1),
			math.random(-1,1),
			math.random(-1,1)
		)
	end
	hum.CameraOffset = Vector3.new(0,0,0)
		Tool.Active.Value = "None"
		wait(1.5)
		Debounce = true
	end
end)
---


lastHealth=100
damagedone=100
function AnimateHurtOverlay()
--DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!
local hitPart = script.Parent
local debounce = true
local tool = game.ServerStorage.WaterLily-- Change "Sword" to the name of your tool, make sure your tool is in ServerStorage

hitPart.Touched:Connect(function(hit)
	if debounce == true then
		if hit.Parent:FindFirstChild("Humanoid") then
			local plr = game.Players:FindFirstChild(hit.Parent.Name)
			if plr then
				debounce = false
				hitPart.BrickColor = BrickColor.new("Bright red")
				tool:Clone().Parent = plr.Backpack
				wait(3) -- Change "3" to however long you want the player to have to wait before they can get the tool again
				debounce = true
				hitPart.BrickColor = BrickColor.new("Bright green")
			end
		end
	end
end)