Roblox/luau_corpus huggingface dataset:
--NPC Script
--This script opens the door if an NPC touches it.
--Unless you know what you're doing, do not modify this script.
local opening = false --This creates a bool to check if the door is opening.
script.Parent.Touched:Connect(function(hit) --This detects a touch on the door.
	local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid") --This identifies the humanoid.
	if humanoid ~= nil and script.Parent.CanCollide == true then --This checks if a character touched the door and the door is closed.
		local humanoidwalkspeed --This creates a value to save the walk speed of the humanoid.
		local player = game.Players:GetPlayerFromCharacter(hit.Parent) --This finds a player in the server.
		if player == nil and opening == false then --This ensures that there is no connected player to the character and that the door isn't opening yet.
			opening = true --This ensures that the script does not repeat the currently running code.
			humanoidwalkspeed = humanoid.WalkSpeed --This saves the current walk speed of the humanoid.
			wait(0.001) --This gives the script time to completely save the humanoid's current walk speed.
			humanoid.WalkSpeed = 0 --This stops the humanoid from walking.
			script.Parent.Unlock:Play() --This plays the "Door Knob" sound.
			wait(1.1) --There is a delay for opening the door.
			script.Parent.Open:Play() --This plays the door open sound.
			script.Parent.Transparency = 0.25 --This causes the door to be slightly transparent.
			script.Parent.CanCollide = false --This causes the door to stop colliding.
			wait(1) --The NPC will delay before walking through the door.
			humanoid.WalkSpeed = humanoidwalkspeed --This resets the humanoid walk speed to the original.
			wait(1) --This gives the NPC time to stop touching the door.
			opening = false --This allows the script to run the code again as long as the door is closed.
		end
	end
end)
-- Implements Javascript's `Array.prototype.map` as defined below
-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some
return function<T, U>(t: Array<T>, callback: callbackFn<T> | callbackFnWithThisArg<T, U>, thisArg: U?)
	if typeof(t) ~= "table" then
		error(string.format("Array.some called on %s", typeof(t)))
	end
	if typeof(callback) ~= "function" then
		error("callback is not a function")
	end

	for i, value in ipairs(t) do
		if thisArg ~= nil then
			if value ~= nil and (callback :: callbackFnWithThisArg<T, U>)(thisArg, value, i, t) then
				return true
			end
		else
			if value ~= nil and (callback :: callbackFn<T>)(value, i, t) then
				return true
			end
		end
	end
	return false
end
--[[

	LOWGames Studios
	Date: 27 October 2022
	by Elder
	
]]--

local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library"));
end)();
local u2 = {};
return function(p1)
	if u2[p1] then
		return u2[p1];
	end;
	local u3 = nil;
	pcall(function()
		u3 = u1.MarketplaceService:GetProductInfo(p1, Enum.InfoType.GamePass);
	end);
	if u3 then
		u2[p1] = u3;
	end;
	return u3;
end;
-- declarations

local Figure = script.Parent
local Head = waitForChild(Figure, "Head")
local Humanoid = waitForChild(Figure, "Humanoid")
Humanoid.Health=150
--I M P O R T A N T--
------------------------------------------------------------------------
--Don't change any of this unless you know what you are doing.
--This script is the blur affect but also the exit button script.
------------------------------------------------------------------------

local blur = game.Lighting.Blur
local frame = script.Parent
local close = script.Parent.CloseButton
local player = game.Players.LocalPlayer

if 
	frame.Visible == true
then
	blur.Enabled = true
end

close.MouseButton1Click:Connect(function()
	frame.Visible = false
end)

close.MouseButton1Click:Connect(function()
	blur.Enabled = false
end)
--NinjaGiant--
--NinjaGiant--
--NinjaGiant--
--NinjaGiant--
--NinjaGiant--
function o(i)
local touch = i:findFirstChild("Touch")
if (touch == nil) then return end
-- setup emote chat hook
game:GetService("Players").LocalPlayer.Chatted:Connect(function(msg)
	local emote = ""
	if (string.sub(msg, 1, 3) == "/e ") then
		emote = string.sub(msg, 4)
	elseif (string.sub(msg, 1, 7) == "/emote ") then
		emote = string.sub(msg, 8)
	end
	
	if (pose == "Standing" and emoteNames[emote] ~= nil) then
		playAnimation(emote, EMOTE_TRANSITION_TIME, Humanoid)
	end
end)
-- A ModuleScript inside your hooks folder.
return function (registry)
	registry:RegisterHook("BeforeRun", function(context)
		if context.Group == "DefaultAdmin" and context.Executor.UserId ~= game.CreatorId then
			return "You don't have permission to run this command"
		end
	end)
end
--[[Engine]]
--Torque Curve
Tune.Horsepower		= 480		--	[TORQUE CURVE VISUAL]
Tune.IdleRPM		= 500		--		https://www.desmos.com/calculator/2uo3hqwdhf
Tune.PeakRPM		= 3900		--		Use sliders to manipulate values
Tune.Redline		= 4500		--		Copy and paste slider values into the respective tune values
Tune.EqPoint		= 4500
Tune.PeakSharpness	= 7.5
Tune.CurveMult		= 0.16
---Basic_Settings:---
local light = true -- Set to false if u dont have light added
local maxv = 114 -- Max Speed In REAL KT.. Check Online for the real Aviation speed for this plane
local minspeed = -30 -- min speed In real KT 
local Spd_keep = true-- Set to false if U dont want the function to Speed up/down if u hold M/N down, and after release it stops
-- ROBLOX deviation START: exporting types without a namespace prefix
export type MatcherState = JestMatcherState
export type Matcher<R> = MatcherInterface<R>
--//SS6 PLUGIN; SPLASH//--
  --//INSPARE 2017//--

local ai = script.Parent.Main_Frame.A.Frame.ImageLabel
local bi = script.Parent.Main_Frame.B.Frame.ImageLabel
local ci = script.Parent.Main_Frame.C.Frame.ImageLabel
local di = script.Parent.Main_Frame.D.Frame.ImageLabel
local ei = script.Parent.Main_Frame.E.Frame.ImageLabel

ai.Size = UDim2.new(15,0,9,0)
bi.Size = UDim2.new(15,0,9,0)
ci.Size = UDim2.new(15,0,9,0)
di.Size = UDim2.new(15,0,9,0)
ei.Size = UDim2.new(15,0,9,0)
wait(.2)
script.Parent.SplashFade.WI:Play()
while true do
	for i=1,2 do
		for i=1,4 do
			ai.Position = ai.Position - UDim2.new(3,0,0,0)
			bi.Position = bi.Position - UDim2.new(3,0,0,0)
			ci.Position = ci.Position - UDim2.new(3,0,0,0)
			di.Position = di.Position - UDim2.new(3,0,0,0)
			ei.Position = ei.Position - UDim2.new(3,0,0,0)
			wait(.045)
		end
		ai.Position = ai.Position + UDim2.new(12,0,-3,0)
		bi.Position = bi.Position + UDim2.new(12,0,-3,0)
		ci.Position = ci.Position + UDim2.new(12,0,-3,0)
		di.Position = di.Position + UDim2.new(12,0,-3,0)
		ei.Position = ei.Position + UDim2.new(12,0,-3,0)
		wait(.045)
	end
	for i=1,2 do
		ai.Position = ai.Position - UDim2.new(3,0,0,0)
		bi.Position = bi.Position - UDim2.new(3,0,0,0)
		ci.Position = ci.Position - UDim2.new(3,0,0,0)
		di.Position = di.Position - UDim2.new(3,0,0,0)
		ei.Position = ei.Position - UDim2.new(3,0,0,0)
		wait(.045)
	end
	ai.Position = ai.Position + UDim2.new(6,0,6,0)
	bi.Position = bi.Position + UDim2.new(6,0,6,0)
	ci.Position = ci.Position + UDim2.new(6,0,6,0)
	di.Position = di.Position + UDim2.new(6,0,6,0)
	ei.Position = ei.Position + UDim2.new(6,0,6,0)
	wait(.045)
end
--[=[
	@interface ItemInfo

	A table containing information about one of the items that has been
	registered with the Merch Booth.

	You can interface with these objects using the [MerchBooth.getItems]
	function.

	.assetId number -- Add ID of the item, as passed to [MerchBooth.addItemAsync]
	.title string -- Name of the item as it appears in the catalog
	.price number -- Price in Robux of the item
	.description string -- Description of the item as it appears in the catalog
	.assetType Enum.AssetType -- Type of asset that as it appears in the Marketplace
	.viewportObject Accessory -- A 3D object to represent the item
	.creatorName string -- Name of the user or group that created the asset
	.creatorType Enum.CreatorType -- Type of the user/group that created the asset

	@within MerchBooth
]=]
export type ItemInfo = {
	assetId: number,
	title: string?,
	price: number?,
	description: string?,
	assetType: Enum.AssetType?,
	viewportObject: Accessory?,
	creatorName: string?,
	creatorType: Enum.CreatorType?,
	hiddenFromCatalog: boolean,
	isOwned: boolean?,
	productType: Enum.InfoType?,
	iconId: number?,
}
--[[**
	ensures value is a table and all keys pass keyCheck and all values pass valueCheck

	@param keyCheck The function to use to check the keys
	@param valueCheck The function to use to check the values

	@returns A function that will return true iff the condition is passed
**--]]
function t.map(keyCheck, valueCheck)
	assert(t.callback(keyCheck), t.callback(valueCheck))
	local keyChecker = t.keys(keyCheck)
	local valueChecker = t.values(valueCheck)

	return function(value)
		local keySuccess, keyErr = keyChecker(value)
		if not keySuccess then
			return false, keyErr or ""
		end

		local valueSuccess, valueErr = valueChecker(value)
		if not valueSuccess then
			return false, valueErr or ""
		end

		return true
	end
end
----------------------------------------------------------------------------------------------------
-----------------=[ General ]=----------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
	 TeamKill = false					--- Enable TeamKill?
	,TeamDamageMultiplier = 1			--- Between 0-1 | This will make you cause less damage if you hit your teammate
	
	,ReplicatedBullets = true			--- Keep in mind that some bullets will pass through surfaces...
	
	,AntiBunnyHop = true				--- Enable anti bunny hop system?
	,JumpCoolDown = 3					--- Seconds before you can jump again
	,JumpPower = 50						--- Jump power, default is 50
	
	,RealisticLaser = false				--- True = Laser line is invisible
	,ReplicatedLaser = true				
	,ReplicatedFlashlight = true
	
	,EnableRagdoll = true				--- Enable ragdoll death?
	,TeamTags = true					--- Aaaaaaa
	,HitmarkerSound = false				--- GGWP MLG 360 NO SCOPE xD
--XxMegamanxX

function onTouch(hit)

	if hit.Parent:findFirstChild("Humanoid") ~= nil and hit.Parent:findFirstChild("Sling") == nil then
		local suit = script.Parent.Parent["Sling"]:clone()
		suit.Parent = hit.Parent
		local G = suit:getChildren()
		for i=1, #G do
			if G[i].className == "Part" or "UnionOperation" or "MeshPart" then
				local suitW = Instance.new("Weld")
				suitW.Part0 = suit.MainPart
				suitW.Part1 = G[i]
				local autoW = CFrame.new(suit.MainPart.Position)
				suitW.C0 = suit.MainPart.CFrame:inverse()*autoW
				suitW.C1 = G[i].CFrame:inverse()*autoW
				suitW.Parent = suit.MainPart
			end
			local bpW = Instance.new("Weld")
			bpW.Part0 = hit.Parent["Torso"]
			bpW.Part1 = suit.MainPart
			bpW.C0 = CFrame.new(0, 0, 0)
			bpW.Parent = suit.MainPart
		end
		local c = suit:getChildren()
		for i=1, #c do
			c[i].Anchored = false
			c[i].CanCollide = false
		end
	end
end

script.Parent.Touched:connect(onTouch)
--RustyBomb
game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local Humanoid = character:WaitForChild("Humanoid")
		Humanoid.Died:connect(function()
			if player.RustyBomb.Value == 2 then
				player.RustyBomb.Value = 1
			end
		end)
	end)
end)
game.Players.PlayerRemoving:Connect(function(player)
	if player.RustyBomb.Value == 2 then
		player.RustyBomb.Value = 1
	end
end)
-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean
return function(val: any): boolean
	return not not val and val ~= 0 and val ~= "" and not Number.isNaN(val)
end
--script
script.Parent.MouseButton1Click:Connect(function()
	if play then
		GoodSound.Volume = 1.2                --volume from the music when it's on
		play = false
		script.Parent.Text = "Mute music" else  --you can change the text from the button here between ""
		GoodSound.Volume = 0                    --volume from the music when it's off
		play = true         
		script.Parent.Text = "Play music"       --you can change the text from the button here between ""
	end
end)
--// All global vars will be wiped/replaced except script
--// All guis are autonamed client.Variables.CodeName..gui.Name

return function(data, env)
	if env then
		setfenv(1, env)
	end
	local gui = script.Parent.Parent
	local playergui = service.PlayerGui
	local str = data.Message
	local time = data.Time or 15

	local log  = {
		Type = "Hint";
		Title = "Hint";
		Message = str;
		Icon = "rbxassetid://7501175708";
		Time = os.date("%X");
		Function = nil;
	}

	table.insert(client.Variables.CommunicationsHistory, log)
	service.Events.CommsCenter:Fire(log)

	--client.UI.Make("HintHolder")
	local container = client.UI.Get("HintHolder",nil,true)
	if not container then
		local holder = service.New("ScreenGui")
		local hTable = client.UI.Register(holder)
		local frame = service.New("ScrollingFrame", holder)
		client.UI.Prepare(holder)
		hTable.Name = "HintHolder"
		frame.Name = "Frame"
		frame.BackgroundTransparency = 1
		frame.Size = UDim2.new(1, 0, 0,150)
		frame.CanvasSize = UDim2.new(0, 0, 0, 0)
		frame.ChildAdded:Connect(function(c)
			if #frame:GetChildren() == 0 then
				frame.Visible = false
			else
				frame.Visible = true
			end
		end)

		frame.ChildRemoved:Connect(function(c)
			if #frame:GetChildren() == 0 then
				frame.Visible = false
			else
				frame.Visible = true
			end
		end)

		container = hTable
		hTable:Ready()
	end
	container = container.Object.Frame

	--// First things first account for notif :)
	local notif = client.UI.Get("Notif")
	local topbar = client.UI.Get("TopBar")

	container.Position = UDim2.new(0,0,0,((notif and 30) or 0) + ((topbar and 40) or 0) - 35)

	local children = container:GetChildren()

	gui.Position = UDim2.new(0,0,0,-100)
	gui.Frame.msg.Text = str
	local bounds = gui.Frame.msg.TextBounds.X

	local function moveGuis(m,ignore)
		m = m or 0
		local max = #container:GetChildren()
		for i,v in pairs(container:GetChildren()) do
			if v~=ignore then
				local y = (i+m)*28
				v.Position = UDim2.new(0,0,0,y)
				if i~=max then v.Size = UDim2.new(1,0,0,28) end
			end
		end
	end

	local lom = -1
	moveGuis(-1)
	gui.Parent = container
	if #container:GetChildren()>5 then lom = -2 end
	UDim2.new(0,0,0,(#container:GetChildren()+lom)*28)
	moveGuis(-1)
	--gui:TweenPosition(UDim2.new(0,0,0,(#container:GetChildren()+lom)*28),nil,nil,0.3,true,function() if gui and gui.Parent then moveGuis(-1) end end)

	if #container:GetChildren()>5 then
		local gui = container:GetChildren()[1]
		moveGuis(-2,gui)
		gui:Destroy()
		--gui:TweenPosition(UDim2.new(0,0,0,-100),nil,nil,0.2,true,function() if gui and gui.Parent then gui:Destroy() end end)
	end

	wait(data.Time or 5)

	if gui and gui.Parent then
		moveGuis(-2,gui)
		gui:Destroy()
		--gui:TweenPosition(UDim2.new(0,0,0,-100),nil,nil,0.2,true,function() if gui and gui.Parent then gui:Destroy() end end)
	end
end
--[[ Services ]]--
local PlayersService = game:GetService('Players')
local VRService = game:GetService("VRService")

local Util = require(script.Parent:WaitForChild("CameraUtils"))
--if the path is followable/reachable
	if path.Status.Value<3 then
		for _,v in ipairs(path:GetPointCoordinates()) do
			humanoid:MoveTo(v);
			local distance=0;
			repeat
				distance=TD and (Vector2.new(v.x,v.z)-Vector2.new(torso.Position.x,torso.Position.z)).magnitude or (v-torso.Position).magnitude;
				Wait();
			until distance<2
		end
	end
end
-- Variables
local plr = playerService.LocalPlayer

script.Parent.MouseButton1Click:Connect(function ()
	marketplaceService:PromptPurchase(plr, 400812710) -- Prompts the user to get Realism Mod on click
end)
-- Public Constructors

function RotatedRegion3.new(cframe, size)
	local self = setmetatable({}, RotatedRegion3)
	local set = Vertices.Block(cframe, size/2)
	
	self.CFrame = cframe
	self.Size = size
	self.Shape = "Block"
	
	self.Set = set
	self.Support = Supports.PointCloud
	self.Centroid = cframe.p
	
	self.AlignedRegion3 = Region3.new(worldBoundingBox(set))

	return self
end

RotatedRegion3.Block = RotatedRegion3.new

function RotatedRegion3.Wedge(cframe, size)
	local self = setmetatable({}, RotatedRegion3)
	local set = Vertices.Block(cframe, size/2)
	
	self.CFrame = cframe
	self.Size = size
	self.Shape = "Wedge"
	
	self.Set = Vertices.Wedge(cframe, size/2)
	self.Support = Supports.PointCloud
	self.Centroid = Vertices.GetCentroid(self.Set)
	
	self.AlignedRegion3 = Region3.new(worldBoundingBox(set))

	return self
end

function RotatedRegion3.CornerWedge(cframe, size)
	local self = setmetatable({}, RotatedRegion3)
	local set = Vertices.Block(cframe, size/2)
	
	self.CFrame = cframe
	self.Size = size
	self.Shape = "CornerWedge"
	
	self.Set = Vertices.CornerWedge(cframe, size/2)
	self.Support = Supports.PointCloud
	self.Centroid = Vertices.GetCentroid(self.Set)
	
	self.AlignedRegion3 = Region3.new(worldBoundingBox(set))

	return self
end

function RotatedRegion3.Cylinder(cframe, size)
	local self = setmetatable({}, RotatedRegion3)
	local set = Vertices.Block(cframe, size/2)
	
	self.CFrame = cframe
	self.Size = size
	self.Shape = "Cylinder"
	
	self.Set = {cframe, size/2}
	self.Support = Supports.Cylinder
	self.Centroid = cframe.p
	
	self.AlignedRegion3 = Region3.new(worldBoundingBox(set))

	return self
end

function RotatedRegion3.Ball(cframe, size)
	local self = setmetatable({}, RotatedRegion3)
	local set = Vertices.Block(cframe, size/2)
	
	self.CFrame = cframe
	self.Size = size
	self.Shape = "Ball"
	
	self.Set = {cframe, size/2}
	self.Support = Supports.Ellipsoid
	self.Centroid = cframe.p
	
	self.AlignedRegion3 = Region3.new(worldBoundingBox(set))

	return self
end

function RotatedRegion3.FromPart(part)
	return RotatedRegion3[Vertices.Classify(part)](part.CFrame, part.Size)
end
--[[if script.Parent.Parent.Values.Win.Value == true then
script.Parent.Parent.Sound.Win:Play()
script.Parent.Parent.Sound.Idle:Stop()
script.Parent.Parent.WINNER.Disabled = false
end]]
script.Parent.Parent.Configuration.GameOn.Value = false
script.Parent.Parent.MainScript.Disabled = false
script.Disabled = true
end
script.Parent.Parent.Sensortwo.Touched:Connect(onTouched)
--// bolekinds

local Time = game:GetService("Lighting")
local Bandit = game.ServerStorage.Bandit
local BanditSpawns = workspace.BanditSpawns
local con
local mailboxcon

game.Lighting:GetPropertyChangedSignal("ClockTime"):Connect(function()
	if game.Lighting.ClockTime == 7 then
		local randomNum = math.random(1, 10)
		local banditRaid = false
		if randomNum >= 5 then
			banditRaid = true
		end
		game.ServerStorage.ServerData.Age.Value += 1
		game.ServerStorage.ServerData.Day.Value += 1
		if mailboxcon then
			mailboxcon:Disconnect()
		end
		if game.ServerStorage.ServerData.Day.Value >= 5 then
			if game.ServerStorage.ServerData.HasKeys.Value == false then
				workspace.Door.Knock:Play()
				workspace.Door.Sparkles.Enabled = true
				workspace.Door.ProximityPrompt.Enabled = true
				con = workspace.Door.ProximityPrompt.Triggered:Connect(function(plr)
					game.ServerStorage.key:Clone().Parent = plr.PlayerGui
					workspace.Door.Knock:Stop()
					workspace.Door.Sparkles.Enabled = false
					workspace.Door.ProximityPrompt.Enabled = false
					con:Disconnect()
				end)
			end
		end
		if game.ServerStorage.ServerData.HasKeys.Value == true then
			if banditRaid == true then
				workspace.Sound3:Play()
				game.ReplicatedStorage.Bandit:FireAllClients()
				repeat
					task.wait(2.5) 
					local bandit = game.ServerStorage.Bandit:Clone()
					bandit.HumanoidRootPart.CFrame = BanditSpawns:GetChildren()[math.random(1, #BanditSpawns:GetChildren())].CFrame + Vector3.new(0,10,0)
					bandit.Parent = workspace.AttackableNPCS
				until workspace.Sound3.Playing == false
				for i, v in ipairs(workspace.AttackableNPCS:GetChildren()) do
					v:Destroy()
				end
				for i, v in ipairs(workspace.FloppaBlocker.bandits:GetChildren()) do
					v:Destroy()
				end
				game.ReplicatedStorage.Bandit2:FireAllClients()
				workspace.Sound3:Stop()
				workspace.Sound:Play()
			end
			workspace.Mailbox.Main.Sparkles.Enabled = true
			workspace.Mailbox.Main.ProximityPrompt.Enabled = true
			mailboxcon = workspace.Mailbox.Main.ProximityPrompt.Triggered:Connect(function(plr)
				workspace.Mailbox.Main.Sparkles.Enabled = false
				workspace.Mailbox.Main.ProximityPrompt.Enabled = false
				local c = game.ServerStorage.mailboxthings:GetChildren()[math.random(1,#game.ServerStorage.mailboxthings:GetChildren())]:Clone()
				c.Parent = plr.PlayerGui
				mailboxcon:Disconnect()
				mailboxcon = nil
			end)
		end
		game.ServerStorage.TempData.CanGiveRent.Value = true
		workspace.Roommate.Head.Dialog["Gimme rent"].ResponseDialog = "Alright"
	end
end)

while true do
	task.wait(0.05)
	Time:SetMinutesAfterMidnight(Time:GetMinutesAfterMidnight()+0.5)
end
-- Gather advanced timing metrics for Profiler subtrees.
exports.enableProfilerTimer = _G.__PROFILE__
-------------------------------------------------------------------------------------------------------------------------
model = script.Parent.Parent.Parent.Drop   --This is the MODELNAME. you made a desk in the instructions SO name the part called MODELNAME to "Desk". Then change price to what you want.
Upgradecost = 0  -- Replace The Price You Want Where It Says 100
--To make the dummy stay in the same place, so the player can't push the npc around
local HumanoidPosition = script.Parent.Parent.Position

script.Parent.Position = HumanoidPosition
--

function Raycast.FindPartOnRayWithCallbackWithIgnoreList(ray, list, terrainCellsAreCubes, ignoreWater, loopout, callbackFunc)
	local maxDistance = ray.Direction.Magnitude
	local direction = ray.Direction.Unit
	
	loopout = loopout or 25
	local loopCount = 0
	
	local lastPosition = ray.Origin
	local distance = 0
	
	local hit, position, normal, material
	
	repeat
		local r = Ray.new(lastPosition, direction * (maxDistance - distance))
		hit, position, normal, material = WORKSPACE:FindPartOnRayWithIgnoreList(ray, list, terrainCellsAreCubes, ignoreWater, true)
		local result = callbackFunc(hit, position, normal, material)
		
		if (result == CALLBACKRESULT.Continue) then
			distance = (ray.Origin - position).Magnitude
			lastPosition = position
		elseif (result == CALLBACKRESULT.Finished) then
			return hit, position, normal, material
		elseif (result == CALLBACKRESULT.Fail or result == nil) then
			break
		end
		
		loopCount = loopCount + 1
	until (loopCount > loopout or distance >= maxDistance - 0.1)
	
	return
end

function Raycast.FindPartOnRayWithCallbackWithWhiteList(ray, list, terrainCellsAreCubes, ignoreWater, callbackFunc)
	local maxDistance = ray.Direction.Magnitude
	local direction = ray.Direction.Unit
	
	local lastPosition = ray.Origin
	local distance = 0
	
	local hit, position, normal, material
	
	repeat
		local r = Ray.new(lastPosition, direction * (maxDistance - distance))
		hit, position, normal, material = WORKSPACE:FindPartOnRayWithWhiteList(ray, list, terrainCellsAreCubes, ignoreWater, true)
		local result = callbackFunc(hit, position, normal, material)
		
		if (result == CALLBACKRESULT.Continue) then
			distance = (ray.Origin - position).Magnitude
			lastPosition = position
		elseif (result == CALLBACKRESULT.Finished) then
			return hit, position, normal, material
		elseif (result == CALLBACKRESULT.Fail or result == nil) then
			break
		end
	until (distance >= maxDistance - 0.1)
	
	return
end

function Raycast.FindPartOnRayWithCallback(ray, ignore, terrainCellsAreCubes, ignoreWater, callbackFunc)
	return Raycast.FindPartOnRayWithCallbackWithIgnoreList(ray, {ignore}, terrainCellsAreCubes, ignoreWater, callbackFunc)
end
--[[
	Sets the velocity of the internal springs, overwriting the existing velocity
	of this Spring. This doesn't affect position.

	If the type doesn't match the current type of the spring, an error will be
	thrown.
]]
function class:setVelocity(newValue: PubTypes.Animatable)
	local newType = typeof(newValue)
	if newType ~= self._currentType then
		logError("springTypeMismatch", nil, newType, self._currentType)
	end

	self._springVelocities = unpackType(newValue, newType)
	SpringScheduler.add(self)
end
--Update text
text.Text = "HP: "..math.floor(char:WaitForChild("Humanoid").Health).."/"..char:WaitForChild("Humanoid").MaxHealth