Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[
	
	tweenJoint Function Parameters:
	
	Object Joint - This has to be a weld with a C0 and C1 property
	
	CFrame newC0 - This is what the new C0 of the weld will be. You can put nil if you don't want to effect the C0
	
	CFrame newC1 - This is what the new C1 of the weld will be. You can put nil if you don't want to effect the C1
	
	function Alpha - This is an alpha function that takes an input parameter of a number between 0 and 90 and returns a number between 0 and 1.
		For example, function(X) return math.sin(math.rad(X)) end
		
	float Duration - This is how long the tweening takes to complete
	
--]]


local RS = game:GetService("RunService")
--// All global vars will be wiped/replaced except script



return function(data, env)
	if env then
		setfenv(1, env)
	end

	local playergui = service.PlayerGui
	local gui = client.UI.Prepare(script.Parent.Parent)
	local label = gui.LABEL
	local str = data.Message

	client.UI.Remove("Notif",script.Parent.Parent)

	if str and type(str)=="string" then
		label.Text = str
		gTable:Ready()
	else
		gui:Destroy()
	end
end
-- Aglin head with Cursor


CEs.Aglin.OnClientEvent:connect(function(Rchr,Answer,NAngles,Time,Turning,Tilt2)
	if Rchr == plr.Character then return end
	
	local neck = Rchr.Torso.Neck
	local tiltweld = Rchr.Tilt.Mtiltweld 
	local fakeneck = Rchr.FakeHead.FakeNeck
	
	if not Tilt2 then
		if not Turning then	
			TweenService:Create(neck,TweenInfo.new(Time),{C0=OriginalC0*CFrame.Angles(NAngles[1],NAngles[2],NAngles[3])}):Play()
		end
		TweenService:Create(fakeneck,TweenInfo.new(Time),{C0=OriginalC0*CFrame.Angles(0,0,0)}):Play()
		TweenService:Create(tiltweld,TweenInfo.new(Time),{C0=CFrame.new(0,0,0) * CFrame.Angles(Answer,0,0)}):Play()
	else
		if not Turning then
			TweenService:Create(neck,TweenInfo.new(Time),{C0=OriginalC0*CFrame.Angles(0,0,NAngles[3])}):Play()
		end
		TweenService:Create(fakeneck,TweenInfo.new(Time),{C0=OriginalC0*CFrame.Angles(0,0,0)}):Play()
		TweenService:Create(tiltweld,TweenInfo.new(Time),{C0=CFrame.new(0,0,0) * CFrame.Angles(0,0,0)}):Play()
	end	
end)
--Detect when a player is added.


game.Players.PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function()
		repeat wait() until player.Character
		local char = player.Character
	
		--Insert gui into player.
		local gui = guibase:Clone()
		gui.Parent = player.PlayerGui
	
		--Setup name.
		local mod = Instance.new("Model")
		local hum = Instance.new("Humanoid")
		local head = Instance.new("Part")
	
		--Insert humanoid into model.
		hum.Parent = mod
	
		--Set initial name to be blank.
		mod.Name = ""
	
		--Set head properties.
		head.Size = Vector3.new(1,1,1)
		head.CanCollide = false
		head.Transparency = 0.99
		head.Name = "Head"
		head.Parent = mod
			
		--Finish model setup.
		mod.PrimaryPart = head
		mod.Parent = char
		mod:SetPrimaryPartCFrame(char.Head.CFrame+Vector3.new(0,0.5,0))
		
		--Weld part to character.
		local w = Instance.new("Weld")
		w.Name = ("Weld")
		w.Part0,w.Part1 = head,char.Head
		w.C0 = head.CFrame:inverse()
		w.C1 = char.Head.CFrame:inverse()
		w.Parent = head
		
		--Add server side handling to model.
		local svh = gui.ServerHandler
		svh.Parent = mod
		svh.ServerHandler.Disabled = false
		gui.HandlerPointer.Value = svh
		
		--Enable local handler to finish setup.
		gui.LocalHandler.Disabled = false
	end)
end)
--!strict


local ReplicatedStorage = game:GetService("ReplicatedStorage")
local GraspDetection = require(ReplicatedStorage.GraspDetection)

local Thresholds = script.Parent.Thresholds
local TName, TValue = Thresholds.ThresholdName, Thresholds.ThresholdValue

local THRESHOLDS = GraspDetection.GetThresholds()
local ThresholdIndex = 1

TName.Text = THRESHOLDS[ThresholdIndex]
TValue.Text = GraspDetection.GetThresholdValue(THRESHOLDS[ThresholdIndex])

TName.Activated:Connect(function()
  ThresholdIndex += 1
  
  if ThresholdIndex > #THRESHOLDS then
    ThresholdIndex = 1
  end
  
  TName.Text = THRESHOLDS[ThresholdIndex]
  TValue.Text = GraspDetection.GetThresholdValue(THRESHOLDS[ThresholdIndex])
end)

TValue.FocusLost:Connect(function(enterPressed)
  if not enterPressed then
    return
  end
  
  GraspDetection.UpdateThreshold(THRESHOLDS[ThresholdIndex], tonumber(TValue.Text))
  TValue.Text = GraspDetection.GetThresholdValue(THRESHOLDS[ThresholdIndex])
end)
--	--	--	--	--	--	--	--	--	--	--	--	--	--	--	--	--	--	--
--	Place this into StarterGui or StarterPack							--
--	CREDIT																--
--	winter_beast768; for the initial script								--
--	SawyerDGamer; some stuff ripped from his panner script					--
--  iytgggggg; shoving it all into this script and then some :)			--
--	UPDATE: turned it into r15, made it so you can swim right in water	--
--	--	--	--	--	--	--	--	--	--	--	--	--	--	--	--	--	--	--
--[[Steering]]


	Tune.SteerInner		= 75		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 75		-- Outer wheel steering angle (in degrees)
	Tune.SteerSpeed		= .5		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .5		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 320		-- Speed of gradient cutoff (in SPS)
	Tune.MinSteer		= 10		-- Minimum steering at max steer decay (in percent)
	Tune.MSteerExp		= 1			-- Mouse steering exponential degree
	
	--Steer Gyro Tuning
	Tune.SteerD			= 1000		-- Steering Dampening
	Tune.SteerMaxTorque	= 50000		-- Steering Force
	Tune.SteerP			= 7000		-- Steering Aggressiveness
-- Place all application constants here.


return {
	CameraTweenTime = 0.75,
	SurfaceArtSelectorItemSize = 200,
	Errors = {
		CanvasFull = "CanvasFull",
		CanvasNotFound = "CanvasNotFound",
		SpotNotAvailable = "SpotNotAvailable",
		SpotNotFound = "SpotNotFound",
		PlayerSpotsNotFound = "PlayerSpotsNotFound",
	},
	Tags = {
		SurfaceCanvas = "SurfaceCanvas",
	},
	Attributes = {
		SurfaceCanvasId = "SurfaceCanvasId",
		SpotIdPrefix = "SurfaceCanvasSpot_",
		SurfaceCanvasFace = "SurfaceCanvasFace",
	},
}
--[[Drivetrain]]

	
	Tune.Config			= "AWD"		--"FWD" , "RWD" , "AWD"
	
	--Differential Settings	
	Tune.FDiffSlipThres	= 50		-- 1 - 100%				(Max threshold of applying full lock determined by deviation from avg speed)
	Tune.FDiffLockThres	= 50	-- 0 - 100%				(0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
	Tune.RDiffSlipThres	= 50		-- 1 - 100%
	Tune.RDiffLockThres	= 50		-- 0 - 100%
	Tune.CDiffSlipThres	= 50		-- 1 - 100%				[AWD Only]
	Tune.CDiffLockThres	= 50		-- 0 - 100%				[AWD Only]
	
	--Traction Control Settings
	Tune.TCSEnabled		= true		-- Implements TCS
	Tune.TCSThreshold	= 20		-- Slip speed allowed before TCS starts working (in SPS)
	Tune.TCSGradient	= 20		-- Slip speed gradient between 0 to max reduction (in SPS)
	Tune.TCSLimit		= 10		-- Minimum amount of torque at max reduction (in percent)
------------------------------------------------------------------------
-- limits for opcode arguments.
-- we use (signed) int to manipulate most arguments,
-- so they must fit in LUAI_BITSINT-1 bits (-1 for sign)
------------------------------------------------------------------------
-- removed "#if SIZE_Bx < BITS_INT-1" test, assume this script is
-- running on a Lua VM with double or int as LUA_NUMBER



luaP.MAXARG_Bx  = math.ldexp(1, luaP.SIZE_Bx) - 1
luaP.MAXARG_sBx = math.floor(luaP.MAXARG_Bx / 2)  -- 'sBx' is signed

luaP.MAXARG_A = math.ldexp(1, luaP.SIZE_A) - 1
luaP.MAXARG_B = math.ldexp(1, luaP.SIZE_B) - 1
luaP.MAXARG_C = math.ldexp(1, luaP.SIZE_C) - 1
------------------------------------------
--Clear And Enter



function Clear()
print("Cleared")
Input = ""
end

script.Parent.Clear.ClickDetector.MouseClick:connect(Clear)




function Enter()
if Input == Code then
print("Entered")
Input = ""

local door = script.Parent.Parent.Door

door.Anchored = false
door.Transparency = door.Transparency + 0.1
wait(0.1)
door.Transparency = door.Transparency + 0.1
wait(0.1)
door.Transparency = door.Transparency + 0.1
wait(0.1)
door.Transparency = door.Transparency + 0.1
wait(0.1)
door.Transparency = door.Transparency + 0.1
wait(0.1)
door.Transparency = door.Transparency + 0.1
wait(0.1)
door.Transparency = door.Transparency + 0.1
wait(0.1)
door.Transparency = 0.8
wait(3)--
door.Transparency = door.Transparency - 0.1
wait(0.1)
door.Transparency = door.Transparency - 0.1
wait(0.1)
door.Transparency = door.Transparency - 0.1
wait(0.1)
door.Transparency = door.Transparency - 0.1
wait(0.1)
door.Transparency = door.Transparency - 0.1
wait(0.1)
door.Transparency = door.Transparency - 0.1
wait(0.1)
door.Transparency = door.Transparency - 0.1
wait(0.1)
door.Transparency = 0



return end
Input = ""
print("Wrong Code")
end




script.Parent.Enter.ClickDetector.MouseClick:connect(Enter)
--~WeaponHelper~--



local debounce = false --I wouldn't touch this at all. Its the "Debounce"--

function onTouch(part) --The function--

local h = part.Parent:findFirstChild("Humanoid") --Find first person who hits--
if (h ~= nil) and debounce == false then --If the person is still alive, then...

debounce = true --Set debounce to: True
h.WalkSpeed = 0 --You must change this if you want to change the walking speed. Just change the number (16 is normal)--
wait(0.3) --Also, you can change the numebr to how long some-one else can touch it.--
debounce = false --Set debounce to: False
end --End--
end --Double check--


script.Parent.Touched:connect(onTouch) --Double check--
--[[ local Workspace = game:GetService("Workspace")
local GuiService = game:GetService("GuiService")

local Camera = Workspace.CurrentCamera
local TopInset, BottomInset = GuiService:GetGuiInset()

local Roact = require("Roact")

local Scale = Roact.PureComponent:extend("Scale")

function Scale:init()
	self:update()

	self.Listener = Camera:GetPropertyChangedSignal("ViewportSize"):Connect(function()
		self:update()
	end)
end

function Scale:update()
	local currentSize = self.props.Size
	local viewportSize = Camera.ViewportSize - (TopInset + BottomInset)

	self:setState({
		Scale = 1 / math.max(
			currentSize.X / viewportSize.X,
			currentSize.Y / viewportSize.Y
		)
	})
end

function Scale:willUnmount()
	self.Listener:Disconnect()
end

function Scale:render()
	return Roact.createElement("UIScale", {
		Scale = self.state.Scale * self.props.Scale
	})
end

Scale.defaultProps = {
	Scale = 1
}

return Scale

 ]]



local Fusion = require(game.ReplicatedStorage.Packages.Fusion)
local New = Fusion.New
local Children = Fusion.Children
local OnEvent = Fusion.OnEvent
local OnChange = Fusion.OnChange
local State = Fusion.State
local Computed = Fusion.Computed
local Spring = Fusion.Spring


local Workspace = game:GetService("Workspace")
local GuiService = game:GetService("GuiService")

local Camera = Workspace.CurrentCamera
local TopInset, BottomInset = GuiService:GetGuiInset()



local function UIScale(props)
	--props:  Size = v3   Scale = float
	local	ScaleState = State()

	local function update()
		local currentSize = props.Size
		local viewportSize = Camera.ViewportSize - (TopInset + BottomInset)
	
		ScaleState:set(1 / math.max(
			currentSize.X / viewportSize.X,
			currentSize.Y / viewportSize.Y
		))
	end

	update()
	Camera:GetPropertyChangedSignal("ViewportSize"):Connect(update)

	return New "UIScale" {
		Scale = Computed(function()
			return ScaleState:get() * props.Scale
		end)
	}
end


return UIScale
--// # key, Wail


mouse.KeyDown:connect(function(key)
	if key=="r" then 
		if veh.Lightbar.middle.Wail.IsPlaying == true then
			veh.Lightbar.middle.Wail:Stop()
			veh.Lightbar.middle.Yelp:Stop()
			veh.Lightbar.middle.Priority:Stop()
			script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		else
			veh.Lightbar.middle.Wail:Play()
			veh.Lightbar.middle.Yelp:Stop()
			veh.Lightbar.middle.Priority:Stop()
			script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(215, 135, 110)
			script.Parent.Parent.Sirens.Yelp.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
			script.Parent.Parent.Sirens.Priority.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		end
	end
end)
--[[
	Takes an arbitrary number of callback, and executes them in parallel, returning the results of the first to return.
	If an error is thrown, that error is bubbled up to the main thread.
	When the first callback returns, the rest are cancelled using task.cancel.

	Exposes similar functionality that Promise.race provides for promises, but for asynchronous lua callbacks
--]]



type Callback = () -> ...any

local function waitForFirstAsync(...: Callback)
	local thisThread = coroutine.running()
	local resumed = false
	local errorThrown: any

	local function resume(...: any)
		if resumed then
			return
		end
		resumed = true

		task.spawn(thisThread, ...)
	end

	for _, callback in ipairs({ ... }) do
		task.defer(function()
			-- We are capturing all values returned by pcall into a table so we can resume this thread
			-- with all values if multiple are returned
			local pcallReturnValues = { pcall(callback) }
			if not pcallReturnValues[1] then
				errorThrown = pcallReturnValues[2]
			end

			resume(table.unpack(pcallReturnValues, 2))
		end)
	end

	local returnValues = { coroutine.yield() }

	if errorThrown then
		-- Return the stack trace three callers up to where the function passed into waitForFirstAsync was
		-- declared
		error(errorThrown, 3)
	end

	return table.unpack(returnValues)
end

return waitForFirstAsync
--[=[
	Loads a folder into a localization table
	@param folder Folder -- A Roblox folder with StringValues containing JSON, named with the localization in mind
]=]


function JsonToLocalizationTable.loadFolder(folder)
	local localizationTable = JsonToLocalizationTable.getOrCreateLocalizationTable()

	for _, item in pairs(folder:GetDescendants()) do
		if item:IsA("StringValue") then
			local localeId = JsonToLocalizationTable.localeFromName(item.Name)
			JsonToLocalizationTable.addJsonToTable(localizationTable, localeId, item.Value)
		elseif item:IsA("ModuleScript") then
			local localeId = JsonToLocalizationTable.localeFromName(item.Name)
			recurseAdd(localizationTable, localeId, "", require(item))
		end
	end
	return localizationTable
end
---Drivetrain Initialize


local wDia = 0
local Drive={}
if _Tune.Config == "FWD" or _Tune.Config == "AWD" then
	for i,v in pairs(car.Wheels:GetChildren()) do
		if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then
			table.insert(Drive,v)
		end
	end
end
if _Tune.Config == "RWD" or _Tune.Config == "AWD" then
	for i,v in pairs(car.Wheels:GetChildren()) do
		if v.Name=="RL" or v.Name=="RR" or v.Name=="R" then
			table.insert(Drive,v)
		end
	end
end
for i,v in pairs(Drive) do
	if v.Size.x>wDia then wDia = v.Size.x end
end

for i,v in pairs(car.Wheels:GetChildren()) do
	if math.abs(v["#AV"].maxTorque.Magnitude-_Tune.PBrakeForce)<1 then
		_PBrake=true
	end
end
------------------------------------------


gui.Track.Text = radio.TName.Value
radio.TName.Changed:connect(function()
	gui.Track.Text = radio.TName.Value
	seat.Parent.Body.Dash.S.G.Song.Text = radio.TName.Value
	seat.Parent.Body.Dash.S0.G.Song.Text = radio.TName.Value
	seat.Parent.Body.Dash.S1.G.Song.Text = radio.TName.Value
end)
gui.Stop.MouseButton1Click:connect(function()
	if radio.Stopped.Value == false then
		radio.Stopped.Value = true
	end
end)
gui.Pause.MouseButton1Click:connect(function()
	if radio.Paused.Value == false and radio.Stopped.Value == false then
		radio.Paused.Value = true
	end
end)
gui.Play.MouseButton1Click:connect(function()
	if radio.Stopped.Value == true then
		radio.Play.Value = not radio.Play.Value
	else
		if radio.Paused.Value == true then
			radio.Paused.Value = false
		end
	end
end)
gui.Forward.MouseButton1Click:connect(function()
	local n = radio.Track.Value+1
	if n>#radio.Songs:GetChildren() then
		n = 1
	end
	radio.Track.Value = n
end)
gui.Back.MouseButton1Click:connect(function()
	local n = radio.Track.Value-1
	if n<=0 then
		n = #radio.Songs:GetChildren()
	end
	radio.Track.Value = n
end)
gui.AutoplayOn.MouseButton1Click:connect(function()
	if radio.Autoplay.Value == true then
		radio.Autoplay.Value = false
	end
end)
gui.AutoplayOff.MouseButton1Click:connect(function()
	if radio.Autoplay.Value == false then
		radio.Autoplay.Value = true
	end
end)
gui.List.MouseButton1Click:connect(function()
	gui.Menu.Visible=not gui.Menu.Visible
end)
gui.Id.MouseButton1Click:connect(function()
	gui.IdPlayer.Visible=not gui.IdPlayer.Visible
	if gui.IdPlayer.Visible then gui.Id.Rotation=180 else gui.Id.Rotation=0 end
end)
gui.IdPlayer.Play.MouseButton1Click:connect(function()
	if radio.IdPlay.Value==gui.IdPlayer.TextBox.Text then
		radio.IdPlay.Value=""
	wait()
	end
	radio.IdPlay.Value=gui.IdPlayer.TextBox.Text
end)
for i,v in pairs(gui.Menu:GetChildren()) do
	v.MouseButton1Click:connect(function()
		radio.Track.Value = i
	end)
end
function Stopped()
	if radio.Stopped.Value == true then
		gui.Pause.Visible = false
		gui.Play.Visible = true
	else
		gui.Play.Visible = false
		gui.Pause.Visible = true
	end
end
function Paused()
	if radio.Paused.Value == true then
		gui.Pause.Visible = false
		gui.Play.Visible = true
	else
		if radio.Stopped.Value == false then
			gui.Play.Visible = false
			gui.Pause.Visible = true
		end
	end
end
function Autoplay()
	if radio.Autoplay.Value == true then
		gui.AutoplayOff.Visible = false
		gui.AutoplayOn.Visible = true
	else
		gui.AutoplayOn.Visible = false
		gui.AutoplayOff.Visible = true
	end
end
radio.Stopped.Changed:connect(Stopped)
radio.Paused.Changed:connect(Paused)
radio.Autoplay.Changed:connect(Autoplay)
Stopped()
Paused()
Autoplay()
while wait(.5) do
	if seat:FindFirstChild("SeatWeld") == nil then
		script.Parent:Destroy()
	end
end
--Evento del ProximityPrompt


Proximity.Triggered:Connect(function(Players)
	
	
	if open == false then
		open = true
		OpenSound:Play()
		Proximity.ActionText = "Close"
		for i = 1, 20 do 
			Proximity.MaxActivationDistance = 0
			script.Parent.Parent:SetPrimaryPartCFrame(PrimaryPart.CFrame*CFrame.Angles(0, math.rad(5), 0))
			wait()
			Proximity.MaxActivationDistance = 10
		end
	else
		open = false
		CloseSound:Play()
		Proximity.ActionText = "Open"
		for i = 1, 20 do
			Proximity.MaxActivationDistance = 0
			script.Parent.Parent:SetPrimaryPartCFrame(PrimaryPart.CFrame*CFrame.Angles(0, math.rad(-5), 0))
			wait()
			Proximity.MaxActivationDistance = 10
		end
	end
	
end)
--[[	
	Main RenderStep Update. The camera controller and occlusion module both have opportunities
	to set and modify (respectively) the CFrame and Focus before it is set once on CurrentCamera.
	The camera and occlusion modules should only return CFrames, not set the CFrame property of
	CurrentCamera directly.	
--]]


function CameraModule:Update(dt)
	if self.activeCameraController then
		local newCameraCFrame, newCameraFocus = self.activeCameraController:Update(dt)
		self.activeCameraController:ApplyVRTransform()
		if self.activeOcclusionModule then
			newCameraCFrame, newCameraFocus = self.activeOcclusionModule:Update(dt, newCameraCFrame, newCameraFocus)
		end
		
		-- Here is where the new CFrame and Focus are set for this render frame
		game.Workspace.CurrentCamera.CFrame = newCameraCFrame
		game.Workspace.CurrentCamera.Focus = newCameraFocus
		
		-- Update to character local transparency as needed based on camera-to-subject distance
		if self.activeTransparencyController then
			self.activeTransparencyController:Update()
		end
	end
end
--health.Changed:connect(function()
--root.Velocity = Vector3.new(0,5000,0)
--end)



local anims = {}
local lastAttack= tick()

local target,targetType

local lastLock = tick()

local fleshDamage = 30
local structureDamage = 25

local path = nil


for _,animObject in next,animations do
anims[animObject.Name] = hum:LoadAnimation(animObject)
end

function Attack(thing,dmg)
if tick()-lastAttack > 2 then
hum:MoveTo(root.Position)
lastAttack = tick()
anims.AntWalk:Stop()
anims.AntMelee:Play()

if thing.ClassName == "Player" then
root.FleshHit:Play()
ant:SetPrimaryPartCFrame(CFrame.new(root.Position,Vector3.new(target.Character.PrimaryPart.Position.X,root.Position.Y,target.Character.PrimaryPart.Position.Z)))

elseif thing.ClassName == "Model" then
root.StructureHit:Play()
end

rep.Events.NPCAttack:Fire(thing,dmg) 
end
end


function Move(point)
hum:MoveTo(point)
if not anims.AntWalk.IsPlaying then
anims.AntWalk:Play()
end
end

function ScanForPoint()
local newPoint
local rayDir = Vector3.new(math.random(-100,100)/100,0,math.random(-100,100)/100)
local ray = Ray.new(root.Position,rayDir*math.random(10,50),ant)
local part,pos = workspace:FindPartOnRay(ray)
Move(pos)
enRoute = true
end
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]



local mouse = game.Players.LocalPlayer:GetMouse()
local car = script.Parent.Car.Value
local horn = car.DriveSeat:WaitForChild("Horn")
local FE = workspace.FilteringEnabled
local handler = car:WaitForChild("Horn_FE")

mouse.KeyDown:connect(function(key)
	if key=="h" then
		if FE then
			handler:FireServer()
			
		else
			horn:Play()
		end		
	end
end)

game:GetService("UserInputService").InputBegan:connect(function(input,IsRobloxFunction)
	if input.KeyCode ==Enum.KeyCode.ButtonL3 and input.UserInputState == Enum.UserInputState.Begin then
		if FE then
			handler:FireServer()
		else
			horn:Play()
		end
	end
end)
--functions--


function coverdown()
	covergui.TextLabel:TweenPosition(UDim2.new(0, 0, 1.36, 0), "Out", "Sine", 1, true)
end

function coverup()
	covergui.TextLabel:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Sine", 1, true)
end

function menuappear()
	for _,v in pairs(maingui:GetChildren()) do
		if v:IsA("TextButton") then
			v.Visible = true
		end
	end
end

function menudisappear()
	for _,v in pairs(maingui:GetChildren()) do
		if v:IsA("TextButton") then
			v.Visible = false
		end
	end
end

function disappearall()
	for _,v in pairs(maingui:GetChildren()) do
		if v:IsA("Frame") then
			for _,a in pairs(v:GetChildren()) do
				if a:IsA("TextButton") then
					a.Visible = false
				end
			end	
		end
	end
end
-- / Functions / --


EventModule.ActivateEvent = function()
	local RandomPlayer = PlayingTeam:GetPlayers()[math.random(1, #PlayingTeam:GetPlayers())]
	
	if RandomPlayer then	
		
		BadgeService:AwardBadge(RandomPlayer.UserId, Badges:FindFirstChild(script.Name).Value)
		
		local Backpack = RandomPlayer:WaitForChild("Backpack")
		
		if Backpack then
			local Deagle = Tools:WaitForChild("Deagle"):Clone()
			
			Deagle.Parent = Backpack
		end
	end
end
----------------------------------
------------VARIABLES-------------
----------------------------------



User = nil

Connector = game.Workspace:FindFirstChild("GlobalPianoConnector")
if not Connector or not Connector:IsA("RemoteEvent") then
	error("The piano requires a RemoteEvent named GlobalPianoConnector to be in Workspace.")
end

local Materials = {
	"Plastic",
	"Brick",
	"Cobblestone",
	"Concrete",
	"Glass",
	"Ice",
	"Neon",
	"SmoothPlastic",
	"Wood",
}
-- Listen for player character spawns


game:GetService("Players").PlayerAdded:Connect(function(player)
	-- Get the player's humanoid
	local humanoid = player.Character:WaitForChild("Humanoid")

	-- Define a variable to store the current walk speed
	local currentSpeed = humanoid.WalkSpeed

	-- Increase the player's walk speed every second
	while true do
		wait(1)
		currentSpeed = currentSpeed + ACCELERATION
		if currentSpeed > MAX_WALK_SPEED then
			currentSpeed = MAX_WALK_SPEED
		end
		humanoid.WalkSpeed = currentSpeed
	end
end)
print("Hello world!")
--[=[
	Cleans up all objects in the trove. This is
	similar to calling `Remove` on each object
	within the trove. The ordering of the objects
	removed is _not_ guaranteed.
]=]


function Trove:Clean()
	if self._cleaning then
		return
	end
	self._cleaning = true
	for _, obj in self._objects do
		self:_cleanupObject(obj[1], obj[2])
	end
	table.clear(self._objects)
	self._cleaning = false
end

function Trove:_findAndRemoveFromObjects(object: any, cleanup: boolean): boolean
	local objects = self._objects
	for i, obj in ipairs(objects) do
		if obj[1] == object then
			local n = #objects
			objects[i] = objects[n]
			objects[n] = nil
			if cleanup then
				self:_cleanupObject(obj[1], obj[2])
			end
			return true
		end
	end
	return false
end

function Trove:_cleanupObject(object, cleanupMethod)
	if cleanupMethod == FN_MARKER then
		object()
	elseif cleanupMethod == THREAD_MARKER then
		coroutine.close(object)
	else
		object[cleanupMethod](object)
	end
end