Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["A-Chassis Tune"])
local on = 0
local mult=0
local det=.13
local trm=.4
local trmmult=0
local trmon=0
local throt=0
local redline=0
local shift=0

script:WaitForChild("Rev")

script.Parent.Values.Gear.Changed:connect(function()
	mult=1
	if script.Parent.Values.RPM.Value>5000 then
		shift=.2
	end
end)

for i,v in pairs(car.DriveSeat:GetChildren()) do
	for _,a in pairs(script:GetChildren()) do
		if v.Name==a.Name then v:Stop() wait() v:Destroy() end
	end
end

handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,0,true)
handler:FireServer("playSound","Rev")
car.DriveSeat:WaitForChild("Rev")

while wait() do
	mult=math.max(0,mult-.1)
	local _RPM = script.Parent.Values.RPM.Value
	
	if script.Parent.Values.Throttle.Value <= _Tune.IdleThrottle/100 then
		throt = math.max(.3,throt-.2)
		trmmult = math.max(0,trmmult-.05)
		trmon = 1		
	else
		throt = math.min(1,throt+.1)
		trmmult = 1
		trmon = 0		
	end	
	shift = math.min(1,shift+.2)	
	if script.Parent.Values.RPM.Value > _Tune.Redline-_Tune.RevBounce/4 and script.Parent.Values.Throttle.Value > _Tune.IdleThrottle/100 then
		redline=.5
	else
		redline=1
	end
	if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
	local Volume = (on*(15*throt*shift*redline)+(trm*trmon*trmmult*(1-throt)*math.sin(tick()*50)))
	local Pitch = math.max((((script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline))*on^2)+(det*mult*math.sin(80*tick())),script.Rev.SetPitch.Value)
	if FE then
		handler:FireServer("updateSound","Rev",script.Rev.SoundId,Pitch,Volume)
	else
		car.DriveSeat.Rev.Volume = Volume
		car.DriveSeat.Rev.Pitch = Pitch
	end
end
--//Tool Function\\--


tool.Equipped:Connect(function()
	contextActionService:BindAction("ActivateSpecial", activate, true, Enum.KeyCode.E)
	contextActionService:SetImage("ActivateSpecial", tool.TextureId)
	contextActionService:SetPosition("ActivateSpecial", UDim2.new(0.72, -25, 0.20, -25))
	mouse.Icon = cursorId
end)

tool.Unequipped:Connect(function()
	contextActionService:UnbindAction("ActivateSpecial")
	mouse.Icon = ""
end)

tool.Activated:Connect(function()
	if not enabled then return end
	
	enabled = false
	fire:FireServer(mouse.Hit)
	wait(fireRate.Value)
	enabled = true
end)

hit.OnClientEvent:Connect(function()
	mouse.Icon = hitId
	handle.Hitmark:Play()
	wait(0.075)
	mouse.Icon = cursorId
end)

activateSpecial.OnClientEvent:Connect(function()
	
	for i = specialRechargeTime.Value, 0, -1 do
		wait(1)
		specialDB = false
		
	end
	
	specialDB = true
end)
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["A-Chassis Tune"])
local on = 0
local mult=0
local det=.13
local trm=.4
local trmmult=0
local trmon=0
local throt=0
local redline=0
local shift=0

script:WaitForChild("Rev")

script.Parent.Values.Gear.Changed:connect(function()
	mult=1
	if script.Parent.Values.RPM.Value>5000 then
		shift=.2
	end
end)

for i,v in pairs(car.DriveSeat:GetChildren()) do
	for _,a in pairs(script:GetChildren()) do
		if v.Name==a.Name then v:Stop() wait() v:Destroy() end
	end
end

handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,script.Rev.Volume,true)
handler:FireServer("playSound","Rev")
car.DriveSeat:WaitForChild("Rev")

while wait() do
	mult=math.max(0,mult-.1)
	local _RPM = script.Parent.Values.RPM.Value
	
	if script.Parent.Values.Throttle.Value <= _Tune.IdleThrottle/100 then
		throt = math.max(.3,throt-.2)
		trmmult = math.max(0,trmmult-.05)
		trmon = 1		
	else
		throt = math.min(1,throt+.1)
		trmmult = 1
		trmon = 0		
	end	
	shift = math.min(1,shift+.2)	
	if script.Parent.Values.RPM.Value > _Tune.Redline-_Tune.RevBounce/4 and script.Parent.Values.Throttle.Value > _Tune.IdleThrottle/100 then
		redline=.5
	else
		redline=1
	end
	if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
	local Volume = (5*throt*shift*redline)+(trm*trmon*trmmult*(1-throt)*math.sin(tick()*50))
	local Pitch = math.max((((script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline))*on^2)+(det*mult*math.sin(80*tick())),script.Rev.SetPitch.Value)
	if FE then
		handler:FireServer("updateSound","Rev",script.Rev.SoundId,Pitch,Volume)
	else
		car.DriveSeat.Rev.Volume = Volume
		car.DriveSeat.Rev.Pitch = Pitch
	end
end
-- (Hat Giver Script - Loaded.)



debounce = true

function onTouched(hit)
	if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
		debounce = false
		h = Instance.new("Hat")
		p = Instance.new("Part")
		h.Name = "Shadow Ninja Mask"
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle" 
		p.formFactor = 0
		p.Size = Vector3.new(2, 1, 1) 
		p.BottomSurface = 0 
		p.TopSurface = 0 
		p.Locked = true 
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentPos = Vector3.new(0, .38, 0)
		wait(5)
		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)
--[=[
	@within Gamepad
	@prop Connected Signal
	@readonly
	Fires when the gamepad is connected. This will _not_ fire if the
	active gamepad is switched. To detect switching to different
	active gamepads, use the `GamepadChanged` signal.

	There is also a `gamepad:IsConnected()` method.

	```lua
	gamepad.Connected:Connect(function()
		print("Connected")
	end)
	```
]=]
-- ================================================================================
-- GETTER/SETTER FUNCTIONS
-- ================================================================================


function RaceModule:SetNumLaps(number)
	numLaps = number
end -- RaceModule:SetNumLaps()

function RaceModule:GetNumLaps()
	return numLaps
end -- RaceModule:GetNumLaps()

function RaceModule:SetRaceDuration(duration)
	raceDuration = duration
end -- RaceModule:SetRaceDuration()

function RaceModule:GetRaceDuration()
	return raceDuration
end -- RaceModule:GetRaceDuration()

function RaceModule:SetDebugEnabled(enabled)
	debugEnabled = enabled
end -- RaceModule:SetDebugEnabled()

function RaceModule:GetDebugEnabled()
	return debugEnabled
end -- RaceModule:GetDebugEnabled()

function RaceModule:SetRaceStatus(status)
	RaceModule.RaceStatus.Value = status
end -- RaceModule:SetRaceStatus()

function RaceModule:GetRaceStatus()
	return RaceModule.RaceStatus.Value
end -- RaceModule:GetRaceStatus()
--[[
	Calls the given callback, and stores any used external dependencies.
	Arguments can be passed in after the callback.
	If the callback completed successfully, returns true and the returned value,
	otherwise returns false and the error thrown.
	The callback shouldn't yield or run asynchronously.
]]



local Package = script.Parent.Parent
local Types = require(Package.Types)
local parseError = require(Package.Logging.parseError)
local sharedState = require(Package.Dependencies.sharedState)

local initialisedStack = sharedState.initialisedStack
--[[
	Handles the ReturningToFarm stage during the First Time User Experience,
	which waits for the player to return the wagon in their farm
--]]



local ReplicatedStorage = game:GetService("ReplicatedStorage")
local CollectionService = game:GetService("CollectionService")

local FtueStage = require(ReplicatedStorage.Source.SharedConstants.FtueStage)
local CharacterTag = require(ReplicatedStorage.Source.SharedConstants.CollectionServiceTag.CharacterTag)

local ReturningToFarmFtueStage = {}

function ReturningToFarmFtueStage.handleAsync(player: Player): FtueStage.EnumType?
	while player.Character and CollectionService:HasTag(player.Character, CharacterTag.PullingWagon) do
		CollectionService:GetInstanceRemovedSignal(CharacterTag.PullingWagon):Wait()
	end

	-- This is the last stage, so we return nil to indicate no next stage
	return nil
end

return ReturningToFarmFtueStage
--[[
function onPlayerBlownUp(part, distance, creator)	
	if part.Name == "Head" then	
		local humanoid = part.Parent.Humanoid
		tagHumanoid(humanoid, creator)
	end
end

function tagHumanoid(humanoid, creator)
	-- tag does not need to expire iff all explosions lethal	
	if creator ~= nil then
		local new_tag = creator:clone()
		new_tag.Parent = humanoid
	end
end

function untagHumanoid(humanoid)
	if humanoid ~= nil then
		local tag = humanoid:findFirstChild("creator")
		if tag ~= nil then		
			tag.Parent = nil
		end
	end
end
]]

--
t, s = r.Stepped:wait()

d = t + 10.0 - s
connection = bullet.Touched:connect(blow)

while t < d do
	fly()
	t = r.Stepped:wait()
end

bullet:remove()
--[[
	destination: The Part to be teleported to.
	fade: Whether to use the fade effect. (Defaults to true if not specified)
--]]



game.ReplicatedStorage.DoFancyTeleport.OnClientEvent:Connect(function(destination, fade)
	if script.Parent:FindFirstAncestorOfClass("Workspace") then return end --Just in case studio test runs LocalScripts in places where it's not supposed to...
	if fade==nil then fade = true end
	local character = game.Players.LocalPlayer.Character
	if not character then return end
	local torso = character:FindFirstChild("UpperTorso")
	if not torso then
		torso = character:FindFirstChild("Torso")
	end
	if not torso then return end
	if db then return end
	db=true
	if fade then
		script.Parent.Visible = true
		script.Parent.BackgroundTransparency = 1
		local targ = {BackgroundTransparency = 0}
		local tween = TweenService:Create(script.Parent, info, targ)
		tween:Play()
		wait(FadeTime)
	end
	if torso then
		local hum = character:FindFirstChild("Humanoid")
		if hum then hum.Sit = false end
		if typeof(destination) == "Vector3" then
			torso.CFrame = torso.CFrame - torso.CFrame.p + destination
		elseif typeof(destination) == "Instance" then
			if destination:IsA("BasePart") then
				torso.CFrame = destination.CFrame + Vector3.new(0, destination.Size.Y/2 + 3, 0) --1 for the lower torso, 2 for the legs...
				workspace.CurrentCamera.Focus = torso.CFrame
				workspace.CurrentCamera.CFrame = torso.CFrame * CFrame.new(0, 5, -10)
			end
		end
		if fade then
			wait(BlackoutTime)
		end
	end
	if fade then
		local targ = {BackgroundTransparency = 1}
		local tween = TweenService:Create(script.Parent, info, targ)
		tween:Play()
		wait(FadeTime)
		script.Parent.Visible = false
	end
	wait(DelayTime)
	db = false
end)
-- Torso



character.HumanoidRootPart.CustomPhysicalProperties = PhysicalProperties.new(Ds,Fr,El,FrW,ElW)
character.UpperTorso.CustomPhysicalProperties = PhysicalProperties.new(Ds,Fr,El,100,ElW)
character.LowerTorso.CustomPhysicalProperties = PhysicalProperties.new(Ds,Fr,El,100,ElW)
character.Head.CustomPhysicalProperties = PhysicalProperties.new(Ds,Fr,El,100,ElW)
--[[
	Cleans up the task passed in as the argument.
	A task can be any of the following:

	- an Instance - will be destroyed
	- an RBXScriptConnection - will be disconnected
	- a function - will be run
	- a table with a `Destroy` or `destroy` function - will be called
	- an array - `cleanup` will be called on each item
]]



export type Task =
	Instance |
	RBXScriptConnection |
	() -> () |
	{destroy: (any) -> ()} |
	{Destroy: (any) -> ()} |
	{Task}

local function cleanup(task: Task)
	local taskType = typeof(task)

	-- case 1: Instance
	if taskType == "Instance" then
		task:Destroy()

	-- case 2: RBXScriptConnection
	elseif taskType == "RBXScriptConnection" then
		task:Disconnect()

	-- case 3: callback
	elseif taskType == "function" then
		task()

	elseif taskType == "table" then
		-- case 4: destroy() function
		if typeof(task.destroy) == "function" then
			task:destroy()

		-- case 5: Destroy() function
		elseif typeof(task.Destroy) == "function" then
			task:Destroy()

		-- case 6: array of tasks
		elseif task[1] ~= nil then
			for _, subtask in ipairs(task) do
				cleanup(subtask)
			end
		end
	end
end

return cleanup
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 1991		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 1100		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 8250		--		Use sliders to manipulate values
	Tune.Redline		= 8750		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5250
	Tune.PeakSharpness	= 5.8
	Tune.CurveMult		= 0.294 
	
	--Incline Compensation
	Tune.InclineComp	= 1.5		-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 400		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 300		-- RPM decay when clutch is off
	Tune.RevBounce		= 450		-- RPM kickback from redline
	Tune.IdleThrottle	= 0			-- Percent throttle at idle
	Tune.ClutchTol		= 450		-- Clutch engagement threshold (higher = faster response, lower = more stable RPM)
-- local SLIDER_FRAMEX = Defaults:WaitForChild("SliderFrameX")
-- local SLIDER_FRAMEY = Defaults:WaitForChild("SliderFrameY")



local XBOX_STEP = 0.01
local DEBOUNCE_TICK = 0.1
local XBOX_DEADZONE = 0.35
local THUMBSTICK = Enum.KeyCode.Thumbstick2
--	local BlastPart = Instance.new('Part', game.Workspace)
--	BlastPart.FormFactor = 'Custom'
--	BlastPart.Size = Vector3.new(1,1,1)
--	BlastPart.Transparency = 0.3
--	BlastPart.Anchored = true
--	BlastPart.CanCollide = false
--	BlastPart.CFrame = CFrame.new(Grenade.Position)*CFrame.Angles(-math.pi/2,0,0)
--	local BlastCFrame = CFrame.new(Grenade.Position)*CFrame.Angles(-math.pi/2,0,0)
--	local BlastMesh = Instance.new('SpecialMesh', BlastPart)
--	BlastMesh.MeshId = 'http://www.roblox.com/asset/?id=1080954'
--	BlastMesh.TextureId = 'http://www.roblox.com/asset/?id=37856148'
--	game.Debris:AddItem(BlastPart, 10)



	Delay(7*0.03, function()
		local Explosion = Instance.new('Explosion')
		Explosion.BlastPressure = 0
		Explosion.BlastRadius = 12
		Explosion.Position = Grenade.Position
		--
		local HitHumanoidMap = {}
		Explosion.Hit:connect(function(part, rad)
			if Character and part:IsDescendantOf(Character) then return end
			local hum = (part.Parent or game):FindFirstChild('Humanoid')
			if hum and hum.Parent:FindFirstChild('Torso') and not HitHumanoidMap[hum] then 
				HitHumanoidMap[hum] = true
				hum.Sit = true
				local tag = GrenadeScript.creator:Clone()
				tag.Parent = hum
				game.Debris:AddItem(tag, 2)
				hum:TakeDamage(150)
				local twist = Instance.new('BodyAngularVelocity', hum.Parent.Torso)
				twist.angularvelocity = Vector3.new(10,10,10)
				local throw = Instance.new('BodyVelocity', hum.Parent.Torso)
				throw.maxForce = Vector3.new(10000,10000,10000)
				throw.velocity = (hum.Parent.Torso.Position - Grenade.Position).unit * 40
				wait(0.5)
				twist:Destroy()
				throw:Destroy()
				hum.Sit = false
			end
		end)
		--
		Explosion.Parent = game.Workspace
	end)
	for i = 0, 1, 0.2 do
		wait()
		BlastPart.CFrame = CFrame.new(0, math.sqrt(i)*10,0)*BlastCFrame
		BlastMesh.Scale = Vector3.new(4 + 4*i, 4 + 4*i, 4 + math.sqrt(i)*24)
	end
	for i = 0, 1, 0.1 do
		wait()
		BlastPart.CFrame = CFrame.new(0,10 - i*i*4,0)*BlastCFrame
		BlastMesh.Scale = Vector3.new(8 + i*2, 8 + i*2, 28 - i*i*8)
		BlastPart.Transparency = 0.3 + 0.7*i*i
	end
	BlastPart:Destroy()

	wait(0.5)

	--and finally get rid of us
	Grenade:Destroy()
end)
---------------
-- Variables --
---------------



local RunService = game:GetService('RunService')
local PlayersService = game:GetService('Players')
local Player = PlayersService.LocalPlayer

local Camera = nil
local Character = nil
local Torso = nil

local Mode = nil
local Behaviors = {} -- Map of modes to behavior fns
local SavedHits = {} -- Objects currently being faded in/out
local TrackedLimbs = {} -- Used in limb-tracking casting modes
-- This function should handle all controller enabling and disabling without relying on
-- ControlModule:Enable() and Disable()


function ControlModule:SwitchToController(controlModule)
	-- controlModule is invalid, just disable current controller
	if not controlModule then
		if self.activeController then
			self.activeController:Enable(false)
		end
		self.activeController = nil
		self.activeControlModule = nil
		return
	end
	
	-- first time switching to this control module, should instantiate it
	if not self.controllers[controlModule] then
		self.controllers[controlModule] = controlModule.new(CONTROL_ACTION_PRIORITY)
	end
	
	-- switch to the new controlModule
	if self.activeController ~= self.controllers[controlModule] then
		if self.activeController then
			self.activeController:Enable(false)
		end
		self.activeController = self.controllers[controlModule]
		self.activeControlModule = controlModule -- Only used to check if controller switch is necessary

		if self.touchControlFrame and (self.activeControlModule == ClickToMove
					or self.activeControlModule == TouchThumbstick
					or self.activeControlModule == DynamicThumbstick) then
			if not self.controllers[TouchJump] then
				self.controllers[TouchJump] = TouchJump.new()
			end
			self.touchJumpController = self.controllers[TouchJump]
			self.touchJumpController:Enable(true, self.touchControlFrame)
		else
			if self.touchJumpController then
				self.touchJumpController:Enable(false)
			end
		end
		
		self:UpdateActiveControlModuleEnabled()
	end
end

function ControlModule:OnLastInputTypeChanged(newLastInputType)
	if lastInputType == newLastInputType then
		warn("LastInputType Change listener called with current type.")
	end
	lastInputType = newLastInputType

	if lastInputType == Enum.UserInputType.Touch then
		-- TODO: Check if touch module already active
		local touchModule, success = self:SelectTouchModule()
		if success then
			while not self.touchControlFrame do
				wait()
			end
			self:SwitchToController(touchModule)
		end
	elseif computerInputTypeToModuleMap[lastInputType] ~= nil then
		local computerModule = self:SelectComputerMovementModule()
		if computerModule then
			self:SwitchToController(computerModule)
		end
	end

	self:UpdateTouchGuiVisibility()
end
--Aesthetics (PGS ONLY)


Tune.SusVisible		= false		-- Spring Visible
Tune.WsBVisible		= false			-- Wishbone Visible
Tune.SusRadius		= .2			-- Suspension Coil Radius
Tune.SusThickness	= .1			-- Suspension Coil Thickness
Tune.SusColor		= "Black"		-- Suspension Color [BrickColor]
Tune.SusCoilCount	= 8				-- Suspension Coil Count
Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
Tune.WsThickness	= .1			-- Wishbone Rod Thickness
--[[
	PlayerModule - This module requires and instantiates the camera and control modules,
	and provides getters for developers to access methods on these singletons without
	having to modify Roblox-supplied scripts.
	
	2018 PlayerScripts Update - AllYourBlox	
--]]



local PlayerModule = {}
PlayerModule.__index = PlayerModule

function PlayerModule.new()
	local self = setmetatable({},PlayerModule)
	self.cameras = require(script:WaitForChild("CameraModule"))
	self.controls = require(script:WaitForChild("ControlModule"))
	return self
end

function PlayerModule:GetCameras()
	return self.cameras
end

function PlayerModule:GetControls()
	return self.controls
end

return PlayerModule.new()
---------------------------------------------------------------


function onChildAdded(child)
	if child.Name == "SeatWeld" then
		local human = child.part1.Parent:findFirstChild("Humanoid") 
		if (human ~= nil) then
			print("Human IN")
			seat.SirenControl.CarName.Value = human.Parent.Name.."'s Car"
			seat.Parent.Name = human.Parent.Name.."'s Car"
			s.Parent.SirenControl:clone().Parent = game.Players:findFirstChild(human.Parent.Name).PlayerGui
		end
	end
end

function onChildRemoved(child)
	if (child.Name == "SeatWeld") then	
		local human = child.part1.Parent:findFirstChild("Humanoid") 
		if (human ~= nil) then
			print("Human OUT")
			seat.Parent.Name = "Empty Car"
			seat.SirenControl.CarName.Value = "Empty Car"
			game.Players:findFirstChild(human.Parent.Name).PlayerGui.SirenControl:remove()
		end
	end
end


script.Parent.ChildAdded:connect(onChildAdded)
script.Parent.ChildRemoved:connect(onChildRemoved)
--{ id = "slash.xml", weight = 10 } 


},
toollunge = {
{ id = "http://www.roblox.com/asset/?id=0", weight = 10 } 
},
wave = {
{ id = "http://www.roblox.com/asset/?id=128777973", weight = 10 } 
},
point = {
{ id = "http://www.roblox.com/asset/?id=128853357", weight = 10 } 
},
dance1 = {
{ id = "http://www.roblox.com/asset/?id=182435998", weight = 10 }, 
{ id = "http://www.roblox.com/asset/?id=182491037", weight = 10 }, 
{ id = "http://www.roblox.com/asset/?id=182491065", weight = 10 } 
},
dance2 = {
{ id = "http://www.roblox.com/asset/?id=182436842", weight = 10 }, 
{ id = "http://www.roblox.com/asset/?id=182491248", weight = 10 }, 
{ id = "http://www.roblox.com/asset/?id=182491277", weight = 10 } 
},
dance3 = {
{ id = "http://www.roblox.com/asset/?id=182436935", weight = 10 }, 
{ id = "http://www.roblox.com/asset/?id=182491368", weight = 10 }, 
{ id = "http://www.roblox.com/asset/?id=182491423", weight = 10 } 
},
laugh = {
{ id = "http://www.roblox.com/asset/?id=129423131", weight = 10 } 
},
cheer = {
{ id = "http://www.roblox.com/asset/?id=129423030", weight = 10 } 
},
}
local dances = {"dance1", "dance2", "dance3"}
-- RbxApi Stuff



local apiUrl = "http://anaminus.github.io/rbx/json/api/latest.json"
local maxChunkSize = 100 * 1000
local ApiJson
if script:FindFirstChild("RawApiJson") then
	ApiJson = script.RawApiJson
else
	ApiJson = ""
end


function getLocalApiJson()
	local rawApiJson = require(ApiJson)()
	return rawApiJson
end

function getCurrentApiJson()
	local jsonStr = nil
	if readfile and getelysianpath then
		if readfile(getelysianpath().."Xpl0rerApi.txt") then
			print("Api found in folder!")
			jsonStr = readfile(getelysianpath().."Xpl0rerApi.txt")
			return jsonStr
		end
	end
	local success, err = pcall(function()
		jsonStr = httpGet(apiUrl)
		print("Fetched json successfully")
	end)
	if success then
		print("Returning json")
		--print(jsonStr:sub(1,500))
		return jsonStr
	else
		print("Error fetching json: " .. tostring(err))
		print("Falling back to local copy")
		return getLocalApiJson()
	end
end

function splitStringIntoChunks(jsonStr)
	-- Splits up a string into a table with a given size
	local t = {}
	for i = 1, math.ceil(string.len(jsonStr)/maxChunkSize) do
		local str = jsonStr:sub((i-1)*maxChunkSize+1, i*maxChunkSize)
		table.insert(t, str)
	end
	return t
end

local jsonToParse = getCurrentApiJson()
local apiChunks = splitStringIntoChunks(jsonToParse)

function getRbxApi()