Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- p = period
-- a = amplitud


local function inOutElastic(t, b, c, d, a, p)
  local s = 0;
  if t == 0 then return b end

  t = t / d * 2

  if t == 2 then return b + c end

  if not p then p = d * (0.3 * 1.5) end
  if not a then a = 0 end

  if not a or a < abs(c) then
    a = c
    s = p / 4
  else
    s = p / (2 * pi) * asin(c / a)
  end

  if t < 1 then
    t = t - 1
    return -0.5 * (a * pow(2, 10 * t) * sin((t * d - s) * (2 * pi) / p)) + b
  else
    t = t - 1
    return a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p ) * 0.5 + c + b
  end
end
--[[
{Madwork}

-[MadworkMaid]---------------------------------------
	Madwork implementation of Maid.lua
	
	Functions:
	
		MadworkMaid.NewMaid() --> [Maid]
		MadworkMaid.Cleanup(task, params...)
	
	Members [Maid]:
	
		Maid:AddCleanupTask(task) --> cleanup_of_one [function] (...) -- Returned function can be called to cleanup the individual task
		Maid:RemoveCleanupTask(task)
		Maid:Cleanup(params...)
		
	Notice: "params..." argument is optional and can be used to pass arguments to cleanup functions
	
--]]
--new e


newe = script.E:clone()
newe.Text = child.Value
newe.Parent = hear
wait(0.1)
newe.Remover.Disabled = false
end
wait() 
child:Destroy()
end

end)



while true do
	Game:GetService("RunService").RenderStepped:wait() 
	blind.CFrame = camera.CoordinateFrame - camera.CoordinateFrame.lookVector
	center.CFrame =camera.CoordinateFrame + camera.CoordinateFrame.lookVector
	center.Mesh.Scale = blind.Mesh.Scale * Vector3.new(0.015,0.015,0.01)
	c = c + 1
	if c >= 2 then
		c = 0 
		if blind.Mesh.Scale.x < -5 then
	blind.Mesh.Scale = blind.Mesh.Scale + Vector3.new(0.5,0.5,0.5)	
		end 
	end
end
--[=[
	@param name string
	@param inboundMiddleware ClientMiddleware?
	@param outboundMiddleware ClientMiddleware?
	@return (...: any) -> any

	Generates a function on the matching RemoteFunction generated with ServerComm. The function
	can then be called to invoke the server. If this `ClientComm` object was created with
	the `usePromise` parameter set to `true`, then this generated function will return
	a Promise when called.

	```lua
	-- Server-side:
	local serverComm = ServerComm.new(someParent)
	serverComm:BindFunction("MyFunction", function(player, msg)
		return msg:upper()
	end)

	-- Client-side:
	local clientComm = ClientComm.new(someParent)
	local myFunc = clientComm:GetFunction("MyFunction")
	local uppercase = myFunc("hello world")
	print(uppercase) --> HELLO WORLD

	-- Client-side, using promises:
	local clientComm = ClientComm.new(someParent, true)
	local myFunc = clientComm:GetFunction("MyFunction")
	myFunc("hi there"):andThen(function(msg)
		print(msg) --> HI THERE
	end):catch(function(err)
		print("Error:", err)
	end)
	```
]=]


function ClientComm:GetFunction(
	name: string,
	inboundMiddleware: Types.ClientMiddleware?,
	outboundMiddleware: Types.ClientMiddleware?
)
	return Comm.GetFunction(self._instancesFolder, name, self._usePromise, inboundMiddleware, outboundMiddleware)
end
------------------------------------------------------------------------
-- single-character replacement, for locale-aware decimal points
------------------------------------------------------------------------


function luaX:buffreplace(ls, from, to)
  local result, buff = "", ls.buff
  for p = 1, #buff do
    local c = string.sub(buff, p, p)
    if c == from then c = to end
    result = result..c
  end
  ls.buff = result
end
--[=[
	Returns a boolean determining if the object is a ScriptSignal.

	```lua
	local janitor = Janitor.new()
	local signal = ScriptSignal.new()

	ScriptSignal.Is(signal) -> true
	ScriptSignal.Is(janitor) -> false
	```

	@param object any
	@return boolean
	@ignore
]=]


function ScriptSignal.Is(object): boolean
    return typeof(object) == "table" and getmetatable(object) == ScriptSignal
end
--[[
	tweenJoint Function Parameters:
	
	Object Joint - This has to be a weld with a C0 and C1 property
	
	CFrame newC0 - This is what the new C0 of the weld will be. You can put nil if you don't want to effect the C0
	
	CFrame newC1 - This is what the new C1 of the weld will be. You can put nil if you don't want to effect the C1
	
	function Alpha - This is an alpha function that takes an input parameter of a number between 0 and 90 and returns a number between 0 and 1.
		For example, function(X) return math.sin(math.rad(X)) end
		
	float Duration - This is how long the tweening takes to complete
--]]



function tweenJoint(Joint, newC0, newC1, Alpha, Duration)
	spawn(function()
		local newCode = math.random(-1e9, 1e9) --This creates a random code between -1000000000 and 1000000000
		local tweenIndicator = nil
		if (not Joint:findFirstChild("tweenCode")) then --If the joint isn't being tweened, then
			tweenIndicator = Instance.new("IntValue")
			tweenIndicator.Name = "tweenCode"
			tweenIndicator.Value = newCode
			tweenIndicator.Parent = Joint
		else
			tweenIndicator = Joint.tweenCode
			tweenIndicator.Value = newCode --If the joint is already being tweened, this will change the code, and the tween loop will stop
		end
		if Duration <= 0 then --If the duration is less than or equal to 0 then there's no need for a tweening loop
			if newC0 then Joint.C0 = newC0 end
			if newC1 then Joint.C1 = newC1 end
		else
			local Increment = 1.5 / Duration --Calculate the increment here so it doesn't need to be calculated in the loop
			local startC0 = Joint.C0
			local startC1 = Joint.C1
			local X = 0
			while true do
				RS.RenderStepped:wait() --This makes the for loop step every 1/60th of a second
				local newX = X + Increment
				X = (newX > 90 and 90 or newX) --Makes sure the X never goes above 90
				if tweenIndicator.Value ~= newCode then break end --This makes sure that another tween wasn't called on the same joint
				if newC0 then Joint.C0 = startC0:lerp(newC0, Alpha(X)) end
				if newC1 then Joint.C1 = startC1:lerp(newC1, Alpha(X)) end
				if X == 90 then break end --If the tweening is done...
			end
		end
		if tweenIndicator.Value == newCode then --If this tween functions was the last one called on a joint then it will remove the code
			tweenIndicator:Destroy()
		end
	end)
end

function CreateWeld(Part, CF)
	local w = Instance.new("Weld")
	w.Name = "LegWeld"
	w.Parent = Torso
	w.Part0 = Torso
	w.Part1 = Part
	
	tweenJoint(w, nil,  CF, function(X) return math.sin(math.rad(X)) end, 0.25)
end
--------------------------------------------------------------------------



local _WHEELTUNE = {
																		--[[	
			SS6 Presets
	[Eco]		
		WearSpeed = 1,
		TargetFriction = .7,
		MinFriction = .1,
	[Road]		
		WearSpeed = 2,
		TargetFriction = .7,
		MinFriction = .1,
	[Sport]		
		WearSpeed = 3,
		TargetFriction = .79,
		MinFriction = .1,											]]

	TireWearOn 		= true	,
	
	--Friction and Wear
	FWearSpeed		= .4	,
	FTargetFriction	= .7	,
	FMinFriction 	= .1	,
	
	RWearSpeed		= .4	,
	RTargetFriction	= .7	,
	RMinFriction	= .1	,
	
	--Tire Slip
	TCSOffRatio		= 1		,
	WheelLockRatio	= 1/2	,	--SS6 Default = 1/4
	WheelspinRatio	= 1/1.1	,	--SS6 Default = 1/1.2
	
	--Wheel Properties
	FFrictionWeight	= 1		,	--SS6 Default = 1
	RFrictionWeight	= 1		,	--SS6 Default = 1
	FLgcyFrWeight	= 10	,
	RLgcyFrWeight	= 10	,
	
	FElasticity		= .5		,	--SS6 Default = .5
	RElasticity		= .5		,	--SS6 Default = .5
	FLgcyElasticity	= 0		,
	RLgcyElasticity	= 0		,
	
	FElastWeight	= 1		,	--SS6 Default = 1
	RElastWeight	= 1		,	--SS6 Default = 1
	FLgcyElWeight	= 10	,
	RLgcyElWeight	= 10	,
	
	--Wear Regen
	RegenSpeed		= 3.6		--SS6 Default = 3.6
}
--[[ Module Functions ]]

--
Chassis = {}

Chassis.root = PackagedVehicle:FindFirstChild("Chassis") --the root of the Chassis model
Chassis.driverSeat = Chassis.root:FindFirstChildOfClass("VehicleSeat")
Chassis.passengerSeats = {
	Chassis.root:FindFirstChild("SeatFR"),
	Chassis.root:FindFirstChild("SeatRL"),
	Chassis.root:FindFirstChild("SeatRR")
}

local randomSuspension = Chassis.root:FindFirstChild("SuspensionFL")
local wheelRadius = randomSuspension.Wheel.Size.y/2
Chassis.driverSeat.MaxSpeed = VehicleParameters.MaxSpeed * wheelRadius

function Chassis.InitializeDrivingValues()
	-- Constraint tables always ordered FL, FR, RL, RR
	Motors = getVehicleMotors()

	local strutSpringsFront = getSprings("StrutFront")
	local strutSpringsRear = getSprings("StrutRear")
	local torsionSprings = getSprings("TorsionBar")

	RedressMount = Chassis.root:WaitForChild("RedressMount")

	SteeringPrismatic = constraints:FindFirstChild("SteeringPrismatic")
	SteeringPrismatic.UpperLimit = VehicleParameters.MaxSteer
	SteeringPrismatic.LowerLimit = -VehicleParameters.MaxSteer

	for _,s in pairs(strutSpringsFront) do
		adjustSpring(s, ActualStrutSpringStiffnessFront, ActualStrutSpringDampingFront)
	end
	for _,s in pairs(strutSpringsRear) do
		adjustSpring(s, ActualStrutSpringStiffnessRear, ActualStrutSpringDampingRear)
	end
	for _,s in pairs(torsionSprings) do
		adjustSpring(s, ActualTorsionSpringStiffness, ActualTorsionSpringDamping)
	end

	local chassisChildren = Chassis.root:GetChildren()
	for i = 1, #chassisChildren do
		local model = chassisChildren[i]
		if model:IsA("Model") then
			local wheel = model:FindFirstChild("Wheel")
			if wheel then
				local old = wheel.CustomPhysicalProperties
				local new = PhysicalProperties.new(old.Density, VehicleParameters.WheelFriction, old.Elasticity, old.FrictionWeight, old.ElasticityWeight)
				wheel.CustomPhysicalProperties = new
			end
		end
	end

	setMotorTorque(10000)
end

function Chassis.GetDriverSeat()
	return Chassis.driverSeat
end

function Chassis.GetPassengerSeats()
	return Chassis.passengerSeats
end

function Chassis.GetBase()
	return Chassis.root.PrimaryPart or Chassis.root:FindFirstChild("FloorPanel")
end
-- normal maxspeed is 40


local topSpeed = 40

local OllieHack = script.Parent:FindFirstChild("OllieThrust")
if (OllieHack == nil) then
	OllieHack = Instance.new("BodyThrust")
	OllieHack.Name = "OllieThrust"
	OllieHack.force = Vector3.new(0,0,0)
	OllieHack.location = Vector3.new(0,0,-2)
	OllieHack.Parent = Board
end

local lastaction = nil
local lasttime = nil
local jumpok = true

function didAction(action)
	lastaction = action
	lasttime = time()
end



function onAxisChanged(axis)
	Board.Steer = Controller.Steer
	Board.Throttle = Controller.Throttle

	if (Board.Steer == -1) then
		print("Left")
		--CoastingAnim:Stop(1)
		KickAnim:Stop()
		OllieAnim:Stop()
		RightAnim:Stop(.5)
		LeftAnim:Play(.5)
		didAction("left")
	end

	if (Board.Steer == 1) then
		print("Right")
		KickAnim:Stop()
		--CoastingAnim:Stop(1)
		LeftAnim:Stop(.5)
		OllieAnim:Stop()
		RightAnim:Play(.5)
		didAction("right")
	end

	if (Board.Steer == 0) then
		print("Straight")

		KickAnim:Stop()
		LeftAnim:Stop(.5)
		OllieAnim:Stop()
		RightAnim:Stop(.5)
		
		if (lastaction == "go" and time() - lasttime < .1) then
			
		end
		didAction("go")
		--CoastingAnim:Play(1)

		if (Board.CruiseLoop.IsPlaying == false) then Board.CruiseLoop:Play() end
		
	end
end

function enterAirState()
	-- gyrate towards vertical position for better landing
	Gyro.maxTorque = Vector3.new(10, 0, 10)
	jumpok = false
	Board.CruiseLoop:Stop()
	Board.BoardOllie:Play()
end

function exitAirState()
	-- turn off gyro
	Gyro.maxTorque = Vector3.new(0,0,0)
	jumpok = true
	Board.BoardDrop:Play()
	Board.CruiseLoop:Stop()
end

function enterPushingState()
	KickAnim:Play()
end

function enterCoastingState()
	if (Board.CruiseLoop.IsPlaying == false) then Board.CruiseLoop:Play() end
end

function enterStoppingState()
	Board.CruiseLoop:Stop()
	breakModifyAndPlay()
end

function onMoveStateChanged(newState, oldState)
	print(oldState)
	print(newState)
	-- do state exits here
	if oldState == Enum.MoveState.AirFree then exitAirState() end

	-- do state transitions here

	-- do state entries here
	if newState == Enum.MoveState.AirFree then enterAirState() end
	if newState == Enum.MoveState.Pushing then enterPushingState() end
	if newState == Enum.MoveState.Coasting then enterCoastingState() end
	if newState == Enum.MoveState.Stopping then enterStoppingState() end
end
Rocket.CanCollide = false





Tool.Note:clone().Parent = Rocket

Tool.RocketScript:clone().Parent = Rocket

--Tool.Explosion:clone().Parent = Rocket

--Tool.Swoosh:clone().Parent = Rocket





function fire(vTarget)



	local vCharacter = Tool.Parent;

	

	local vHandle = Tool:findFirstChild("Handle")

	if vHandle == nil then

		print("Handle not found")

		return 

	end



	local chord = Tool.Ichord:clone()



	if (Tool.mode.Value==1) then

		chord = Tool.Ichord:clone()

	elseif (Tool.mode.Value==2) then

		chord = Tool.IVIIchord:clone()

	elseif (Tool.mode.Value==3) then

		chord = Tool.Vchord:clone()

	elseif (Tool.mode.Value==4) then

		chord = Tool.VVIIchord:clone()

	elseif (Tool.mode.Value==5) then

		chord = Tool.IVchord:clone()

	elseif (Tool.mode.Value==6) then

		chord = Tool.IIIchord:clone()

	end

	

	chord.Name = "chord"



	local dir = Vector3.new(math.random()-.5, 1, math.random() - .5).unit



	local missile = Rocket:clone()



	chord.Parent = missile



	local pos = vHandle.Position + Vector3.new(0, 5 ,0)

	

	--missile.Position = pos

	missile.CFrame = CFrame.new(pos,  pos + dir)

	missile.BodyVelocity.velocity = dir * 30

	local vPlayer = game.Players:playerFromCharacter(vCharacter)



	if vPlayer == nil then

		print("Player not found")

	end
	

	missile.RocketScript.Disabled = false


	missile.Parent = game.Workspace

end



Tool.Enabled = true

function onActivated()

	if not Tool.Enabled then

		return

	end



	Tool.Enabled = false



	local character = Tool.Parent;

	local humanoid = character.Humanoid

	if humanoid == nil then

		print("Humanoid not found")

		return 

	end



	local targetPos = humanoid.TargetPoint



	fire(targetPos)



	Tool.Enabled = true

end





script.Parent.Activated:connect(onActivated)
-- Scene's workspace assets


local Environment = nil
local ServerEnvironment = nil
local FirstNeonParts = nil
local SecondNeonParts = nil

local function enableBouncyPads()
	for _, part in pairs(CollectionService:GetTagged("Bouncy")) do
		BouncePlatforms.new(part, {
			debounce = 0.2,
			bounceVector = Vector3.new(0, 1, 0),
			bounceForce = 150,
		})
	end
	BouncePlatforms:enable()
end

local function teleportPlayerToSkydive()
	local character = player.Character
	if character and character.Parent then
		local primaryPart = character.PrimaryPart
		if primaryPart then
			local rng = Random.new()
			primaryPart.CFrame = CFrame.new(rng:NextInteger(-25, 25), 400.369, rng:NextInteger(-25, 25))
		end
	end
end
--Frosty--



local function AttachParticleControl(source_part)
	
	local prtc = nil
	
	local function Start()
		prtc = script.Frostbite:clone()
		prtc.Parent = source_part
	end
	
	local function Update()
		
	end
	
	local function Stop()
		if prtc ~= nil then
			prtc:destroy()
			prtc = nil
		end
	end
	
	return {Start = Start, Update = Update, Stop = Stop}
end

return AttachParticleControl
-- Luke




local button = script.Parent
local players = game:GetService('Players')

local DEBOUNCE_TIME = 5
local debounce = false


button.Touched:connect(function(hit)
	if hit and hit.Parent then
		local humanoid = hit.Parent:FindFirstChild('Humanoid')
		local hrp = hit.Parent:FindFirstChild('HumanoidRootPart')
		if hrp and humanoid and humanoid.Health > 0 then
			local player = players:GetPlayerFromCharacter(hit.Parent)
			if not debounce then
				debounce = true
				
				local nearestAccessory = nil
				local nearestDistance = nil
				for _,accessory in pairs(workspace:GetChildren()) do
					if accessory:IsA('Accessory') then
						local handle = accessory:FindFirstChild('Handle')
						if handle then
							local distance = (handle.Position-button.Position).magnitude
							if not nearestDistance or distance < nearestDistance then
								nearestDistance = distance
								nearestAccessory = accessory
							end
						end
					end
				end
				if nearestAccessory then
					local accessory = nearestAccessory:clone()
					accessory.Parent = hit.Parent
				end

				wait(DEBOUNCE_TIME)
				debounce = false
			end
		end
	end
end)
--	local now = os.time()
--	if now - lastMoan > 5 then	
--		if math.random() > .3 then
--			zombie.Moan:Play()
----			print("playing moan")
--			lastMoan = now
--		end


	--	end
	zombie.Humanoid:MoveTo(workspace.NPC.PrimaryPart.Position)
	wait(2)
end
-- Prunes any stories and test files that are included with the DevModule. These
-- are not needed at runtime.


local function prune(instance: Instance)
	for _, descendant in ipairs(instance:GetDescendants()) do
		local name = descendant.Name
		if name:match("%.story$") or name:match("%.spec$") then
			descendant:Destroy()
		end
	end
end

local function getPackageVersion(package: ModuleScript): string
	local version = package:FindFirstChild(constants.PACKAGE_VERSION_NAME)

	assert(
		version and version:IsA("StringValue"),
		constants.PACKAGE_VERSION_OBJECT_MISSING:format(
			package.Name,
			constants.PACKAGE_VERSION_NAME,
			package:GetFullName()
		)
	)
	assert(version.Value ~= "", constants.PACKAGE_VERSION_EMPTY:format(package.Name, version:GetFullName()))

	return version.Value
end
--Get touch input


ButtonGui.TouchImage.InputBegan:Connect(function(InputObj)
	if InputObj.UserInputType == Enum.UserInputType.Touch then
		if AdornedSeat then
			EnterStart("Touch")
		end
	end
end)

ButtonGui.TouchImage.InputEnded:Connect(function(InputObj)
	if InputObj.UserInputType == Enum.UserInputType.Touch then
		EnterKeyDown = false
	end
end)

function DisplayPrompt(Part)
	AdornedSeat = Part
	ButtonGui.Adornee = Part
	ButtonGui.Parent = Player.PlayerGui
	ButtonGui.Enabled = true
end

function HidePrompt()
	AdornedSeat = nil
	ButtonGui.Adornee = nil
	ButtonGui.Parent = script
	ButtonGui.Enabled = false
end

while true do
	if HRP and Humanoid then
		if not Humanoid.Sit then
			local Closest = math.huge
			local ClosestSeat = nil
			for i,Seat in pairs(Seats) do
				local Dist = (HRP.Position - Seat.Position).magnitude
				if Dist < Closest and Dist < MaxDistance and not Seat:FindFirstChild("SeatWeld") then
					Closest = Dist
					ClosestSeat = Seat
				end
			end
			if ClosestSeat then
				DisplayPrompt(ClosestSeat)
			else
				HidePrompt()
			end
		else
			HidePrompt()
		end
	else
		HidePrompt()
	end
	wait(0.15)
end
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 335
	Tune.IdleRPM		= 700
	Tune.PeakRPM		= 5600
	Tune.Redline		= 6200
	Tune.EqPoint		= 5250
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 1.35			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 200		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 0			-- Percent throttle at idle
	Tune.ClutchTol		= 700		-- Clutch engagement threshold (higher = faster response)
-- httpImpl : (table, optional) a service that implements RequestAsync


function Networking.new(httpImpl)
	if not httpImpl then
		httpImpl = HttpService
	end

	local n = {
		-- some default headers
		_headers = {
			["Content-Type"] = "application/json",
		},

		-- the object that will fire the http requests
		_httpImpl = httpImpl
	}
	setmetatable(n, Networking)

	return n
end
--[[*
 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 ]]



local CurrentModule = script.Parent
local Packages = CurrentModule.Parent
local LuauPolyfill = require(Packages.LuauPolyfill)
local Boolean = LuauPolyfill.Boolean
local RobloxShared = require(Packages.RobloxShared)
type Writeable = RobloxShared.Writeable
local exports = {}

local function clearLine(stream: Writeable): ()
	if Boolean.toJSBoolean(stream.isTTY) then
		stream:write("\x1b[999D\x1b[K")
	end
end
exports.default = clearLine

return exports
-- -- -- -- -- -- --
--DIRECTION SCROLL--
-- -- -- -- -- -- --



Lift:WaitForChild("Velocity").Changed:connect(function(vel)
	if vel > 0 then
		This.Display.ARW1.U1.BrickColor = BrickColor.new("Dark green")
		This.Display.ARW1.U2.BrickColor = BrickColor.new("Dark green")
		This.Display.ARW1.M1.BrickColor = BrickColor.new("Dark green")
		This.Display.ARW1.D1.BrickColor = BrickColor.new("Really black")
		This.Display.ARW1.D2.BrickColor = BrickColor.new("Really black")
	elseif vel < 0 then
		This.Display.ARW1.U1.BrickColor = BrickColor.new("Really black")
		This.Display.ARW1.U2.BrickColor = BrickColor.new("Really black")
		This.Display.ARW1.M1.BrickColor = BrickColor.new("Dark green")
		This.Display.ARW1.D1.BrickColor = BrickColor.new("Dark green")
		This.Display.ARW1.D2.BrickColor = BrickColor.new("Dark green")
	else
		This.Display.ARW1.U1.BrickColor = BrickColor.new("Really black")
		This.Display.ARW1.U2.BrickColor = BrickColor.new("Really black")
		This.Display.ARW1.M1.BrickColor = BrickColor.new("Really black")
		This.Display.ARW1.D1.BrickColor = BrickColor.new("Really black")
		This.Display.ARW1.D2.BrickColor = BrickColor.new("Really black")
	end
end)
--Made by Luckymaxer



Figure = script.Parent

Humanoid = Figure:WaitForChild("Humanoid")

Regenerating = false

function RegenerateHealth()
	if Regenerating then
		return
	end
	Regenerating = true
	while Humanoid.Health < Humanoid.MaxHealth do
		local Second = wait(1)
		local Health = Humanoid.Health
		if Health > 0 and Health < Humanoid.MaxHealth then
			local NewHealthDelta = (0.01 * Second * Humanoid.MaxHealth)
			Health = (Health + NewHealthDelta)
			Humanoid.Health = math.min(Health, Humanoid.MaxHealth)
		end
	end
	if Humanoid.Health > Humanoid.MaxHealth then
		Humanoid.Health = Humanoid.MaxHealth
	end
	Regenerating = false
end

Humanoid.HealthChanged:connect(RegenerateHealth)
--[[Weight and CG]]


	Tune.Weight			= 4050		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		.2		,
	 --[[Height]]		.2		,
	 --[[Length]]		.2		}
	Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible

	--Unsprung Weight
	Tune.FWheelDensity	= 0.3		-- Front Wheel Density
	Tune.RWheelDensity	= 0.3		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1.5			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1.5			-- Rear Wheel Density [PGS OFF]
	
	Tune.AxleSize		= 2			-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members