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




local PathDisplay = {}
PathDisplay.spacing = 8
PathDisplay.image = "rbxasset://textures/Cursors/Gamepad/Pointer.png"
PathDisplay.imageSize = Vector2.new(2, 2)

local currentPoints = {}
local renderedPoints = {}

local pointModel = Instance.new("Model")
pointModel.Name = "PathDisplayPoints"

local adorneePart = Instance.new("Part")
adorneePart.Anchored = true
adorneePart.CanCollide = false
adorneePart.Transparency = 1
adorneePart.Name = "PathDisplayAdornee"
adorneePart.CFrame = CFrame.new(0, 0, 0)
adorneePart.Parent = pointModel

local pointPool = {}
local poolTop = 30
for i = 1, poolTop do
	local point = Instance.new("ImageHandleAdornment")
	point.Archivable = false
	point.Adornee = adorneePart
	point.Image = PathDisplay.image
	point.Size = PathDisplay.imageSize
	pointPool[i] = point
end

local function retrieveFromPool(): ImageHandleAdornment?
	local point = pointPool[1]
	if not point then
		return nil
	end

	pointPool[1], pointPool[poolTop] = pointPool[poolTop], nil
	poolTop = poolTop - 1
	return point
end

local function returnToPool(point: ImageHandleAdornment)
	poolTop = poolTop + 1
	pointPool[poolTop] = point
end

local function renderPoint(point: Vector3, isLast): ImageHandleAdornment?
	if poolTop == 0 then
		return nil
	end

	local rayDown = Ray.new(point + Vector3.new(0, 2, 0), Vector3.new(0, -8, 0))
	local hitPart, hitPoint, hitNormal = workspace:FindPartOnRayWithIgnoreList(rayDown, { (game.Players.LocalPlayer :: Player).Character :: Model, workspace.CurrentCamera :: Camera })
	if not hitPart then
		return nil
	end

	local pointCFrame = CFrame.new(hitPoint, hitPoint + hitNormal)

	local point = retrieveFromPool()
	point.CFrame = pointCFrame
	point.Parent = pointModel
	return point
end

function PathDisplay.setCurrentPoints(points)
	if typeof(points) == 'table' then
		currentPoints = points
	else
		currentPoints = {}
	end
end

function PathDisplay.clearRenderedPath()
	for _, oldPoint in ipairs(renderedPoints) do
		oldPoint.Parent = nil
		returnToPool(oldPoint)
	end
	renderedPoints = {}
	pointModel.Parent = nil
end

function PathDisplay.renderPath()
	PathDisplay.clearRenderedPath()
	if not currentPoints or #currentPoints == 0 then
		return
	end

	local currentIdx = #currentPoints
	local lastPos = currentPoints[currentIdx]
	local distanceBudget = 0

	renderedPoints[1] = renderPoint(lastPos, true)
	if not renderedPoints[1] then
		return
	end

	while true do
		local currentPoint = currentPoints[currentIdx]
		local nextPoint = currentPoints[currentIdx - 1]

		if currentIdx < 2 then
			break
		else

			local toNextPoint = nextPoint - currentPoint
			local distToNextPoint = toNextPoint.magnitude

			if distanceBudget > distToNextPoint then
				distanceBudget = distanceBudget - distToNextPoint
				currentIdx = currentIdx - 1
			else
				local dirToNextPoint = toNextPoint.unit
				local pointPos = currentPoint + (dirToNextPoint * distanceBudget)
				local point = renderPoint(pointPos, false)

				if point then
					renderedPoints[#renderedPoints + 1] = point
				end

				distanceBudget = distanceBudget + PathDisplay.spacing
			end
		end
	end

	pointModel.Parent = workspace.CurrentCamera
end

return PathDisplay
-- Import all child modules into Enums


for _, module in pairs( script:GetChildren() ) do
    if ( not module:IsA("ModuleScript") ) then return end
    assert( (not Enums[module.Name]), string.format("%s.%s already exists!", script:GetFullName(), module.Name) )

    local requiredModule = require( module )
    assert( typeof(requiredModule)  == "table", "Enums expects modules to return a table, got" .. type(requiredModule) )

    Enums[ module.Name ] = CustomEnum.new( module.Name, requiredModule )
end
--tone hz


elseif sv.Value==2 then
while s.Pitch<0.67 do
s.Pitch=s.Pitch+0.010
s:Play()
if s.Pitch>0.67 then
	s.Pitch=0.67
end
wait(-9)
end

while true do
for x = 1, 500 do
s:play()
wait(-9)
end
wait()
end
--//Transmission//--


AmountOfGears = 7 --{Max of 8 gears}
TransmissionType = "Automatic" --{HPattern, Automatic, DualClutch, CVT}
Drivetrain = "RWD" --{RWD, FWD, AWD}
TorqueSplit = 70 --{Split to the rear wheels}
DifferentialF = 0 --{0 = Open, 1 = locked}
DifferentialR = 0.6 --{0 = Open, 1 = locked}

Gear1 = 4.60
Gear2 = 2.72
Gear3 = 1.86
Gear4 = 1.46
Gear5 = 1.23
Gear6 = 1.00
Gear7 = 0.82
Gear8 = 0.69

FinalDrive = 2.937

EngineIdle = 600
EngineRedline = 6800
--!strict


local findOr = require(script.Parent.findOr)
local slice = require(script.Parent.slice)

local LuauPolyfill = script.Parent.Parent
local types = require(LuauPolyfill.types)
type Array<T> = types.Array<T>
local MAX_SAFE_INTEGER = require(LuauPolyfill.Number).MAX_SAFE_INTEGER

type Pattern = string | Array<string>

local function split(str: string, _pattern: Pattern?, _limit: number?): Array<string>
	if _pattern == nil then
		return { str }
	end
	if _limit == 0 then
		return {}
	end
	local limit = if _limit == nil or _limit < 0 then MAX_SAFE_INTEGER else _limit
	local pattern = _pattern
	local patternList: Array<string>
	if typeof(pattern) == "string" then
		if pattern == "" then
			local result = {}
			for c in str:gmatch(".") do
				table.insert(result, c)
			end
			return result
		end
		patternList = { pattern }
	else
		patternList = pattern :: Array<string>
	end
	local init = 1
	local result = {}
	local lastMatch
	local strLen, invalidBytePosition = utf8.len(str)
	assert(strLen ~= nil, ("string `%s` has an invalid byte at position %s"):format(str, tostring(invalidBytePosition)))

	repeat
		local match = findOr(str, patternList, init)
		if match ~= nil then
			table.insert(result, slice(str, init, match.index))
			local matchLength = utf8.len(match.match)
			-- Luau FIXME? Luau doesn't understand that str has already been shown to be valid utf8 on line 26 and therefore won't be nil
			init = match.index + matchLength :: number
		else
			table.insert(result, slice(str, init, nil))
		end
		if match ~= nil then
			lastMatch = match
		end
	until match == nil or init > strLen or #result >= limit
	if lastMatch ~= nil then
		local lastMatchLength, invalidBytePosition_ = utf8.len(lastMatch.match)
		assert(
			lastMatchLength ~= nil,
			("string `%s` has an invalid byte at position %s"):format(lastMatch.match, tostring(invalidBytePosition_))
		)
		if lastMatch.index + lastMatchLength == strLen + 1 then
			table.insert(result, "")
		end
	end
	return result
end

return split
-------------------------------------------


local weld2 = Instance.new("Weld")
weld2.Part0 = torso
weld2.Parent = torso
weld2.Part1 = arms[2]
weld2.C1 = CFrame.new(0.5, 3,-0.4) * CFrame.fromEulerAnglesXYZ(math.rad(90),0.1,0.1)
arms[2].Name = "RDave"
arms[2].CanCollide = true
welds[2] = weld2
----------------------------------------------------------------------------------------------------
------------------=[ Status UI ]=-------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,EnableStatusUI = true				--- Don't disabled it...
	,RunWalkSpeed = 22
	,NormalWalkSpeed = 16
	,SlowPaceWalkSpeed = 8	
	,CrouchWalkSpeed = 8
	,ProneWalksSpeed = 4

	,EnableHunger = true				--- Hunger and Thirst system
	,HungerWaitTime = 25

	,CanDrown = true 					--- Welp.. That's it
	
	,EnableStamina = true 				--- Weapon Sway based on stamina	
	,RunValue = 1						--- Stamina consumption
	,StandRecover = .25					--- Stamina recovery while stading
	,CrouchRecover = .5					--- Stamina recovery while crouching
	,ProneRecover = 1					--- Stamina recovery while lying

	,EnableGPS = false					--- GPS shows your allies around you
	,GPSdistance = 150

	,InteractionMenuKey = Enum.KeyCode.LeftControl
----------do not edit anything below this line


local function createMessageOnClient(msg)
	game.StarterGui:SetCore("ChatMakeSystemMessage", {
		Text = msg;
		Font = Enum.Font.SourceSansBold;
		Color = sm;
		FontSize = Enum.FontSize.Size18;
	})
end

if welcomeMessageOn then
	createMessageOnClient(welcomeMessage)
end

if displayJoinMessage then
	createMessageOnClient(game:GetService("Players").LocalPlayer.Name..joinMessage)
	game:GetService('Players').PlayerAdded:Connect(function(plr)
		createMessageOnClient(plr.Name..joinMessage)
	end)
end

if displayLeaveMessage then
	game:GetService('Players').PlayerRemoving:Connect(function(plr)
		createMessageOnClient(plr.Name..leftMessage)
	end)
end
--[[Transmission]]


	Tune.TransModes		= {"Semi"}								--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch
		
		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}								
		>First mode is default mode													]]
	
	--Automatic Settings
	Tune.AutoShiftMode	= "Speed"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]	
	Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)
	
	--Gear Ratios
	Tune.FinalDrive		= 4.06			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	4		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		4		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		2.5		,
		--[[ 3 ]]		1.75		
	}
	Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-- dayLength defines how long, in minutes, a day in your game is. Feel free to alter it.


local dayLength = 1

local cycleTime = dayLength*16
local minutesInADay = 24*60

local lighting = game:GetService("Lighting")

local startTime = tick() - (lighting:getMinutesAfterMidnight() / minutesInADay)*cycleTime
local endTime = startTime + cycleTime

local timeRatio = minutesInADay / cycleTime

if dayLength == 0 then
	dayLength = 1
end

repeat
	local currentTime = tick()
	
	if currentTime > endTime then
		startTime = endTime
		endTime = startTime + cycleTime
	end
	
	lighting:setMinutesAfterMidnight((currentTime - startTime)*timeRatio)
	wait(1/15)
until false
------------------------------------------


gui.Track.Text = radio.TName.Value
radio.TName.Changed:connect(function()
	gui.Track.Text = radio.TName.Value
end)
gui.Stop.MouseButton1Click:connect(function()
	if radio.Stopped.Value == false then
		radio.Stopped.Value = true
	end
end)
gui.Pause.MouseButton1Click:connect(function()
	if radio.Paused.Value == false and radio.Stopped.Value == false then
		radio.Paused.Value = true
	end
end)
gui.Play.MouseButton1Click:connect(function()
	if radio.Stopped.Value == true then
		radio.Play.Value = not radio.Play.Value
	else
		if radio.Paused.Value == true then
			radio.Paused.Value = false
		end
	end
end)
gui.Forward.MouseButton1Click:connect(function()
	local n = radio.Track.Value+1
	if n>#radio.Songs:GetChildren() then
		n = 1
	end
	radio.Track.Value = n
end)
gui.Back.MouseButton1Click:connect(function()
	local n = radio.Track.Value-1
	if n<=0 then
		n = #radio.Songs:GetChildren()
	end
	radio.Track.Value = n
end)
gui.AutoplayOn.MouseButton1Click:connect(function()
	if radio.Autoplay.Value == true then
		radio.Autoplay.Value = false
	end
end)
gui.AutoplayOff.MouseButton1Click:connect(function()
	if radio.Autoplay.Value == false then
		radio.Autoplay.Value = true
	end
end)
gui.List.MouseButton1Click:connect(function()
	gui.Menu.Visible=not gui.Menu.Visible
end)
gui.Id.MouseButton1Click:connect(function()
	gui.IdPlayer.Visible=not gui.IdPlayer.Visible
	if gui.IdPlayer.Visible then gui.Id.Rotation=180 else gui.Id.Rotation=0 end
end)
gui.IdPlayer.Play.MouseButton1Click:connect(function()
	if radio.IdPlay.Value==gui.IdPlayer.TextBox.Text then
		radio.IdPlay.Value=""
	wait()
	end
	radio.IdPlay.Value=gui.IdPlayer.TextBox.Text
end)
for i,v in pairs(gui.Menu:GetChildren()) do
	v.MouseButton1Click:connect(function()
		radio.Track.Value = i
	end)
end
function Stopped()
	if radio.Stopped.Value == true then
		gui.Pause.Visible = false
		gui.Play.Visible = true
	else
		gui.Play.Visible = false
		gui.Pause.Visible = true
	end
end
function Paused()
	if radio.Paused.Value == true then
		gui.Pause.Visible = false
		gui.Play.Visible = true
	else
		if radio.Stopped.Value == false then
			gui.Play.Visible = false
			gui.Pause.Visible = true
		end
	end
end
function Autoplay()
	if radio.Autoplay.Value == true then
		gui.AutoplayOff.Visible = false
		gui.AutoplayOn.Visible = true
	else
		gui.AutoplayOn.Visible = false
		gui.AutoplayOff.Visible = true
	end
end
radio.Stopped.Changed:connect(Stopped)
radio.Paused.Changed:connect(Paused)
radio.Autoplay.Changed:connect(Autoplay)
Stopped()
Paused()
Autoplay()
while wait(.5) do
	if seat:FindFirstChild("SeatWeld") == nil then
		script.Parent:Destroy()
	end
end
--Copy the following code from line #3-39 and paste it in the command bar. Then press enter.



local function regionPaintPart(p, yC, padding)
	--[[each part is divided into smaller regions (each with a size of 4x4 studs) since some parts are rotated and regions cant be rotated]]
	padding = padding or 0
	local s = p.Size+Vector3.new(padding*2,0,padding*2)
	for x=1, s.X/3 do
		for z=1, s.Z/3 do
			if ((z+x)%200)==0 then
				wait()
			end
			local p2c = CFrame.new(p.CFrame:PointToWorldSpace(Vector3.new(x*3,yC,z*3)-Vector3.new(s.X/2,0,s.Z/2)))
			local p2s = Vector3.new(5,5,5)
			local r = Region3.new(p2c:PointToWorldSpace(-Vector3.new(p2s.X/2,5,p2s.Z/2)), p2c:PointToWorldSpace(Vector3.new(p2s.X/2,5,p2s.Z/2)))
			workspace.Terrain:ReplaceMaterial(r:ExpandToGrid(4) ,4,Enum.Material.Grass, Enum.Material.LeafyGrass)
		end
	end
end

local function FixGrassPart(p, pad)
	regionPaintPart(p, 0, pad)
end

local function FixAllGrassParts(pad)
	for _, v in pairs(workspace:GetDescendants()) do
		if v:IsA("BasePart") and not v:IsA("MeshPart") and not v:IsA("Terrain") and v.Size.Y < 10 then
			print(v)
			if (_%100)==0 then
				wait() --[[Waits every 100 parts so it doesn't freeze studio]]
			end
			FixGrassPart(v, pad)
		end
	end
	print('FINISHED')
end

wait()

FixAllGrassParts(2)
-- obtain goals based on Center part


center.BodyPosition.position = beacon.Center.Position
teamColor = center.Color
vel = center.BodyVelocity

healerIsResting = false

function restHealer()
	healerIsResting = true
	wait(5)
	healerIsResting = false
end

function joinTeam(humanoid)
	local team = Instance.new("Color3Value")
	team.Value = teamColor
	team.Name = "Team"
	team.Parent = humanoid
	humanoid.Torso.Color = teamColor
	humanoid.Torso.Reflectance = 0.2
	humanoid.LeftLeg.Color = teamColor
	humanoid.LeftLeg.Reflectance = 0.2
	humanoid.RightLeg.Color = teamColor
	humanoid.RightLeg.Reflectance = 0.2
end

function onTouchHumanoid(humanoid)
	local team = humanoid:findFirstChild("Team", false)
	if team==nil then
		joinTeam(humanoid)
	elseif team.Value~=teamColor then
		-- Harm the enemy!
		humanoid.Health = 0
		return
	end
	
	if not healerIsResting then
		-- Heal the player
		humanoid.Health = humanoid.Health + 50
		coroutine.resume(coroutine.create(restHealer))
	end
end

goingUp = false
function goUp(speed)
	if goingUp then
		return
	end
	goingUp = true
	vel.velocity = Vector3.new(0,speed,0)
	wait(20/speed)
	vel.velocity = Vector3.new(0,-2,0)
	goingUp = false
end

function onTouch(touchedPart)
	-- see if a character touched it
	local parent = touchedPart.Parent
		if parent~=nill then
		local humanoid = parent:findFirstChild("Humanoid", false);
		if humanoid ~= nill then
			onTouchHumanoid(humanoid)
			goUp(10)
			return
		end
	end

	-- change direction
	if touchedPart.Position.y > beacon.Center.Position.y then
		vel.velocity = Vector3.new(0,-2,0)
		goingUp = false
	elseif touchedPart.Position.y < beacon.Center.Position.y then
		goUp(2)
	end
end

function connectPart(part)
	part.Color = teamColor
	part.Touched:connect(onTouch)
end
-- ROBLOX deviation: we're using the TypeScript definition here, which is more strict


export type ReactElement<P = Object, T = any> = {
	["$$typeof"]: number,

	-- ROBLOX FIXME Luau: Luau has some trouble and inlining the type param from createElement doesn't help
	type: React_StatelessFunctionalComponent<P> | React_ComponentType<P> | string,
	-- type: T,
	key: Key | nil,
	ref: any,
	props: P,

	-- ROBLOX deviation: upstream has this as interface, which is extensible, Luau types are closed by default
	-- ReactFiber
	_owner: any,

	-- __DEV__
	_store: any?,
	_self: React_Element<any>?,
	_shadowChildren: any?,
	_source: Source?,
}
-- ScreenSpace -> WorldSpace. Taking a screen width, and a depth to put an object
-- at, and returning a size of how big that object has to be to appear that size
-- at that depth.


function ScreenSpace.ScreenToWorldByWidthDepth(x, y, screenWidth, depth)
	local aspectRatio = ScreenSpace.AspectRatio()
	local hfactor = math.tan(math.rad(workspace.CurrentCamera.FieldOfView)/2)
	local wfactor = aspectRatio*hfactor
	local sx, sy = ScreenSpace.ViewSizeX(), ScreenSpace.ViewSizeY()
	--
	local worldWidth = (screenWidth/sx) * 2 * -wfactor * depth
	--
	local xf, yf = x/sx*2 - 1, y/sy*2 - 1
	local xpos = xf * -wfactor * depth
	local ypos = yf *  hfactor * depth
	--
	return Vector3.new(xpos, ypos, depth), worldWidth
end
--[[for x = 1, 50 do
s.Pitch = s.Pitch + 0.02
s:play()
wait(0.001)
end]]


for x = 50, 120 do
s:play()
wait(0.001)
end
for x = 50, 120 do
s.Pitch = s.Pitch - 0.0020
s:play()
wait(0.001)
end
wait()
end
--// lighting


local lg = game:GetService("Lighting")
local bm = lg:FindFirstChild("Bloom")
local sr = lg:FindFirstChild("SunRays")
local bl = lg:FindFirstChild("Blur")
local cc = lg:FindFirstChild("ColorCorrection")

bf.Text = "ALLOWED" -- set the state of the play jump

if bf.Text == "DISABLED" then
	bf.BackgroundColor3 = Color3.new(1, 0, 0)
	bm.Enabled = false
	sr.Enabled = false
	bl.Enabled = false
	cc.Enabled = false
end
if bf.Text == "ALLOWED" then
	bf.BackgroundColor3 = Color3.new(0, 1, 0)
	bm.Enabled = true
	sr.Enabled = true
	bl.Enabled = true
	cc.Enabled = true
end

bf.MouseButton1Click:Connect(function()
	if bf.Text == "ALLOWED" then
		bf.Text = "DISABLED"
		-- custom command
		bf.BackgroundColor3 = Color3.new(1, 0, 0)
		bm.Enabled = false
		sr.Enabled = false
		bl.Enabled = false
		cc.Enabled = false
	elseif bf.Text == "DISABLED" then
		bf.Text = "ALLOWED"	
		-- custom command #2
		bf.BackgroundColor3 = Color3.new(0, 1, 0)
		bm.Enabled = true
		sr.Enabled = true
		bl.Enabled = true
		cc.Enabled = true
	end
end)
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 220		--	[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)
--[=[
	If these is data not yet written then this will return true
	@return boolean
]=]


function DataStoreStage:HasWritableData()
	if self._dataToSave then
		return true
	end

	for name, store in pairs(self._stores) do
		if not store.Destroy then
			warn(("[DataStoreStage] - Substore %q destroyed"):format(name))
			continue
		end

		if store:HasWritableData() then
			return true
		end
	end

	return false
end
--[[ if your changing the DataStore name from LB 
		to anything else you should change it 
		inside the LeaderboardHandler too
	]]

--
local leaderboardDS =  ds:GetOrderedDataStore("LB")


players.PlayerAdded:Connect(function(plr)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = plr
	
	local Cash = Instance.new("NumberValue")
	Cash.Name = "Clicks"
	Cash.Parent = leaderstats
	
	local Gems = Instance.new("NumberValue")
	Gems.Name = "Gems"
	Gems.Parent = leaderstats
	
	local Rebirths = Instance.new("NumberValue")
	Rebirths.Name = "Rebirths"
	Rebirths.Parent = leaderstats
	
end)


while true do
	
	for i , v in pairs(players:GetPlayers()) do
		local succ , errmsg = pcall(function()
			-- saving the Coins value with the player's userid as the key
			leaderboardDS:SetAsync(v.UserId , v.leaderstats.Rebirths.Value)
		end)
	end	
	-- recommend waiting for a longer time
	task.wait(10)
end
--weldconstrain


function module.weldconstrain(base, part, tim)
	part.Anchored = false
	
	local weld = Instance.new("WeldConstraint")
	weld.Parent = base
	weld.Part0 = part
	weld.Part1 = base
	
	
	game.Debris:AddItem(weld, tim)
end

function module.w_weld(base, target, tim, cf1)
	local w = Instance.new("Weld") 
	w.Parent = target
	w.Part0 = target 
	w.Part1 = base 

	local cf0 = target.CFrame 
	local cf1 = cf1 or CFrame.new(0,10,0) * CFrame.Angles(0,math.rad(45),0) 

	w.C0 = cf0:Inverse() 
	w.C1 = cf1:Inverse() 
	
	game.Debris:AddItem(w, tim)
end
return module
--> Connections
---[[


character.ChildAdded:Connect(function(newChild)
	if CollectionService:HasTag(newChild, "Gun") then
		SetupGUIForHeldGun(newChild)
		if #primaryWeaponSlot:GetChildren() == 0 then
			weapon1Label.BackgroundColor3 = onColor
			weapon1Label.Text = newChild.Name
		elseif #secondaryWeaponSlot:GetChildren() == 0 then
			weapon2Label.BackgroundColor3 = onColor
			weapon2Label.Text = newChild.Name
		end
	elseif CollectionService:HasTag(newChild, "Melee") then
		SetupGUIForHeldMelee(newChild)
		weapon3Label.BackgroundColor3 = onColor
		weapon3Label.Text = newChild.Name
	end
end)
--[=[
	@class TableUtil

	A collection of helpful table utility functions. Many of these functions are carried over from JavaScript or
	Python that are not present in Lua.

	Tables that only work specifically with arrays or dictionaries are marked as such in the documentation.

	:::info Immutability
	All functions (_except_ `SwapRemove`, `SwapRemoveFirstValue`, and `Lock`) treat tables as immutable and will return
	copies of the given table(s) with the operations performed on the copies.
]=]


local TableUtil = {}

local HttpService = game:GetService("HttpService")
local rng = Random.new()
-- Variables to store waypoints table and zombie's current waypoint


local waypoints
local currentWaypointIndex
 
local function followPath(destinationObject)
	-- Compute and check the path
	path:ComputeAsync(zombie.Position, destinationObject)
	-- Empty waypoints table after each new path computation
	waypoints = {}
 
	if path.Status == Enum.PathStatus.Success then
		-- Get the path waypoints and start zombie walking
		waypoints = path:GetWaypoints()
		-- Move to first waypoint
		currentWaypointIndex = 1
		human:MoveTo(waypoints[currentWaypointIndex].Position)
	else
		-- Error (path not found); stop humanoid
		human:MoveTo(zombie.Position)
	end
end
 
local function onWaypointReached(reached)
	if reached and waypoints ~= nil and currentWaypointIndex ~= nil and currentWaypointIndex < #waypoints then
		currentWaypointIndex = currentWaypointIndex + 1
		human:MoveTo(waypoints[currentWaypointIndex].Position)
	end
end
 
local function onPathBlocked(blockedWaypointIndex)
	-- Check if the obstacle is further down the path
	if blockedWaypointIndex > currentWaypointIndex then
		-- Call function to re-compute the path
		followPath(destination)
	end
end
--Digits


local Digit1 = script.Parent.Digit1Part.SurfaceGui.TextLabel
local Digit2 = script.Parent.Digit2Part.SurfaceGui.TextLabel
local Digit3 = script.Parent.Digit3Part.SurfaceGui.TextLabel
local Code = script.Parent.Code
local EnteredCode = script.Parent.EnteredCode
local Ready = script.Parent.Ready
Digit1.Text = math.random(0,9)
Digit2.Text = math.random(0,9)
Digit3.Text = math.random(0,9)
Code.Value = tostring(Digit1.Text)..""..tostring(Digit2.Text)..""..tostring(Digit3.Text)
Ready = true