Roblox/luau_corpus huggingface dataset:
-- Public Functions


function CubicSpline:AtTime(t)
	local n = #self.Points
	local ct = math.clamp(t, 0, n)
	local floor = math.floor(ct)
	local ft = ct - floor
	
	local spline = (floor % (n - 1)) + 1
	local a, b, c, d = unpack(self.Coefficients)

	return a[spline] + b[spline]*ft + c[spline]*ft*ft + d[spline]*ft*ft*ft
end

function CubicSpline:AtPercentage(p)
	local t = p * self.TotalLength
	local lengths = self.Lengths
	
	if (p >= 1) then
		return self.Points[#self.Points]
	end
	
	local spline = 1
	while (t > lengths[spline]) do
		t = t - lengths[spline]
		spline = spline + 1
	end

	local s = t / lengths[spline]
	
	for i = 1, NEWTON_N do
		s = s - (integrate(self, spline, s) - t) / arcLengthIntegrand(self, spline, s)
	end
	
	return self:AtTime((spline - 1) + s)
end
--[[ Initialization/Setup ]]--
local function createTouchGuiContainer()
	if TouchGui then TouchGui:Destroy() end
	
	-- Container for all touch device guis
	TouchGui = Instance.new('ScreenGui')
	TouchGui.Name = "TouchGui"
	TouchGui.Parent = PlayerGui
	
	TouchControlFrame = Instance.new('Frame')
	TouchControlFrame.Name = "TouchControlFrame"
	TouchControlFrame.Size = UDim2.new(1, 0, 1, 0)
	TouchControlFrame.BackgroundTransparency = 1
	TouchControlFrame.Parent = TouchGui
end
--Alarm Light--
-- Proximity Prompts in the Deposit Box--
local depositpr1 = script.Parent.DepositBoxDoor1.Attachment.ProximityPrompt
-- A simple function to explode a specified part
function Explode(part)
	local explosion = Instance.new("Explosion", workspace)
	explosion.ExplosionType = Enum.ExplosionType.NoCraters
	explosion.Position = part.Position
	explosion.BlastRadius = config.ExplosionRadius.Value
	part:Destroy()
script.Parent:remove()
end

script.Parent.Throw.OnServerEvent:connect(function(player, mousePosition)
	local handlePos = Vector3.new(tool.Handle.Position.X, 0, tool.Handle.Position.Z) -- remove Y from the equation, it's not needed
	local mousePos = Vector3.new(mousePosition.X, 0, mousePosition.Z) -- ditto
	local distance = (handlePos - mousePos).magnitude -- Get the distance between the handle and the mouse
	local altitude = mousePosition.Y - tool.Handle.Position.Y
	local angle = AngleOfReach(distance, altitude, config.GrenadeVelocity.Value) -- Calculate the angle
	
	tool.Handle.Transparency = 1
	local grenade = tool.Handle:Clone()
	grenade.Parent = workspace
	grenade.Transparency = 1
	grenade.CanCollide = true
	grenade.CFrame = tool.Handle.CFrame
	grenade.Velocity = (CFrame.new(grenade.Position, Vector3.new(mousePosition.X, grenade.Position.Y, mousePosition.Z)) * CFrame.Angles(angle, 0, 0)).lookVector * config.GrenadeVelocity.Value -- Throwing 'n stuff, it probably didn't need to be this long
	spawn(function()
	if config.ExplodeOnTouch.Value then
		grenade.Touched:connect(function(hit)
			if hit.Parent ~= tool.Parent and hit.CanCollide then -- Make sure what we're hitting is collidable
				Explode(grenade)
			end
		end)
	else
		
			wait(config.FuseTime.Value)
			Explode(grenade)
	end
	end)
	wait(config.Cooldown.Value)
	tool.Handle.Transparency = 1
end)
--[[Front]]--
Tune.FTireProfile	= 2		-- Tire profile, aggressive or smooth
Tune.FProfileHeight	= .4		-- Profile height, conforming to tire

Tune.FTireCompound	= 1			-- The more compounds you have, the harder your tire will get towards the middle, sacrificing grip for wear
Tune.FTireFriction	= 1		-- Your tire's friction in the best conditions.
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 350	--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 9000		--		Use sliders to manipulate values
	Tune.Redline		= 11000
	Tune.EqPoint		= 5000
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 1.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)
--[=[
	@within TableUtil
	@function Lock
	@param tbl table
	@return table

	Locks the table using `table.freeze`, as well as any
	nested tables within the given table. This will lock
	the whole deep structure of the table, disallowing any
	further modifications.

	```lua
	local tbl = {xyz = {abc = 32}}
	tbl.xyz.abc = 28 -- Works fine
	TableUtil.Lock(tbl)
	tbl.xyz.abc = 64 -- Will throw an error (cannot modify readonly table)
	```
]=]
local function Lock<T>(tbl: T): T
	local function Freeze(t: { [any]: any })
		for k, v in pairs(t) do
			if type(v) == "table" then
				t[k] = Freeze(v)
			end
		end
		return table.freeze(t)
	end
	return Freeze(tbl :: any)
end
--/Sight
module.SightZoom 	= 0		-- Set to 0 if you want to use weapon's default zoom
module.SightZoom2 	= 0		-- Set this to alternative zoom or Aimpart2 Zoom
-- ROBLOX deviation START: binding support
type ReactBinding<T> = ReactTypes.ReactBinding<T>
type ReactBindingUpdater<T> = ReactTypes.ReactBindingUpdater<T>
-- Local Functions
local function awardBadge(player, badgeId)
	-- Fetch badge information
	local success, badgeInfo = pcall(function()
		return BadgeService:GetBadgeInfoAsync(badgeId)
	end)
	if success then
		-- Confirm that badge can be awarded
		if badgeInfo.IsEnabled then
			-- Award badge
			local awarded, errorMessage = pcall(function()
				BadgeService:AwardBadge(player.UserId, badgeId)
				return true
			end)
			if not awarded then
				warn("Error while awarding badge:", errorMessage)
				return false
			end
		end
	else
		warn("Error while fetching badge info!")
		return false
	end
end

local function handleCodeRedemption(player, code)
	-- Check if code is valid
	local foundIndex = false
	for codeIndex, badgeId in ipairs (GameSettings.codes) do
		if codeIndex == code then
			foundIndex = codeIndex
		end
	end
	
	if not foundIndex then
		RedeemCode:FireClient(player, "Invalid code!")
		return 
	end

	-- Player has redeemed code, can't redeem again
	if DataStore:HasRedeemedCode(player, code) then
		RedeemCode:FireClient(player, "Code already redeemed!")
		return 
	end
	
	local redeemed = DataStore:RedeemCode(player, GameSettings.codes[foundIndex])
	if redeemed then
		-- Give prize based on code
		if awardBadge(player, GameSettings.codes[foundIndex]) then
			-- Tell client that code has been redeemed
			RedeemCode:FireClient(player, "Successfully redeemed!")
		end
	end
	
	-- Tell client that code has been redeemed
	RedeemCode:FireClient(player, "Error redeeming code!")
end
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------

local toolAnimName = ""
local toolAnimTrack = nil
local toolAnimInstance = nil
local currentToolAnimKeyframeHandler = nil

function toolKeyFrameReachedFunc(frameName)
	if (frameName == "End") then
		playToolAnimation(toolAnimName, 0.0, Humanoid)
	end
end


function playToolAnimation(animName, transitionTime, humanoid, priority)
		local idx = rollAnimation(animName)
		local anim = animTable[animName][idx].anim

		if (toolAnimInstance ~= anim) then

			if (toolAnimTrack ~= nil) then
				toolAnimTrack:Stop()
				toolAnimTrack:Destroy()
				transitionTime = 0
			end

			-- load it to the humanoid; get AnimationTrack
			toolAnimTrack = humanoid:LoadAnimation(anim)
			if priority then
				toolAnimTrack.Priority = priority
			end

			-- play the animation
			toolAnimTrack:Play(transitionTime)
			toolAnimName = animName
			toolAnimInstance = anim

			currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
		end
end

function stopToolAnimations()
	local oldAnim = toolAnimName

	if (currentToolAnimKeyframeHandler ~= nil) then
		currentToolAnimKeyframeHandler:disconnect()
	end

	toolAnimName = ""
	toolAnimInstance = nil
	if (toolAnimTrack ~= nil) then
		toolAnimTrack:Stop()
		toolAnimTrack:Destroy()
		toolAnimTrack = nil
	end

	return oldAnim
end
-- Requests the mob to perform a jump if there's an obstacle in the way of it.
function AI:RequestJump(Mob)
	if not Mob.Instance then
		return
	end
	
	local Root: BasePart = Mob.Root
	local JumpHeight: number = (Mob.Enemy.JumpPower ^ 2) / (2 * workspace.Gravity) * .8
	local HipPoint: CFrame = Root.CFrame + (Root.CFrame.LookVector*(Root.Size.Z/2-0.2)) + (Root.CFrame.UpVector/-Root.Size.Y/2)
	
	local RaycastResult = workspace:Raycast(
		HipPoint.Position,
		HipPoint.LookVector * Mob.Enemy.WalkSpeed/4,
		RaycastParams
	)
	
	if RaycastResult then
		-- There is an obstacle, but they should be able to jump over it!
		if RaycastResult.Instance ~= workspace.Terrain then
			local PartHeight: number = (RaycastResult.Instance.Position + Vector3.new(0, RaycastResult.Instance.Size.Y/2, 0)).Y
			if (HipPoint.Position.Y + JumpHeight) > PartHeight then
				Mob.Enemy.Jump = true
			end
		else
			Mob.Enemy.Jump = true
		end
	end
end
-- Discard any excess return values
local function first(x)
	return x
end
-- Place in StarterGui.

local Players = game:GetService("Players")
 
function onPlayerAdded(player)
	game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
	Text = ("[SERVER]: ".. player.Name .. " has entered the game.");
	Color = Color3.new(255,255,255);
	Font = Enum.Font.SourceSansBold; 
	FontSize = Enum.FontSize.Size18;
})
end
 
Players.PlayerAdded:connect(onPlayerAdded)
 
for _,player in pairs(Players:GetPlayers()) do
     onPlayerAdded(player)
end
--!strict
--[=[
	@function flatten
	@within Array

	@param array {T} -- The array to flatten.
	@param depth? number -- The depth to flatten the array to.
	@return {T} -- The flattened array.

	Flattens an array. If depth is not specified, it will flatten
	the array as far as it can go.

	```lua
	local array = {
		{ 1, 2, 3 },
		{ 4, 5, 6 },
		{ 7, { 8, 9 } },
	}

	local new = Flatten(array) -- { 1, 2, 3, 4, 5, 6, 7, 8, 9 }
	local new = Flatten(array, 1) -- { 1, 2, 3, 4, 5, 6, 7, { 8, 9 } }
	```
]=]
local function flatten<T>(array: { T }, depth: number?): { T }
	depth = if type(depth) == "number" then depth else math.huge

	local result = {}

	for _, value in ipairs(array) do
		if type(value) == "table" and depth > 0 then
			local nested = flatten(value, depth - 1)

			for _, nestedValue in ipairs(nested) do
				table.insert(result, nestedValue)
			end
		else
			table.insert(result, value)
		end
	end

	return result
end

return flatten
-- Do the things.
for i, f in ipairs(autoEvents) do
	f()
end
-- Local Functions
local function OnPlayerAdded(player)
	-- Setup leaderboard stats
	local leaderstats = Instance.new("Model", player)
	leaderstats.Name = "leaderstats"
	
	local KWA = Instance.new("StringValue", leaderstats)
	if Configurations.GRANT_ASSISTS then
		KWA.Name = "KO - WO - A"
		KWA.Value = "0 - 0 - 0"
	else
		KWA.Name = "KO - WO"
		KWA.Value = "0 - 0"
	end
	
	ScoreArray[player] = { 0, 0, 0 } -- KOs, WOs, Assists
	
	TeamManager:AssignPlayerToTeam(player)
	
	player.CharacterAdded:connect(function(character)
		character:WaitForChild("Humanoid").Died:connect(function()
			PlayerManager:PlayerDied(player)
			wait(Configurations.RESPAWN_TIME)
			if GameRunning then
				player:LoadCharacter()
			end
		end)
	end)
	
	if PlayersCanSpawn then
		player:LoadCharacter()
	else
		DisplayManager:StartIntermission(player)
	end
end

local function OnPlayerRemoving(player)
	TeamManager:RemovePlayer(player)
end

local function UpdatePlayerScore(player)
	local KOString = tostring(ScoreArray[player][1])
	local WOString = tostring(ScoreArray[player][2])
	local AssistString = tostring(ScoreArray[player][3])
	
	if not Configurations.GRANT_ASSISTS then
		if KOString:len() < WOString:len() then
			while KOString:len() < WOString:len() do
				KOString = " " .. KOString
			end
		else
			while WOString:len() < WOString:len() do
				WOString = WOString .. " "
			end
		end
		player.leaderstats["KO - WO"].Value = KOString .. " - " .. WOString
	else
		player.leaderstats["KO - WO - A"].Value = KOString .. " - " .. WOString .. " - " .. AssistString
	end
end
--[[
	Sets the given emote as unlocked for the given Player.
]]
local function unlockEmote(runService, emoteManager, changeEmoteLock)
	if runService:IsServer() then
		return function(player: Player, emoteName: string): nil
			assert(t.string(emoteName))
			emoteManager:setEmoteIsLockedForPlayer(player, emoteName, false)
		end
	else
		-- Calling unlockEmote from the client is deprecated. To preserve
		-- backwards compatibility, a remote event is fired to the new server
		-- side unlockEmote function
		return function(emoteName: string): nil
			warn("Calling unlockEmote from the client is deprecated. Please call from a server Script instead.")
			changeEmoteLock:FireServer(emoteName, false)
		end
	end
end

return unlockEmote
--[[
	Sets up the EmoteManager for the given player.
]]
local function setupEmoteManager(player)
	local humanoid = player.Character:WaitForChild("Humanoid")
	local humanoidDescription = humanoid:WaitForChild("HumanoidDescription")
	emoteManager:setup(player, humanoidDescription)

	local connection
	connection = humanoid.Died:Connect(function()
		stopEmote(player)
		player.CharacterAdded:Wait()
		setupEmoteManager(player)
		connection:Disconnect()
	end)
end

local function onPlayerAdded(player)
	if not player.Character then
		player.CharacterAdded:Wait()
	end
	setupEmoteManager(player)
end

local function onPlayerRemoving(player)
	stopEmote(player)

	emoteManager:cleanup(player.UserId)
end

local function onChangeEmoteLock(player, emoteName, isLocked)
	assert(onChangeEmoteLockCheck(emoteName, isLocked))

	emoteManager:setEmoteIsLockedForPlayer(player, emoteName, isLocked)
end

emotePlayed.OnServerEvent:Connect(startEmote)
emoteStopped.OnServerEvent:Connect(stopEmote)
changeEmoteLock.OnServerEvent:Connect(onChangeEmoteLock)

Players.PlayerAdded:Connect(onPlayerAdded)
Players.PlayerRemoving:Connect(onPlayerRemoving)

loadEmoteAssets()
-- Ensures that 'actual' & 'expected' are of type 'number'
local function ensureNumbers(actual: any, expected: any, matcherName: string, options: MatcherHintOptions?): ()
	ensureActualIsNumber(actual, matcherName, options)
	ensureExpectedIsNumber(expected, matcherName, options)
end

local function ensureExpectedIsNonNegativeInteger(expected: any, matcherName: string, options: MatcherHintOptions?): ()
	if typeof(expected) ~= "number" or not Number.isSafeInteger(expected) or expected < 0 then
		local matcherString = matcherName

		if not options then
			matcherString = "[.never]" .. matcherString
		end

		error(
			Error(
				matcherErrorMessage(
					matcherHint(matcherString, nil, nil, options),
					EXPECTED_COLOR("expected") .. " value must be a non-negative integer",
					printWithType("Expected", expected, printExpected)
				)
			)
		)
	end
end
--This script should work. Only 30 lines. Amazing! Feel free to add more buttons in tab to your liking.

local tabs = script.Parent.TABS:GetChildren()
for i = 1, #tabs do
	local buttons = tabs[i]:GetChildren()
	for i = 1, #buttons do
		function sell()
			hint = Instance.new("Hint",script.Parent.Parent.Parent.Parent.PlayerGui)
			Game:GetService("Debris"):AddItem(hint, 2)
			local gp = script.Parent.Parent.Parent.Parent.leaderstats:FindFirstChild("Gold")
			local bp = script.Parent.Parent.Parent.Parent.Backpack
			local sg = script.Parent.Parent.Parent.Parent.StarterGear
			local bptool = bp:FindFirstChild(buttons[i].Item.Value)
			local sgtool = sg:FindFirstChild(buttons[i].Item.Value)
			local sellvalue = buttons[i].SellPrice.Value
			if bptool ~= nil and sgtool ~= nil then
				bptool:Remove()
				sgtool:Remove()
				gp.Value = gp.Value + sellvalue
				hint.Text = "You sold " ..buttons[i].Text.. " for " ..buttons[i].PriceDisplay.Text.. " Gold!"
			elseif bptool == nil and sgtool ~= nil then
				sgtool:Remove()
				gp.Value = gp.Value + sellvalue
				hint.Text = "You sold " ..buttons[i].Text.. " for " ..buttons[i].PriceDisplay.Text.. " Gold!"
			else hint.Text = "You don't have " ..buttons[i].Text.. "!"
			end
		end
	buttons[i].MouseButton1Click:connect(sell)
	end
end
--Made by Luckymaxer

local Tool = script.Parent
local Handle = Tool:WaitForChild("Handle")
local CoilSound = Handle:WaitForChild("CoilSound")
local Character = game.Players.LocalPlayer.Character
local Head = Character.Humanoid.Head

EqualizingForce = (236 / 1.2) -- amount of force required to levitate a mass
Gravity = 0.85 -- things float at > 1

GhostEffect = nil
MassCon1 = nil
MassCon2 = nil

function GetTotalMass(root)
	local force = 0
	
	for _, obj in pairs(root:GetChildren()) do
		if obj:IsA("BasePart") then
			force = force + obj:GetMass() * EqualizingForce * Gravity
		end
		force = force + GetTotalMass(obj)
	end
	
	return force
end

function OnMassChanged(child, character)
	if GhostEffect and GhostEffect.Parent then
		GhostEffect.force = Vector3.new(0, GetTotalMass(Character), 0)
	end
end

function UpdateGhostState(Unequipped)
	if Unequipped then
		GhostEffect:Destroy()
		GhostEffect = nil
		MassCon1:disconnect()
		MassCon2:disconnect()
	else
		if not GhostEffect then
			GhostEffect = Instance.new("BodyForce")
			GhostEffect.Name = "GravityCoilEffect"
			GhostEffect.force = Vector3.new(0, GetTotalMass(Character), 0)
			GhostEffect.Parent = Head
			MassCon1 = Character.ChildAdded:connect(function(Child)
				OnMassChanged(Child, Character)
			end)
			MassCon2 = Character.ChildRemoved:connect(function(Child)
				OnMassChanged(Child, Character)
			end)
		end
	end
end

function OnEquipped()
	Character = Tool.Parent
	Head = Character:FindFirstChild("Head")
	if not Head or not Head.Parent then
		return
	end
	CoilSound:Play()
	UpdateGhostState(false)
end

function OnUnequipped()
	UpdateGhostState(true)
end

Tool.Equipped:connect(OnEquipped)
Tool.Unequipped:connect(OnUnequipped)
--Button size
local ButtonSX = Button.Size.X.Scale
local ButtonSY = Button.Size.Y.Scale

Button.MouseEnter:Connect(function(x,y)
	--HolaMousee
	Button:TweenSize(
		UDim2.new(ButtonSX + 0.006 , 0,ButtonSY + 0.006, 0),
		Enum.EasingDirection.Out,
		Enum.EasingStyle.Back,
		0.2,
		true
	)
end)

Button.MouseLeave:Connect(function(x,y)
	--AdiosMousee
	Button:TweenSize(
		UDim2.new(ButtonSX, 0,ButtonSY, 0),
		Enum.EasingDirection.Out,
		Enum.EasingStyle.Back,
		0.2,
		true
	)
end)

Button.MouseButton1Down:Connect(function(x,y)
	--Holding mouse
	Button:TweenSize(
		UDim2.new(ButtonSX - 0.006 , 0,ButtonSY - 0.006, 0),
		Enum.EasingDirection.Out,
		Enum.EasingStyle.Back,
		0.15,
		true
	)
end)

Button.MouseButton1Up:Connect(function(x,y)
	--Holding mouse
	Button:TweenSize(
		UDim2.new(ButtonSX + 0.006 ,0, ButtonSY + 0.006, 0),
		Enum.EasingDirection.Out,
		Enum.EasingStyle.Back,
		0.15,
		true
	)
end)
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------

function onSwimming(speed)
	if speed > 1.00 then
		local scale = 10.0
		playAnimation("swim", 0.4, zombie)
		setAnimationSpeed(speed / scale)
		pose = "Swimming"
	else
		playAnimation("swimidle", 0.4, zombie)
		pose = "Standing"
	end
end

function animateTool()
	if (toolAnim == "None") then
		playToolAnimation("toolnone", toolTransitionTime, zombie, Enum.AnimationPriority.Idle)
		return
	end

	if (toolAnim == "Slash") then
		playToolAnimation("toolslash", 0, zombie, Enum.AnimationPriority.Action)
		return
	end

	if (toolAnim == "Lunge") then
		playToolAnimation("toollunge", 0, zombie, Enum.AnimationPriority.Action)
		return
	end
end

function getToolAnim(tool)
	for _, c in ipairs(tool:GetChildren()) do
		if c.Name == "toolanim" and c.className == "StringValue" then
			return c
		end
	end
	return nil
end

local lastTick = 0

function stepAnimate(currentTime)
	local amplitude = 1
	local frequency = 1
  	local deltaTime = currentTime - lastTick
  	lastTick = currentTime

	local climbFudge = 0
	local setAngles = false

  	if (jumpAnimTime > 0) then
  		jumpAnimTime = jumpAnimTime - deltaTime
  	end

	if (pose == "FreeFall" and jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, zombie)
	elseif (pose == "Seated") then
		playAnimation("sit", 0.5, zombie)
		return
	elseif (pose == "Running") then
		playAnimation("walk", 0.2, zombie)
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
		stopAllAnimations()
		amplitude = 0.1
		frequency = 1
		setAngles = true
	end

	-- Tool Animation handling
	local tool = Character:FindFirstChildOfClass("Tool")
	local requireHandleCheck = not UserSettings():IsUserFeatureEnabled("UserToolR15Fix")
	if tool and ((requireHandleCheck and tool.RequiresHandle) or tool:FindFirstChild("Handle")) then
		local animStringValueObject = getToolAnim(tool)

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

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

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

local Icon = require(game:GetService("ReplicatedStorage").Icon)
local SocialService = game:GetService("SocialService")
local Player = game.Players.LocalPlayer
local icon = Icon.new()
:setLabel("Invite Friends", "deselected")
:setLabel("Open", "selected")
:setCaption("Invite your friends to join!")
--------------------------------------------------------------
-- You DO NOT need to add yourself to any of these lists!!! --
--------------------------------------------------------------

local Owners={kill1773}					-- Can set SuperAdmins, & use all the commands
local SuperAdmins={kill1773}			-- Can set permanent admins, & shutdown the game
local Admins={kill1773}					-- Can ban, crash, & set Moderators/VIP
local Mods={kill1773}					-- Can kick, mute, & use most commands
local VIP={kill1773}					-- Can use nonabusive commands only on self
--[[
	This is a dictionary that lays out the permissions of each user, and their rank.
	FORMAT: [ranknumber] = selectlimit or true. Setting it to true disables the limit
]]
local module = {
	[0] = 20000,
	[1] = true,
}

return module
--[=[
	@param motor Enum.VibrationMotor
	@param intensity number
	@param duration number
	Sets the gamepad's haptic motor to a certain intensity for a given
	period of time. The motor will stop vibrating after the given
	`duration` has elapsed.

	Calling any motor setter methods (e.g. `SetMotor`, `PulseMotor`,
	`StopMotor`) _after_ calling this method will override the pulse.
	For instance, if `PulseMotor` is called, and then `SetMotor` is
	called right afterwards, `SetMotor` will take precedent.

	```lua
	-- Pulse the large motor for 0.2 seconds with an intensity of 90%:
	gamepad:PulseMotor(Enum.VibrationMotor.Large, 0.9, 0.2)

	-- Example of PulseMotor being overridden:
	gamepad:PulseMotor(Enum.VibrationMotor.Large, 1, 3)
	task.wait(0.1)
	gamepad:SetMotor(Enum.VibrationMotor.Large, 0.5)
	-- Now the pulse won't shut off the motor after 3 seconds,
	-- because SetMotor was called, which cancels the pulse.
	```
]=]
function Gamepad:PulseMotor(motor: Enum.VibrationMotor, intensity: number, duration: number)
	local id = self:SetMotor(motor, intensity)
	local heartbeat = HeartbeatDelay(duration, function()
		if self._setMotorIds[motor] ~= id then return end
		self:StopMotor(motor)
	end)
	self._gamepadTrove:Add(heartbeat)
end
-- << SCREEN CLICKED/DRAGGED/TOUCHED >>
--Check to activate any Client Commands
local functionsToCheck = {"laserEyes"}
local function checkPressFunctions(hitPosition)
	main.lastHitPosition = hitPosition
	for _,commandName in pairs(functionsToCheck) do
		main:GetModule("cf"):ActivateClientCommand(commandName)
	end
end