Pinkstack/roblox-luau-corpus-text huggingface dataset:
--!nocheck


local Player = game.Players.LocalPlayer
local Character = game.Players.LocalPlayer.Character
local Humanoid = game.Players.LocalPlayer.Character:WaitForChild("Humanoid") :: Humanoid

local ev

local died = false
function death()
	if died then return end
	died = true
	local gs:ModuleScript = game.Players.LocalPlayer.PlayerScripts.Client.ControlScript.Player.GameSettings
	local gs = require(gs) -- ROBLOX SHUT UPI
	gs.lives -= 1
	
	print("death client")
	game.ReplicatedStorage.Remotes.Respawn:FireServer()
	ev:Disconnect()
end

ev = game:GetService("RunService").RenderStepped:Connect(function()
	if Humanoid.Health <= 0 then
		death()
	end
end)
--[[
	Returns a new promise that:
		* is resolved when all input promises resolve
		* is rejected if ANY input promises reject
]]


function Promise.all(promises)
	if type(promises) ~= "table" then
		error("Please pass a list of promises to Promise.all", 2)
	end

	-- If there are no values then return an already resolved promise.
	if #promises == 0 then
		return Promise.resolve({})
	end

	-- We need to check that each value is a promise here so that we can produce
	-- a proper error rather than a rejected promise with our error.
	for i = 1, #promises do
		if not Promise.is(promises[i]) then
			error(("Non-promise value passed into Promise.all at index #%d"):format(i), 2)
		end
	end

	return Promise.new(function(resolve, reject)
		-- An array to contain our resolved values from the given promises.
		local resolvedValues = {}

		-- Keep a count of resolved promises because just checking the resolved
		-- values length wouldn't account for promises that resolve with nil.
		local resolvedCount = 0

		-- Called when a single value is resolved and resolves if all are done.
		local function resolveOne(i, ...)
			resolvedValues[i] = ...
			resolvedCount = resolvedCount + 1

			if resolvedCount == #promises then
				resolve(resolvedValues)
			end
		end

		-- We can assume the values inside `promises` are all promises since we
		-- checked above.
		for i = 1, #promises do
			promises[i]:andThen(
				function(...)
					resolveOne(i, ...)
				end,
				function(...)
					reject(...)
				end
			)
		end
	end)
end
--TODO: add a parameter that instead welds the tool to the HumanoidRootPart.


function AnimateLib.Motor6DFromGrip(tool, rightArm)
	local m = Instance.new("Motor6D");
	m.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0);
	m.C1 = Utils.Math.CFrameFromComponents(tool.GripPos, tool.GripRight, tool.GripUp, -tool.GripForward);
	m.Part0 = rightArm;
	m.Part1 = tool:FindFirstChild('Handle');
	m.Parent = rightArm;
	m.Name = "RightGrip";
	return m;
end
-- Adds a service to this provider only


function ServiceBag:_addServiceType(serviceType)
	if not self._serviceTypesToInitializeSet then
		error(("Already finished initializing, cannot add %q"):format(self:_getServiceName(serviceType)))
		return
	end

	-- Already added
	if self._services[serviceType] then
		return
	end

	-- Construct a new version of this service so we're isolated
	local service = setmetatable({}, { __index = serviceType })
	self._services[serviceType] = service

	self:_ensureInitialization(serviceType)
end

function ServiceBag:_ensureInitialization(serviceType)
	if self._initializedServiceTypeSet[serviceType] then
		return
	end

	if self._initializing then
		self._serviceTypesToInitializeSet[serviceType] = nil
		self._initializedServiceTypeSet[serviceType] = true
		self:_initService(serviceType)
	elseif self._serviceTypesToInitializeSet then
		self._serviceTypesToInitializeSet[serviceType] = true
	else
		local serviceName = self:_getServiceName(serviceType)
		error(string.format("Cannot initialize service %q past initializing phase", serviceName))
	end
end

function ServiceBag:_initService(serviceType)
	local service = assert(self._services[serviceType], "No service")
	local serviceName = self:_getServiceName(serviceType)

	if service.Init then
		local current
		task.spawn(function()
			debug.setmemorycategory(serviceName)
			current = coroutine.running()
			service:Init(self)
		end)

		local isDead = coroutine.status(current) == "dead"
		if not isDead then
			error(("Initializing service %q yielded"):format(serviceName))
		end
	end

	table.insert(self._serviceTypesToStart, serviceType)
end
--Weld stuff here




car.DriveSeat.ChildAdded:connect(function(child)
	if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
		child.C0=CFrame.new(0,-.6,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0)
	end
end)
--h.Health = h.Health - 2


if game.Players:FindFirstChild(hit.Parent.Name) ~= nil then
	local player = game.Players:FindFirstChild(hit.Parent.Name)
	local gui = script.Parent.MaceGui:clone() 
	gui.Parent = player.PlayerGui
	gui.Script.Disabled = false
	end
end
end
script.Parent.Touched:connect(onTouched)
--// Return values: bool filterSuccess, bool resultIsFilterObject, variant result


function methods:InternalApplyRobloxFilterNewAPI(speakerName, message) --// USES FFLAG
	local alwaysRunFilter = false
	local runFilter = RunService:IsServer() -- and not RunService:IsStudio()
	if (alwaysRunFilter or runFilter) then
		local fromSpeaker = self:GetSpeaker(speakerName)
		if fromSpeaker == nil then
			return false, nil, nil
		end
		
		local fromPlayerObj = fromSpeaker:GetPlayer()
		if fromPlayerObj == nil then
			return true, false, message
		end

		local success, filterResult = pcall(function()
			local ts = game:GetService("TextService")
			local result = ts:FilterStringAsync(message, fromPlayerObj.UserId)
			return result
		end)
		if (success) then
			return true, true, filterResult
		else
			warn("Error filtering message:", message)
			self:InternalNotifyFilterIssue()
			return false, nil, nil
		end
	else
		--// Simulate filtering latency.
		task.wait(0.2)
		return true, false, message
	end

	return nil
end

function methods:InternalDoMessageFilter(speakerName, messageObj, channel)
	local filtersIterator = self.FilterMessageFunctions:GetIterator()

	for funcId, func, priority in filtersIterator do
		local success, errorMessage = pcall(function()
			func(speakerName, messageObj, channel)
		end)

		if not success then
			warn(string.format("DoMessageFilter Function '%s' failed for reason: %s", funcId, errorMessage))
		end
	end
end

function methods:InternalDoProcessCommands(speakerName, message, channel)
	local commandsIterator = self.ProcessCommandsFunctions:GetIterator()

	for funcId, func, priority in commandsIterator do
		local success, returnValue = pcall(function()
			local ret = func(speakerName, message, channel)
			if type(ret) ~= "boolean" then
				error("Process command functions must return a bool")
			end
			return ret
		end)

		if not success then
			warn(string.format("DoProcessCommands Function '%s' failed for reason: %s", funcId, returnValue))
		elseif returnValue then
			return true
		end
	end

	return false
end

function methods:InternalGetUniqueMessageId()
	local id = self.MessageIdCounter
	self.MessageIdCounter = id + 1
	return id
end

function methods:InternalAddSpeakerWithPlayerObject(speakerName, playerObj, fireSpeakerAdded)
	if (self.Speakers[speakerName:lower()]) then
		error("Speaker \"" .. speakerName .. "\" already exists!")
	end

	local speaker = Speaker.new(self, speakerName)
	speaker:InternalAssignPlayerObject(playerObj)
	self.Speakers[speakerName:lower()] = speaker

	if fireSpeakerAdded then
		local success, err = pcall(function() self.eSpeakerAdded:Fire(speakerName) end)
		if not success and err then
			print("Error adding speaker: " ..err)
		end
	end

	return speaker
end

function methods:InternalFireSpeakerAdded(speakerName)
	local success, err = pcall(function() self.eSpeakerAdded:Fire(speakerName) end)
	if not success and err then
		print("Error firing speaker added: " ..err)
	end
end
-- Place script in workspace.



print("Cash Leaderboard Loaded")


function onPlayerEntered(newPlayer)

	local stats = Instance.new("IntValue")
	stats.Name = "leaderstats"

	local cash = Instance.new("IntValue")
	cash.Name = "Wins"
	cash.Value = 0

	cash.Parent = stats
	stats.Parent = newPlayer
end



game.Players.ChildAdded:connect(onPlayerEntered)
--2--


script.Parent.Parent.ll2.Transparency = 1
script.Parent.Parent.l2.Transparency = 1
script.Parent.Parent.h2.Transparency = 1
script.Parent.Parent.rr2.Transparency = 1
end

function onClicked()
	
	if isOn == true then off() else on() end

end

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

on()
--[[ Local Functions ]]

--
local function setJumpModule(isEnabled)
	if not isEnabled then
		TouchJumpModule:Disable()
	elseif CurrentControlModule == ControlModules.Thumbpad or CurrentControlModule == ControlModules.Thumbstick or
		CurrentControlModule == ControlModules.Default then
		--
		TouchJumpModule:Enable()
	end
end

local function setClickToMove()
	if DevMovementMode == Enum.DevTouchMovementMode.ClickToMove or DevMovementMode == Enum.DevComputerMovementMode.ClickToMove or
		UserMovementMode == Enum.ComputerMovementMode.ClickToMove or UserMovementMode == Enum.TouchMovementMode.ClickToMove then
		--
		if IsTouchDevice then
			ClickToMoveTouchControls = CurrentControlModule or ControlModules.Default
		end
	else
		if IsTouchDevice and ClickToMoveTouchControls then
			ClickToMoveTouchControls:Disable()
			ClickToMoveTouchControls = nil
		end
	end
end
-- local noColor = printSnapshot.noColor


local printExpected = printSnapshot.printExpected
local printPropertiesAndReceived = printSnapshot.printPropertiesAndReceived
local printReceived = printSnapshot.printReceived
local printSnapshotAndReceived = printSnapshot.printSnapshotAndReceived

local types = require(CurrentModule.types)
type MatchSnapshotConfig = types.MatchSnapshotConfig

local utils = require(CurrentModule.utils)

local _toMatchSnapshot, _toThrowErrorMatchingSnapshot

local DID_NOT_THROW = "Received function did not throw"
local NOT_SNAPSHOT_MATCHERS = "Snapshot matchers cannot be used with " .. BOLD_WEIGHT("never")
--[[
	
	HOW TO USE THIS PLUGIN:
	
	In the body, set all of the lights you want to use as follows:
	
	Li		-indicates the left indicator
	Ri		-indicates the right indicator
	
	HLL		-indicates the low beam headlights
	HLH		-indicates the high beam headlights
	
	BL		-indicates the brake light
	RRL		-indicates the rer running light
	
	RevL	-indicates the reverse light
	
	You can name multiple parts as any of the above.
		
]]

--
-- Captions


function Icon:setCaption(text)
	assert(typeof(text) == "string" or text == nil, "Expected string, got "..typeof(text))
	self.captionText = text
	self.instances.captionLabel.Text = text
	self.instances.captionContainer.Parent = (text and activeItems) or self.instances.iconContainer
	self:_updateIconSize(nil, self:getToggleState())
	if self.hovering then
		self:_displayCaption(true)
	end
	return self
end

function Icon:_displayCaption(visibility)
	local newVisibility = visibility
	if self.captionText == nil then
		return
	elseif userInputService.TouchEnabled and not self._draggingFinger then
		return
	end
	local yOffset = 8
	if self._draggingFinger then
		yOffset = yOffset + THUMB_OFFSET
	end
	local iconContainer = self.instances.iconContainer
	local captionContainer = self.instances.captionContainer
	local newPos = UDim2.new(0, iconContainer.AbsolutePosition.X+iconContainer.AbsoluteSize.X/2-captionContainer.AbsoluteSize.X/2, 0, iconContainer.AbsolutePosition.Y+(iconContainer.AbsoluteSize.Y*2)+yOffset)
	captionContainer.Position = newPos
	-- Change transparency of relavent caption instances
	for _, settingName in pairs(self._uniqueSettings.caption) do
		self:_update(settingName)
	end
end
-- Get the policy info for the user


local success, result = pcall(PolicyService.GetPolicyInfoForPlayerAsync, PolicyService, player)
if success and result then
	if not result.AreAdsAllowed then
		-- Destroy all Main Portal Template instances on the user's client if ads are not allowed
		mainPortal:Destroy()
	end
else
	print("Failed to get policy for player", player.Name, "Exception:", result)
end
-----------------
--| Variables |--
-----------------



local DebrisService = Game:GetService('Debris')
local PlayersService = Game:GetService('Players')

local MyPlayer = PlayersService.LocalPlayer

local Tool = script.Parent
local ToolHandle = Tool.Handle

local RocketScript = script:WaitForChild('Rocket')
local SwooshSound = script:WaitForChild('Swoosh')
local BoomSound = script:WaitForChild('Boom')
--[=[
	@within Gamepad
	@prop ButtonDown Signal<(button: Enum.KeyCode, processed: boolean)>
	@readonly
	The ButtonDown signal fires when a gamepad button is pressed
	down. The pressed KeyCode is passed to the signal, along with
	whether or not the event was processed.

	```lua
	gamepad.ButtonDown:Connect(function(button: Enum.KeyCode, processed: boolean)
		print("Button down", button, processed)
	end)
	```
]=]
--Weld stuff here




car.DriveSeat.ChildAdded:connect(function(child)
	if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
		child.C0=CFrame.new(0,-.5,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0)*CFrame.Angles(math.rad(13),0,0)
	end
end)
-- Lights


MakeWeld(car.Misc.HighRiser.H1.B1,car.Misc.HighRiser.H1.bracket1)
MakeWeld(car.Misc.HighRiser.H1.B2,car.Misc.HighRiser.H1.bracket1)
MakeWeld(car.Misc.HighRiser.H1.B3,car.Misc.HighRiser.H1.bracket1)
MakeWeld(car.Misc.HighRiser.H1.B4,car.Misc.HighRiser.H1.bracket1)
MakeWeld(car.Misc.HighRiser.H1.F1,car.Misc.HighRiser.H1.bracket1)
MakeWeld(car.Misc.HighRiser.H1.F2,car.Misc.HighRiser.H1.bracket1)
MakeWeld(car.Misc.HighRiser.H1.F3,car.Misc.HighRiser.H1.bracket1)

MakeWeld(car.Misc.HighRiser.H2.B1,car.Misc.HighRiser.H2.bracket2)
MakeWeld(car.Misc.HighRiser.H2.B2,car.Misc.HighRiser.H2.bracket2)
MakeWeld(car.Misc.HighRiser.H2.B3,car.Misc.HighRiser.H2.bracket2)
MakeWeld(car.Misc.HighRiser.H2.B4,car.Misc.HighRiser.H2.bracket2)
MakeWeld(car.Misc.HighRiser.H2.F1,car.Misc.HighRiser.H2.bracket2)
MakeWeld(car.Misc.HighRiser.H2.F2,car.Misc.HighRiser.H2.bracket2)
MakeWeld(car.Misc.HighRiser.H2.F3,car.Misc.HighRiser.H2.bracket2)
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 120		--	[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)
-- << API >>


function hd:GetRankName(rankId)
	return(main:GetModule("cf"):GetRankName(rankId))
end

function hd:GetRankId(rankName)
	return(main:GetModule("cf"):GetRankId(rankName))
end

function hd:Notice(player, message)
	if main.player then
		if message then
			main:GetModule("Notices"):Notice("Notice", "Game Notice", message)
		end
	else
		main:GetModule("cf"):Notice(player, "Game Notice", message)
	end
end

function hd:Error(player, message)
	if main.player then
		if message then
			main:GetModule("Notices"):Notice("Error", "Game Notice", message)
		end
	else
		main.signals.Error:FireClient(player, {"Game Notice", message})
	end
end




return hd
-- Compare two strings character-by-character.
-- Format as comparison lines in which changed substrings have inverse colors.


local function diffStringsUnified(a: string, b: string, options: DiffOptions?): string
	if a ~= b and #a ~= 0 and #b ~= 0 then
		local isMultiline = a:find("\n") ~= nil or b:find("\n") ~= nil

		-- getAlignedDiffs assumes that a newline was appended to the strings.
		local diffs = diffStringsRaw(
			isMultiline and a .. "\n" or a,
			isMultiline and b .. "\n" or b,
			true -- cleanupSemantic
		)

		if hasCommonDiff(diffs, isMultiline) then
			local optionsNormalized = normalizeDiffOptions(options)
			local lines = getAlignedDiffs(diffs, optionsNormalized.changeColor)
			return printDiffLines(lines, optionsNormalized)
		end
	end

	-- Fall back to line-by-line diff.
	return diffLinesUnified(a:split("\n"), b:split("\n"), options)
end
--[[
	Wrapper component that provides the ConfigurationContext to the child components.
]]


local ConfigurationProvider = Roact.Component:extend("ConfigurationProvider")
function ConfigurationProvider:init()
	assert(
		typeof(self.props.config) == "table",
		"ConfigurationContext requires the `config` prop to be an instance of Configuration"
	)

	self.state = self.props.config.getValues()
	self:_connectUpdateEvent()
end

function ConfigurationProvider:render()
	return Roact.createElement(context.Provider, {
		value = self.state,
	}, self.props[Roact.Children])
end

function ConfigurationProvider:didMount()
	self:_connectUpdateEvent()
end

function ConfigurationProvider:willUnmount()
	if self.changedConn then
		self.changedConn:Disconnect()
		self.changedConn = nil
	end
end
--[[ Constants ]]

--
local movementKeys = {
	[Enum.KeyCode.W] = true;
	[Enum.KeyCode.A] = true;
	[Enum.KeyCode.S] = true;
	[Enum.KeyCode.D] = true;
	[Enum.KeyCode.Up] = true;
	[Enum.KeyCode.Down] = true;
}

local FFlagUserNavigationClickToMoveSkipPassedWaypointsSuccess, FFlagUserNavigationClickToMoveSkipPassedWaypointsResult = pcall(function() return UserSettings():IsUserFeatureEnabled("UserNavigationClickToMoveSkipPassedWaypoints") end)
local FFlagUserNavigationClickToMoveSkipPassedWaypoints = FFlagUserNavigationClickToMoveSkipPassedWaypointsSuccess and FFlagUserNavigationClickToMoveSkipPassedWaypointsResult
local FFlagUserClickToMoveFollowPathRefactorSuccess, FFlagUserClickToMoveFollowPathRefactorResult = pcall(function() return UserSettings():IsUserFeatureEnabled("UserClickToMoveFollowPathRefactor") end)
local FFlagUserClickToMoveFollowPathRefactor = FFlagUserClickToMoveFollowPathRefactorSuccess and FFlagUserClickToMoveFollowPathRefactorResult

local Player = Players.LocalPlayer

local ClickToMoveDisplay = require(script.Parent:WaitForChild("ClickToMoveDisplay"))

local ZERO_VECTOR3 = Vector3.new(0,0,0)
local ALMOST_ZERO = 0.000001
--///////////////////////// Constructors
--//////////////////////////////////////



function module.new()
	local obj = setmetatable({}, methods)
	obj.Destroyed = false

	local BaseFrame, Scroller, Layout = CreateGuiObjects()
	obj.GuiObject = BaseFrame
	obj.Scroller = Scroller
	obj.Layout = Layout

	obj.MessageObjectLog = {}

	obj.Name = "MessageLogDisplay"
	obj.GuiObject.Name = "Frame_" .. obj.Name

	obj.CurrentChannelName = ""

	obj.GuiObject:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
		spawn(function() obj:ReorderAllMessages() end)
	end)

	local wasScrolledDown = true

	obj.Layout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
		local size = obj.Layout.AbsoluteContentSize
		obj.Scroller.CanvasSize = UDim2.new(0, 0, 0, size.Y)
		if wasScrolledDown then
			local windowSize = obj.Scroller.AbsoluteWindowSize
			obj.Scroller.CanvasPosition = Vector2.new(0, size.Y - windowSize.Y)
		end
	end)

	obj.Scroller:GetPropertyChangedSignal("CanvasPosition"):Connect(function()
		wasScrolledDown = obj:IsScrolledDown()
	end)

	return obj
end

return module
--[[
	Keeps track of a single surface canvas. Manages all of the spots in a single canvas as well.
]]


local HttpService = game:GetService("HttpService")
local constants = require(script.Parent.Parent.Constants)

local Canvas = {}
Canvas.__index = Canvas

function Canvas.new()
	local self = {
		id = HttpService:GenerateGUID(false),

		-- Table list of all spots in the canvas
		spots = {},

		-- RNG instance to be injected
		rng = Random.new(),
	}

	setmetatable(self, Canvas)

	return self
end
--script.Parent.PP.Velocity = script.Parent.PP.CFrame.lookVector *script.Parent.Speed.Value
--script.Parent.PPP.Velocity = script.Parent.PPP.CFrame.lookVector *script.Parent.Speed.Value


script.Parent.PPPP.Velocity = script.Parent.PPPP.CFrame.lookVector *script.Parent.Speed.Value
script.Parent.Q.Velocity = script.Parent.Q.CFrame.lookVector *script.Parent.Speed.Value
-- Done Thank God. DO NOT GROUP WITH THE MODEL!



local everything = {model}
local names = {model}

local children = game.Workspace:children()
for i=1,#children do
	if (children[i].Name == "Plane") then -- Replace Model Wiht Your Models's name!
		table.insert(everything, children[i]:clone())
		table.insert(names, children[i].Name)
	end
end


function regen()
	for i=1,#everything do
		game.Workspace:findFirstChild(names[i]):remove() -- Dont mess with this!
		new_thing = everything[i]:clone()
		new_thing.Parent = game.Workspace
		new_thing:makeJoints()
	end
end

function onTouched(hit)
	local humanoid = hit.Parent:findFirstChild("Humanoid") -- OK were done!
	if humanoid~=nil and debounce == false then
		debounce = true
		
		script.Parent.BrickColor = BrickColor.new(26)

		regen()
		wait(10)-- This Is what u change to make how long it takes before it can be Reused. This Is in seconds.


		script.Parent.BrickColor = BrickColor.new(104)


		debounce = false
	end
end


script.Parent.Touched:connect(onTouched)
-- Script by Tonitoni. Model link: http://www.roblox.com/Max-Zoom-Distance-script-item?id=160640387
-- v.1.1 June 7th 2015



game.Players.PlayerAdded:connect(function(player)
	wait(0.5) --Players report the script didn't work. Adding this should resolve the issue.
	player.CameraMaxZoomDistance = 11 -- Change this to change zoom distance
end)
-- Returns the subject position the FpsCamera
-- wants Roblox's camera to be using right now.



function FpsCamera:GetSubjectPosition(...)
	if self:IsInFirstPerson() then
		local camera = workspace.CurrentCamera
		local subject = camera.CameraSubject
		
		if subject and subject:IsA("Humanoid") and subject.Health > 0 then
			local character = subject.Parent
			local head = character and character:FindFirstChild("Head")
			
			if head and head:IsA("BasePart") then
				local cf = head.CFrame
				local offset = cf * CFrame.new(0, head.Size.Y / 3, 0)
				
				return offset.Position, cf.LookVector
			end
		end
	end
	
	return self:GetBaseSubjectPosition(...)
end
-- 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=true;				-- Enables the custom bubble chat
-- Commas
-- InstanceName / Kye
-- November 8, 2020



local Commas = {}

function Commas:Add(str)
	str = tostring(str)

	return #str % 3 == 0 and str:reverse():gsub("(%d%d%d)", "%1,"):reverse():sub(2)
		or str:reverse():gsub("(%d%d%d)", "%1,"):reverse()
end

function Commas:Remove(str)
	if tonumber(str) then
		return str
	end

	for a = 1, #str do
		if string.sub(str, a, a) == "," then
			str = string.sub(str, 1, a - 1) .. string.sub(str, a + 1, #str)
		end
	end

	return str
end

return Commas
-- NOTE: This function is radically different from the engine's implementation


local walkVelocityVector = Vector3_new(1,1,1)
local function calcDesiredWalkVelocity()
	-- TEMP
	return walkVelocityVector
end

local function preStepSimulatorSide(dt)
	if getAutoJump() and enableAutoJump() then
		local desiredWalkVelocity = calcDesiredWalkVelocity();
		if (not vec3IsZero(desiredWalkVelocity)) then
			doAutoJump();
		end
	end
end

local function AutoJumper()
	local this = {}
	local running = false
	local runRoutine = nil

	function this:Run()
		running = true
		local thisRoutine = nil
		thisRoutine = coroutine.create(function()
			while running and thisRoutine == runRoutine do
				this:Step()
				wait()
			end
		end)
		runRoutine = thisRoutine
		coroutine.resume(thisRoutine)
	end

	function this:Stop()
		running = false
	end

	function this:Step()
		preStepSimulatorSide()
	end

	return this
end