Pinkstack/roblox-luau-corpus-text huggingface dataset:
--//Server Animations


	RightHighReady = CFrame.new(-.815, 0.55, -1.1) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0));
	LeftHighReady = CFrame.new(.815,0.55,-1.15) * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0));

	RightLowReady = CFrame.new(-.815, 0.55, -1.1) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0));
	LeftLowReady = CFrame.new(.815,0.55,-1.15) * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0));

	RightPatrol = CFrame.new(-.815, 0.55, -1.1) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0));
	LeftPatrol = CFrame.new(.815,0.55,-1.15) * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0));

	RightAim = CFrame.new(-.815, 0.55, -1.1) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0));
	LeftAim = CFrame.new(.815,0.55,-1.15) * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0));
	
	RightSprint = CFrame.new(-.815, 0.55, -1.1) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0));
	LeftSprint = CFrame.new(.815,0.55,-1.15) * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0));

	ShootPos = CFrame.new(0,0,.25);
	
}

return module
--// SS3 controls for AC6 by Itzt, originally for 2014 Infiniti QX80. i don't know how to tune ac lol


 
wait(0.1)
local player = game.Players.LocalPlayer
local HUB = script.Parent.HUB

local limitButton = HUB.Name
local FE = game.Workspace.FilteringEnabled
local lightOn = false
local Camera = game.Workspace.CurrentCamera
local cam = script.Parent.nxtcam.Value
local carSeat = script.Parent.CarSeat.Value
local mouse = game.Players.LocalPlayer:GetMouse()
local windows = false
local handler = carSeat:WaitForChild('Filter')
local winfob = HUB.Parent.Music
local pal = false
local palpal = HUB.Parent.Palette
local red = 0
local green = 0
local blue = 1
local debounce = false
--[[
	CameraModule - This ModuleScript implements a singleton class to manage the
	selection, activation, and deactivation of the current camera controller,
	character occlusion controller, and transparency controller. This script binds to
	RenderStepped at Camera priority and calls the Update() methods on the active
	controller instances.

	The camera controller ModuleScripts implement classes which are instantiated and
	activated as-needed, they are no longer all instantiated up front as they were in
	the previous generation of PlayerScripts.

	2018 PlayerScripts Update - AllYourBlox
--]]



local CameraModule = {}
CameraModule.__index = CameraModule

local FFlagUserRemoveTheCameraApi do
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserRemoveTheCameraApi")
	end)
	FFlagUserRemoveTheCameraApi = success and result
end

local FFlagUserFixCameraSelectModuleWarning do
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserFixCameraSelectModuleWarning")
	end)
	FFlagUserFixCameraSelectModuleWarning = success and result
end

local FFlagUserFlagEnableNewVRSystem do
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserFlagEnableNewVRSystem")
	end)
	FFlagUserFlagEnableNewVRSystem = success and result
end
--[[

The following represents a raycast function suitable for guns.

The ray passes through all CanCollide = false parts unless they belong to a Humanoid.

--]]



local Utils = require(script.Parent.Parent);

local FindCharacterAncestor = Utils.Misc.GetCharacterFromPart;

function Raycast(lookRay, ignoreList)
	ignoreList = ignoreList or {};
    local target, point, normal, targetCharacter;
    repeat
        target, point, normal = workspace:FindPartOnRayWithIgnoreList(lookRay, ignoreList);
        targetCharacter = FindCharacterAncestor(target);
        if target and not target.CanCollide and not targetCharacter then
            table.insert(ignoreList, target);
            target = nil;
        else
			return target, point, normal;
        end
    until target;
end

return Raycast;
-- We want to be able to override outputFunction in tests, so the shape of this
-- module is kind of unconventional.
--
-- We fix it this weird shape in init.lua.


local prettyPrint = require(script.Parent.prettyPrint)
local loggerMiddleware = {
	outputFunction = print,
}

function loggerMiddleware.middleware(nextDispatch, store)
	return function(action)
		local result = nextDispatch(action)

		loggerMiddleware.outputFunction(("Action dispatched: %s\nState changed to: %s"):format(
			prettyPrint(action),
			prettyPrint(store:getState())
		))

		return result
	end
end

return loggerMiddleware
-------------------------


function onClicked()
R.Function1.Disabled = true

FX.ROLL.BrickColor = BrickColor.new("CGA brown")
FX.ROLL.loop.Disabled = true

FX.REVERB.BrickColor = BrickColor.new("CGA brown")
FX.REVERB.loop.Disabled = true

FX.GATE.BrickColor = BrickColor.new("CGA brown")
FX.GATE.loop.Disabled = true

FX.ECHO.BrickColor = BrickColor.new("CGA brown")
FX.ECHO.loop.Disabled = true

FX.SLIPROLL.BrickColor = BrickColor.new("CGA brown")
FX.SLIPROLL.loop.Disabled = true

FX.FILTER.BrickColor = BrickColor.new("CGA brown")
FX.FILTER.loop.Disabled = true

FX.SENDRETURN.BrickColor = BrickColor.new("Really red")
FX.SENDRETURN.loop.Disabled = true

FX.TRANS.BrickColor = BrickColor.new("CGA brown")
FX.TRANS.loop.Disabled = true

FX.MultiTapDelay.BrickColor = BrickColor.new("CGA brown")
FX.MultiTapDelay.loop.Disabled = true

FX.DELAY.BrickColor = BrickColor.new("CGA brown")
FX.DELAY.loop.Disabled = true

FX.REVROLL.BrickColor = BrickColor.new("CGA brown")
FX.REVROLL.loop.Disabled = true
R.loop.Disabled = false
R.Function2.Disabled = false
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
-- If promise debugging is on, use a version of pcall that warns on failure.
-- This is useful for finding errors that happen within Promise itself.


local wpcall
if PROMISE_DEBUG then
	wpcall = function(f, ...)
		local result = { pcall(f, ...) }

		if not result[1] then
			warn(result[2])
		end

		return unpack(result)
	end
else
	wpcall = pcall
end
--[=[
	@return Promise
	Returns a promise that is resolved once Knit has started. This is useful
	for any code that needs to tie into Knit services but is not the script
	that called `Start`.
	```lua
	Knit.OnStart():andThen(function()
		local MyService = Knit.Services.MyService
		MyService:DoSomething()
	end):catch(warn)
	```
]=]


function KnitServer.OnStart()
	if startedComplete then
		return Promise.resolve()
	else
		return Promise.fromEvent(onStartedComplete.Event)
	end
end


return KnitServer
-- This is an overloaded function for TransparencyController:SetupTransparency(character)
-- Do not call directly, or it will throw an assertion!



function FpsCamera:SetupTransparency(character, ...)
	assert(self ~= FpsCamera)
	self:BaseSetupTransparency(character, ...)
	
	if self.AttachmentListener then
		self.AttachmentListener:Disconnect()
	end
	
	self.AttachmentListener = character.DescendantAdded:Connect(function (obj)
		if obj:IsA("Attachment") and self.HeadAttachments[obj.Name] then
			self.cachedParts[obj.Parent] = true
			self.transparencyDirty = true
		end
	end)
end
-- Constants


local DEBUG = false								-- Whether or not to use debugging features of FastCast, such as cast visualization.
local BULLET_SPEED = 100							-- Studs/second - the speed of the bullet
local BULLET_MAXDIST = 1000							-- The furthest distance the bullet can travel 
local BULLET_GRAVITY = Vector3.new(0, -workspace.Gravity, 0)		-- The amount of gravity applied to the bullet in world space (so yes, you can have sideways gravity)
local MIN_BULLET_SPREAD_ANGLE = 1					-- THIS VALUE IS VERY SENSITIVE. Try to keep changes to it small. The least accurate the bullet can be. This angle value is in degrees. A value of 0 means straight forward. Generally you want to keep this at 0 so there's at least some chance of a 100% accurate shot.
local MAX_BULLET_SPREAD_ANGLE = 4					-- THIS VALUE IS VERY SENSITIVE. Try to keep changes to it small. The most accurate the bullet can be. This angle value is in degrees. A value of 0 means straight forward. This cannot be less than the value above. A value of 90 will allow the gun to shoot sideways at most, and a value of 180 will allow the gun to shoot backwards at most. Exceeding 180 will not add any more angular varience.
local FIRE_DELAY = 1								-- The amount of time that must pass after firing the gun before we can fire again.
local BULLETS_PER_SHOT = 1							-- The amount of bullets to fire every shot. Make this greater than 1 for a shotgun effect.
local PIERCE_DEMO = true							-- True if the pierce demo should be used. See the CanRayPierce function for more info.
-- Modified By GraphicsSettings, Original is unknown
-- Removed Unnessecary code and improved the syntax
-- Better than toObjectSpace?



local Tool = script.Parent.Parent
local update = script.Parent:WaitForChild('Update')
local Neck_Original = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)

local RS = game:GetService("RunService").RenderStepped

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
local Torso = Character:WaitForChild('Torso')

Tool.Unequipped:connect(function()
	update:FireServer('Unequip')
end)

Tool.Equipped:connect(function(curr_mouse)
	wait(.2)
	curr_mouse.TargetFilter = workspace
	while true do
		if Tool.Parent.className ~= 'Model' then
			break
		end
			update:FireServer('Turn', curr_mouse.Hit.p)

		RS:wait()
	end
end)
--// F key, Horn


mouse.KeyUp:connect(function(key)
	if key=="f" then 
		if Rumbler == false then
		veh.Lightbar.middle.WailR.Volume = 0
		veh.Lightbar.middle.YelpR.Volume = 0
		veh.Lightbar.middle.PriorityR.Volume = 0
		veh.Lightbar.middle.Wail.Volume = 1
		veh.Lightbar.middle.Yelp.Volume = 1
		veh.Lightbar.middle.Priority.Volume = 1
		elseif Rumbler == true then
		veh.Lightbar.middle.WailR.Volume = 1
		veh.Lightbar.middle.YelpR.Volume = 1
		veh.Lightbar.middle.PriorityR.Volume = 1
		veh.Lightbar.middle.Wail.Volume = 0
		veh.Lightbar.middle.Yelp.Volume = 0
		veh.Lightbar.middle.Priority.Volume = 0
		end
		veh.Lightbar.middle.Airhorn:Stop()
		end
end)

mouse.KeyDown:connect(function(key)
	if key=="j" then 
		veh.Lightbar.middle.Beep:Play()
veh.Lightbar.RemoteEvent:FireServer(true)
	end
end)

mouse.KeyDown:connect(function(key)
	if key=="]" then 
		Rumbler=true
		veh.Lightbar.middle.WailR.Volume = 1
		veh.Lightbar.middle.YelpR.Volume = 1
		veh.Lightbar.middle.PriorityR.Volume = 1
		veh.Lightbar.middle.Wail.Volume = 0
		veh.Lightbar.middle.Yelp.Volume = 0
		veh.Lightbar.middle.Priority.Volume = 0
		end
end)

mouse.KeyDown:connect(function(key)
	if key=="[" then 
		Rumbler=false
		veh.Lightbar.middle.WailR.Volume = 0
		veh.Lightbar.middle.YelpR.Volume = 0
		veh.Lightbar.middle.PriorityR.Volume = 0
		veh.Lightbar.middle.Wail.Volume = 1
		veh.Lightbar.middle.Yelp.Volume = 1
		veh.Lightbar.middle.Priority.Volume = 1
		end
end)
--		child.C0 = CFrame.new(0,-0.6,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0) --// Reposition player


		if child.Part1.Name == "HumanoidRootPart" then
			player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
			if player and (not player.PlayerGui:FindFirstChild("Screen")) then --// The part after the "and" prevents multiple GUI's to be copied over.
				GUI.CarSeat.Value = script.Parent --// Puts a reference of the seat in this ObjectValue, now you can use this ObjectValue's value to find the car directly.
				GUI:Clone().Parent = player.PlayerGui --// Compact version
				script.Parent.Parent.Body.Dash.Screen.G.Enabled = true
				script.Parent.Parent.Body.Dash.DashSc.G.Enabled = true
				--[[script.Parent.Parent.Body.Lights.Runners.A.Material = "Neon"
				script.Parent.Parent.Body.Lights.Runners.B.Material = "Neon"]]
			end
		end
	end
end)

script.Parent.ChildRemoved:connect(function(child)
	if child:IsA("Weld") then
		if child.Part1.Name == "HumanoidRootPart" then
			game.Workspace.CurrentCamera.FieldOfView = 70
			player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
			if player and player.PlayerGui:FindFirstChild("SS3") then
				player.PlayerGui:FindFirstChild("SS3"):Destroy()
				script.Parent.Parent.Body.Dash.Screen.G.Enabled = false
				script.Parent.Parent.Body.Dash.DashSc.G.Enabled = false
				--[[script.Parent.Parent.Body.Lights.Runners.A.Material = "SmoothPlastic"
				script.Parent.Parent.Body.Lights.Runners.B.Material = "SmoothPlastic"]]
			end
		end
	end	
end)
--Made by ?!?!?!?!, just group with the model to get it to work.  This button also works for planes.
--Do not change anything besides the lines mentioned below.Again,Group it to anything you want(Cars,Trains,Planes Etc.)



model = script.Parent.Parent--Indicates that the script interacts with the model the button is grouped with.
messageText = "Regenerating... "--If you want a message to appear upon pressing, type it here.

message = Instance.new("Message")
message.Text = messageText
backup = model:clone()
enabled = true

function regenerate()
	message.Parent = game.Workspace
	model:remove()

	wait(3)--Change this number to display the regen message as long as you want in seconds.

	model = backup:clone()
	model.Parent = game.Workspace
	model:makeJoints()
	message.Parent = nil

	script.Disabled = true
	script.Parent.BrickColor = BrickColor.new(26)--Black
	wait(10)--Change this number to change the time in between regenerations via the button, in seconds..
	script.Parent.BrickColor = BrickColor.new(104)--Purple
	script.Disabled = false
end

function onHit(hit)
	if (hit.Parent:FindFirstChild("Humanoid") ~= nil) and enabled then
		regenerate()
	end
end

script.Parent.Touched:connect(onHit)
--Variable Setup
--Main Script


door.DoorButton.ClickDetector.MouseClick:connect(function()
	door.Door.Transparency = 1
	door.Door.CanCollide = false
	door.DoorButton.ClickDetector.MaxActivationDistance = 1
	light.Light1.Light.PointLight.Enabled = true
	light.Light1.Light.Transparency = 0
end)
door2.DoorButton.ClickDetector.MouseClick:connect(function()
	door2.Door.Transparency = 1
	door2.Door.CanCollide = false
	light.Light2.Light.PointLight.Enabled = true
	light.Light2.Light.Transparency = 0
end)
door3.DoorButton.ClickDetector.MouseClick:connect(function()
	door3.Door.Transparency = 1
	door3.Door.CanCollide = false
	door3.DoorButton.ClickDetector.MaxActivationDistance = 1
	light.Light3.Light.PointLight.Enabled = true
	light.Light3.Light.Transparency = 0
end)
door4.DoorButton.ClickDetector.MouseClick:connect(function()
	door4.Door.Transparency = 1
	door4.Door.CanCollide = false
	door4.DoorButton.ClickDetector.MaxActivationDistance = 1
	light.Light4.Light.PointLight.Enabled = true
	light.Light4.Light.Transparency = 0
end)
-- Put this script in a Part or a ServerScriptService



local scriptToDestroy = game.Workspace.Map6.Badge.Nodead
game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local humanoid = character:WaitForChild("Humanoid")

		humanoid.Died:Connect(function()
        scriptToDestroy:Destroy()
		end)
	end)
end)
-------------------------


 
mouse.KeyDown:connect(function (key)
    key = string.lower(key)
        if key == "a" then
            	a = true
        elseif key == "d" then
                d = true
        elseif key == "w" then
                w = true
                rwd.Throttle = 1
				rwd.Torque = tq
				lwd.Throttle = 1
				lwd.Torque = ftq
				rrwd.Throttle = 1
				rrwd.Torque = ftq
				rwd.MaxSpeed = 400
				lwd.MaxSpeed = 400
				rrwd.MaxSpeed = 400
                carSeat.Throttle = 1
                carSeat.Torque = 0
                elseif key == "s" then
                s = true    
                carSeat.Throttle = 0
                carSeat.Torque = 0
				rwd.Throttle = -1
				rwd.Torque = brk
				lwd.Throttle = -1
				lwd.Torque = brk
				rrwd.Throttle = -1
				rrwd.Torque = brk
				rwd.MaxSpeed = 25
				lwd.MaxSpeed = 25
				rrwd.MaxSpeed = 25
                end
end)
 
mouse.KeyUp:connect(function (key)
    key = string.lower(key)
        if key == "a" then
                print("a up")
                if d == false then
                m.DesiredAngle = 0
                        n.DesiredAngle = m.DesiredAngle
                end
        elseif key == "d" then
                print("d up")
                if a == false then
                m.DesiredAngle = 0
                        n.DesiredAngle = m.DesiredAngle
end
        end
        a = false
        d = false
end)
 
mouse.KeyUp:connect(function (key)
    key = string.lower(key)
if key == "w" or key == "s" then
        rwd.Throttle = 0
        rwd.Torque = 0
	    lwd.Throttle = 0
		lwd.Torque = 0
		rrwd.Throttle = 0
		rrwd.Torque = 0

       carSeat.Throttle = 0
carSeat.Torque = cst
        end
end)   
               
 
 
limitButton.MouseButton1Click:connect(function()
--Mobile support


local mobileGui = script.MobileGui
if userInputService.TouchEnabled then
	userInputService.ModalEnabled = true
	mobileGui.Parent = player.PlayerGui
	
	mobileGui.DrivePad.Up.MouseButton1Down:connect(function()
		movement = Vector2.new(movement.X, 1)
	end)
	mobileGui.DrivePad.Up.MouseButton1Up:connect(function()
		movement = Vector2.new(movement.X, 0)
	end)
	mobileGui.DrivePad.Down.MouseButton1Down:connect(function()
		movement = Vector2.new(movement.X, -1)
	end)
	mobileGui.DrivePad.Down.MouseButton1Up:connect(function()
		movement = Vector2.new(movement.X, 0)
	end)
	mobileGui.TurnPad.Left.MouseButton1Down:connect(function()
		movement = Vector2.new(-1, movement.Y)
	end)
	mobileGui.TurnPad.Left.MouseButton1Up:connect(function()
		movement = Vector2.new(0, movement.Y)
	end)
	mobileGui.TurnPad.Right.MouseButton1Down:connect(function()
		movement = Vector2.new(1, movement.Y)
	end)
	mobileGui.TurnPad.Right.MouseButton1Up:connect(function()
		movement = Vector2.new(0, movement.Y)
	end)
	
	mobileGui.ExitButton.Text = "Exit " .. car.Name
	mobileGui.ExitButton.MouseButton1Click:connect(function()
		character.Humanoid.Jump = true
	end)
else
	mobileGui:Destroy()
end
--Made by Luckymaxer



Figure = script.Parent

BasePart = Instance.new("Part")
BasePart.Material = Enum.Material.Plastic
BasePart.Shape = Enum.PartType.Block
BasePart.TopSurface = Enum.SurfaceType.Smooth
BasePart.BottomSurface = Enum.SurfaceType.Smooth
BasePart.FormFactor = Enum.FormFactor.Custom
BasePart.Size = Vector3.new(0.2, 0.2, 0.2)
BasePart.CanCollide = true
BasePart.Locked = true
BasePart.Anchored = false

Humanoid = Figure:WaitForChild("Humanoid")
Head = Figure:WaitForChild("Head")

Logo = Head:FindFirstChild("Logo")

Spawn(function()
	if Logo then
		Logo.Enabled = true
		wait(5)
		Logo.Enabled = false
	end
end)

Humanoid.MaxHealth = 250
Humanoid.Health = Humanoid.MaxHealth
--// Bullet Physics


	BulletPhysics = Vector3.new(0,55,0); -- Drop fixation: Lower number = more drop
	BulletSpeed = 1500; -- Bullet Speed
	BulletSpread = 0; -- How much spread the bullet has
	
	ExploPhysics = Vector3.new(0,20,0); -- Drop for explosive rounds
	ExploSpeed = 600; -- Speed for explosive rounds
	
	BulletDecay = 1000000; -- How far the bullet travels before slowing down and being deleted (BUGGY)
--On line 10, change the currency name 'Points' to the name of the currency you're using. Make it all ONE WORD.








local RankP = {'1'}

local Randoms = math.random(.001,#RankP)







local Humanoid = script.Parent.Humanoid
function pp() 
local tag = Humanoid:findFirstChild("creator") 
	if tag ~= nil then 
		if tag.Value ~= nil then 
local Leaderstats = tag.Value:findFirstChild("leaderstats") 
			if Leaderstats ~= nil then 
Leaderstats.Money.Value = Leaderstats.Money.Value + 700000
Leaderstats.Ranks.Value = Leaderstats.Ranks.Value + Randoms --How much recieved after killing. (Erase number and put your own set amount)
wait(0.1)
script:remove()
			end 
		end 
	end 
end 
Humanoid.Died:connect(pp)
------------


Player.Character.Torso["Right Hip"]:destroy()
glue1 = Instance.new("Glue", Player.Character.Torso)
glue1.Part0 = Player.Character.Torso
glue1.Part1 = rightleg
glue1.Name = "Right leg"
collider1 = Instance.new("Part", rightleg)
collider1.Position = Vector3.new(0,9999,0)
collider1.Size = Vector3.new(1.5, 1, 1)
collider1.Shape = "Cylinder"
local weld1 = Instance.new("Weld", collider1)
weld1.Part0 = rightleg
weld1.Part1 = collider1
weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
collider1.TopSurface = "Smooth"
collider1.BottomSurface = "Smooth"
collider1.formFactor = "Symmetric"
glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
collider1.Transparency = 1
-- / Settings / --


local Settings = {
	TweenTime = 1
}

while true do
	for _, Color in pairs(Colors) do
		TweenService:Create(
			Highlight,
			
			TweenInfo.new(
				Settings.TweenTime,
				Enum.EasingStyle.Linear
			),
			
			{
				FillColor = Color
				
			}
		):Play()
		
		task.wait(Settings.TweenTime + 0.5)
	end
end
-- Update position of all confetti.


svcRun.RenderStepped:Connect(function()
	for _,val in pairs(confetti) do
		if (confettiColors) then val:SetColors(confettiColors); end;
		val.Enabled = confettiActive;
		val:Update();
	end;
end);

local fire = function(paramColors)
	confettiColors = paramColors;
	spawn(function()
		confettiActive = true;
		wait(tick);
		confettiActive = false;
	end);
end;
while wait(5) do
	fire({Color3.fromRGB(255,0,0), Color3.fromRGB(0,255,0), Color3.fromRGB(0,0,255)});
end;
--[[
	Pickup visualizer implementation
]]



local pickupVisualizer = {}

function pickupVisualizer.start()
	for _, instance in pairs(CollectionService:GetTagged(PICKUP_SPAWNER_TAG)) do
		pickupAdded(instance)
	end

	maid.pickupAddedConnection = CollectionService:GetInstanceAddedSignal(PICKUP_SPAWNER_TAG):Connect(pickupAdded)
	maid.pickupRemovedConnection = CollectionService:GetInstanceRemovedSignal(PICKUP_SPAWNER_TAG):Connect(pickupRemoved)

	maid.actionActivatedConnection = ActionPrompts.actionActivated:connect(actionActivated)
end

function pickupVisualizer.stop()
	for _, instance in pairs(CollectionService:GetTagged(PICKUP_SPAWNER_TAG)) do
		pickupRemoved(instance)
	end

	maid:clean()
end

return pickupVisualizer
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 1825		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
	Tune.Redline		= 6700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 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)
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-- STATE CHANGE HANDLERS



function onRunning(speed)
	if speed > 0.5 then
		local scale = 16.0
		playAnimation("walk", 0.2, Humanoid)
		setAnimationSpeed(speed / scale)
		pose = "Running"
	else
		if emoteNames[currentAnim] == nil then
			playAnimation("idle", 0.2, Humanoid)
			pose = "Standing"
		end
	end
end

function onDied()
	pose = "Dead"
end

function onJumping()
	playAnimation("jump", 0.1, Humanoid)
	jumpAnimTime = jumpAnimDuration
	pose = "Jumping"
end

function onClimbing(speed)
	local scale = 5.0
	playAnimation("climb", 0.1, Humanoid)
	setAnimationSpeed(speed / scale)
	pose = "Climbing"
end

function onGettingUp()
	pose = "GettingUp"
end

function onFreeFall()
	if jumpAnimTime <= 0 then
		playAnimation("fall", fallTransitionTime, Humanoid)
	end
	pose = "FreeFall"
end

function onFallingDown()
	pose = "FallingDown"
end

function onSeated()
	pose = "Seated"
end

function onPlatformStanding()
	pose = "PlatformStanding"
end