Roblox/luau_corpus huggingface dataset:
--[[
	The Ownership-class 
	
--]]

local Players = game:GetService("Players")
local Owners = {}

local Ownership = {}
Ownership.__index = Ownership

function Ownership.new(Model)
	assert(Model and Model.PrimaryPart, "Ownership.new(Model) requires a Model with a PrimaryPart!")
	local Data = {
		Model = Model,
		Owner = nil,
		_OwnerChangedEvent = nil,
		OwnerChanged = nil
	}
	
	local self = setmetatable(Data, Ownership)
	self._OwnerChangedEvent = Instance.new("BindableEvent")
	self.OwnerChanged = self._OwnerChangedEvent.Event
	
	return self
end
-- 										 If you want the sound to be heard in one spot, put it in a brick
--
music.Pitch = 1 -- Pitch manages the Pitch and Speed of the Sound. Pitch 1 is the normal sound, although some sounds have a problem that they are slow, increase this
--[[return function()
	--- Create seed based on tick and RNG
	local seed = os.time()
	local seed2 = rng:NextNumber() * 1
	local comp = (seed * seed2)
	
	--- Format seed to hex
	local str = string.format("%x", comp * 256)
	
	--
	return str
end ]]


return function()
	local UUID4 = _L.Services.HttpService:GenerateGUID(false)
	UUID4 = string.gsub(UUID4, "-", "")
	return UUID4
end
-------------Cannon Properties---------------------------------------------------------------------------------------------------------------
	local targetRange = 40--max range +/- 5
	local power = 350 -- cannon Force , Bullet speed
	local cannonAcc = 20 --The less = better , if theres acc = 20 then  the miss range is between -20 and 20
--Make the part spin around the humanoid player
while true do
	mainPart.CFrame = Humanoid.CFrame * CFrame.Angles(0, math.rad(1), 0)
	wait(1)
end
--F.updateSound = function(Sound, Pitch, Volume)
--	if Sound then
--		if Pitch then
--			Sound.Pitch = Pitch
--		end
--		if Volume then
--			Sound.Volume = Volume
--		end
--	end
--end

F.updateWindows = function(Window, Toggle)
	if script.Parent.Parent.Windows:findFirstChild(Window) then
		script.Parent.Parent.Windows:findFirstChild(Window).Value = Toggle
	end	
end

F.updateSong = function(Song)
	carSeat.Parent.Body.MP.Sound:Stop()
	wait()
	carSeat.Parent.Body.MP.Sound.SoundId = "rbxassetid://"..Song
	wait()
	carSeat.Parent.Body.MP.Sound:Play()
end

F.updateVolume = function(Vol)
	carSeat.Parent.Body.MP.Sound.Volume = carSeat.Parent.Body.MP.Sound.Volume + Vol
end

F.updateValue = function(Val, Value)
	if Val then
		Val.Value = Value
	end
end
-- Local Variables
local Configurations = require(game.ServerStorage.Configurations)
local Events = game.ReplicatedStorage.Events
local DisplayIntermission = Events.DisplayIntermission
local DisplayTimerInfo = Events.DisplayTimerInfo
local DisplayVictory = Events.DisplayVictory
local DisplayScore = Events.DisplayScore
local StarterGui = game.StarterGui
--		child.C0 = CFrame.new(0,-0.6,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0) --// Reposition player
		if child.Part1.Name == "HumanoidRootPart" then
			player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
			if player and (not player.PlayerGui:FindFirstChild("Screen")) then --// The part after the "and" prevents multiple GUI's to be copied over.
				GUI.CarSeat.Value = script.Parent --// Puts a reference of the seat in this ObjectValue, now you can use this ObjectValue's value to find the car directly.
				GUI:Clone().Parent = player.PlayerGui --// Compact version
				if script.Parent.SingleMode.Value == true then
					wait()
					script.Parent.Disabled = true
					wait()
					script.Parent.Disabled = false
				else
					script.Parent.Occupied.Value = true
				end
			end
		end
	end
end)

script.Parent.ChildRemoved:connect(function(child)
	if child:IsA("Weld") then
		if child.Part1.Name == "HumanoidRootPart" then
			game.Workspace.CurrentCamera.FieldOfView = 70
			player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
			if player and player.PlayerGui:FindFirstChild("SS3") then
				player.PlayerGui:FindFirstChild("SS3"):Destroy()
				script.Parent.Occupied.Value = false
			end
		end
	end	
end)
--put in ServerScriptService
local Teams = game:GetService("Teams"):GetChildren()

game.Players.PlayerAdded:Connect(function(player)
	
	for i,player in pairs(game.Players:GetPlayers()) do
		if player then
			if player.Team == nil then
				local randomTeam = Teams[math.random(1, #Teams)]
				
				player.Team = randomTeam
				
				print(player.Name.. " is a "..randomTeam.Name)
			end
		end
	end
end)
-- To avoid using .Activated for each slot we do this
-- better for optimization
local function onInputBegan(input: InputObject, processed)
	if not ScreenGui.Enabled then 
		return
	end
	
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		for _, obj in ScreenGui.Parent:GetGuiObjectsAtPosition(input.Position.X, input.Position.Y) do
			if IsSlot(obj) then
				ChangeToolHold(obj)
				return
			end
		end
	end
	
	if processed then
		return
	end
	
	if input.KeyCode == Enum.KeyCode.Backquote then
		local tween = TweenService:Create(Backpack, TweenInfo.new(), {
			Size = if IsBackpackOpen
				then UDim2.fromScale(1, 0)
				else BackpackSize
		})
		
		IsBackpackOpen = not IsBackpackOpen
		Backpack.List.ScrollBarThickness = if IsBackpackOpen then 12 else 0
		
		tween:Destroy()
		tween:Play()
	elseif input.UserInputType == Enum.UserInputType.Keyboard then
		local value = input.KeyCode.Value - Enum.KeyCode.Zero.Value
		
		if value < 0 or value > 9 then
			return
		end
		
		local slot = HandleBar["Slot" .. value]
		ChangeToolHold(slot)
	end
end

for _, v in LocalPlayer.Backpack:GetChildren() do
	AddSlotObject(v)
end

LocalPlayer.Backpack.ChildAdded:Connect(doCheckAndReplaceTools)
LocalPlayer.Backpack.ChildRemoved:Connect(doCheckAndReplaceTools)
LocalPlayer.CharacterAdded:Connect(HandleCharacter)
UserInputService.InputBegan:Connect(onInputBegan)
------CruisinWithMyHomies ^--- 

winfob.FL.Lock.MouseButton1Click:connect(function() --Window
 if carSeat.WindowFL.Value == false then 
  carSeat.WindowFL.Value = true
  carSeat.Parent.Parent.DoorLD.Window.SS.Motor.DesiredAngle = -0.25
 else carSeat.WindowFL.Value = false
  carSeat.Parent.Parent.DoorLD.Window.SS.Motor.DesiredAngle = 0
 end
end)

winfob.FR.Lock.MouseButton1Click:connect(function() --Window
 if carSeat.WindowFR.Value == false then 
  carSeat.WindowFR.Value = true
  carSeat.Parent.Parent.DoorRD.Window.SS.Motor.DesiredAngle = 0.25
 else carSeat.WindowFR.Value = false
  carSeat.Parent.Parent.DoorRD.Window.SS.Motor.DesiredAngle = 0
 end
end)

winfob.RL.Lock.MouseButton1Click:connect(function() --Window
 if carSeat.WindowRL.Value == false then 
  carSeat.WindowRL.Value = true
  carSeat.Parent.Parent.DoorL.W.SS.Motor.DesiredAngle = 0.25
 else carSeat.WindowRL.Value = false
  carSeat.Parent.Parent.DoorL.W.SS.Motor.DesiredAngle = 0
 end
end)

winfob.RR.Lock.MouseButton1Click:connect(function() --Window
 if carSeat.WindowRR.Value == false then 
  carSeat.WindowRR.Value = true
  carSeat.Parent.Parent.DoorR.W.SS.Motor.DesiredAngle = 0.25
 else carSeat.WindowRR.Value = false
  carSeat.Parent.Parent.DoorR.W.SS.Motor.DesiredAngle = 0
 end
end)
while true do --Loop
	wait()
	if gear == -1 then
		HUB.Parent.Gauges.Circle.Zero.Gear.Text = "R"
		carSeat.Parent.Parent.Trunk.R1.Material = "Neon"
		carSeat.Parent.Parent.Trunk.R2.Material = "Neon"
		carSeat.Parent.R1.Material = "Neon"
		carSeat.Parent.R2.Material = "Neon"
		carSeat.Parent.Parent.Trunk.R1.Transparency = 0
		carSeat.Parent.Parent.Trunk.R2.Transparency = 0
		carSeat.Parent.R1.Transparency = 0
		carSeat.Parent.R2.Transparency = 0
		carSeat.Parent.Runners.O.Disp.One.Visible = false
		carSeat.Parent.Runners.O.Disp.Two.Visible = true
	elseif gear == 0 then
		HUB.Parent.Gauges.Circle.Zero.Gear.Text = "N"
		carSeat.Parent.Parent.Trunk.R1.Material = "SmoothPlastic"
		carSeat.Parent.Parent.Trunk.R2.Material = "SmoothPlastic"
		carSeat.Parent.R1.Material = "SmoothPlastic"
		carSeat.Parent.R2.Material = "SmoothPlastic"
		carSeat.Parent.Parent.Trunk.R1.Transparency = 0.9
		carSeat.Parent.Parent.Trunk.R2.Transparency = 0.9
		carSeat.Parent.R1.Transparency = 0.9
		carSeat.Parent.Runners.O.Disp.One.Visible = true
		carSeat.Parent.Runners.O.Disp.Two.Visible = false
		carSeat.Parent.R2.Transparency = 0.9
	elseif gear == 1 then
		HUB.Parent.Gauges.Circle.Zero.Gear.Text = "D"
	end
	if carSeat.Throttle == 1 and gear >= 1 or gear == -1 and carSeat.Throttle == 1 then
		if carSeat.InsaneMode.Value == true and carSeat.Power.Value < 60 then
			carSeat.Power.Value = carSeat.Power.Value + 3
		elseif carSeat.InsaneMode.Value == false and carSeat.Power.Value < 40 then
			carSeat.Power.Value = carSeat.Power.Value +2
		end
	else
		carSeat.Power.Value = 0
	end
	limitButton.Parent.Time.Text = game.Lighting.TimeOfDay
end
--[=[
	Use  to test that the top padding between the given GuiObject or Rect and
	the other GuiObject or Rect.

	The last argument is optional. If nil, the matcher will pass only if the
	difference **top** edge of the given GuiObject or Rect and the **top** edge
	of the other GuiObject or Rect is zero or positive.

	```lua
	-- Jest
	expect(instanceA).toBeInsideBelow(instanceB)
	expect(instanceA).toBeInsideBelow(instanceB, 10)
	expect(instanceA).toBeInsideBelow(instanceB, NumberRange.new(0, 10))
	```

	```lua
	-- TestEZ
	expect(instanceA).to.be.insideBelow(instanceB)
	expect(instanceA).to.be.insideBelow(instanceB, 10)
	expect(instanceA).to.be.insideBelow(instanceB, NumberRange.new(0, 10))
	```

	@tag inside
	@within CollisionMatchers2D
]=]
local function insideBelow(a: GuiObject | Rect, b: GuiObject | Rect, distance: number | NumberRange)
	local aRect = toRect(a)
	local bRect = toRect(b)

	local distanceFromSide = (aRect.Min - bRect.Min)
	if distance then
		if typeof(distance) == "number" then
			distance = NumberRange.new(distance)
		end

		return returnValue(
			distance.Min <= distanceFromSide.Y and distance.Max >= distanceFromSide.Y,
			"Was within range",
			"Was not within range ( " .. tostring(distance) .. ")"
		)
	else
		return returnValue(distanceFromSide.Y >= 0, "Was not above the element", "Was too far above the element")
	end
end

return insideBelow
-- Creates a viewport with a given object, has 1,1 size and is positioned in middle of parent element.
VC.CreateViewport = function(parent,Object,Rotation, distanceOverride)
	
	local Viewport =Instance.new("ViewportFrame")
	
	if parent:FindFirstChild("ViewportFrame") then
		parent:FindFirstChild("ViewportFrame"):Destroy()
	end
	
	Viewport.LightDirection = Vector3.new(0, -1, 0)
	
	Viewport.LightColor = Color3.fromRGB(255, 167, 43)
	
	Viewport.Ambient = Color3.fromRGB(255,255,255)
	
	
	local OriginalObj = Object
--humanoid.AutoRotate = false

local root = chr:WaitForChild("HumanoidRootPart")
local torso = chr:WaitForChild("Torso")
local head = chr:WaitForChild("Head")

local rj = root:WaitForChild("RootJoint")
local rh, lh = torso:WaitForChild("Right Hip"), torso:WaitForChild("Left Hip")
local rs, ls = torso:WaitForChild("Right Shoulder"), torso:WaitForChild("Left Shoulder")
local nk = torso:WaitForChild("Neck")

rj, nk, rs, ls, rh, lh = rj:Clone(), nk:Clone(), rs:Clone(), ls:Clone(), rh:Clone(), lh:Clone()
rj.Parent, nk.Parent, rs.Parent, ls.Parent, rh.Parent, lh.Parent =
	root, torso, torso, torso, torso, torso

local rjc0, nkc0, rsc0, lsc0, rhc0, lhc0 = rj.C0, nk.C0, rs.C0, ls.C0, rh.C0, lh.C0

local transfer = script.Parent:WaitForChild("transfer")

local aiming = false
local crouch = false

local conn; conn = runService.Heartbeat:Connect(function()
	local mouseHit = mse.Hit
	
	local dist = (head.Position - cam.CFrame.p).Magnitude
	local diff = head.CFrame.Y - cam.CFrame.Y
	
	local ang = aiming and -math.rad(18) or 0
	
	nk.C0 = nk.C0:Lerp(nkc0 * CFrame.Angles(-math.atan(diff / dist), ang, 0), 0.2)
	-- repost if you hate manipulating r6 joints
	rs.C0 = rs.C0:Lerp(rsc0 * CFrame.Angles(0, 0, math.atan(diff / dist) * 0.9), 0.2)
	ls.C0 = ls.C0:Lerp(lsc0 * CFrame.Angles(0, 0, -math.atan(diff / dist) * 0.9), 0.2)
	
	--root.CFrame = CFrame.lookAt(root.Position, Vector3.new(mouseHit.X, root.Position.Y, mouseHit.Z))
	
	if crouch then
		humanoid.CameraOffset = humanoid.CameraOffset:Lerp(Vector3.new(0, -2, 0), 0.2)
		
		rj.C0 = rj.C0:Lerp(rjc0 * CFrame.new(0, 0, -1.7) * CFrame.Angles(math.rad(20), 0, 0), 0.2)
		rh.C0 = rh.C0:Lerp(rhc0 * CFrame.Angles(0, 0, -math.rad(30)) * CFrame.new(0.25, 1.7, 0), 0.2)
		lh.C0 = lh.C0:Lerp(lhc0 * CFrame.Angles(0, 0, math.rad(30)) * CFrame.new(-0.25, 1.7, 0), 0.2)
	else
		humanoid.CameraOffset = humanoid.CameraOffset:Lerp(Vector3.new(), 0.25)
		
		rj.C0 = rj.C0:Lerp(rjc0, 0.25)
		rh.C0 = rh.C0:Lerp(rhc0, 0.25)
		lh.C0 = lh.C0:Lerp(lhc0, 0.25)
	end
	
	transfer:FireServer(rj.C0, nk.C0, rs.C0, ls.C0, rh.C0, lh.C0)
	
	if humanoid:GetState() == Enum.HumanoidStateType.Dead then
		conn:Disconnect()
		return
	end
end)

UIS.InputBegan:Connect(function(inp, gp)
	if not gp then
		if inp.KeyCode == Enum.KeyCode.LeftControl and humanoid.Sit == false and humanoid.PlatformStand == false then
			crouch = true
			humanoid.WalkSpeed = 10
		end
	end
end)

UIS.InputEnded:Connect(function(inp, gp) -- i hate typing out UIS functions
	if not gp then
		if inp.KeyCode == Enum.KeyCode.LeftControl then
			crouch = false
			humanoid.WalkSpeed = 16
		end
	end
end)

script.aimEvent.Event:Connect(function(bool)
	if type(bool) == "boolean" then
		aiming = bool
	end
end)

humanoid:GetPropertyChangedSignal("Sit"):Connect(function()
	if humanoid.Sit == true then
		crouch = false
		humanoid.WalkSpeed = 16
	end
end)
-- Local Functions
local function StartIntermission()
	-- Default to circle center of map
	local possiblePoints = {}
	table.insert(possiblePoints, Vector3.new(0,50,0))
	
	local focalPoint = possiblePoints[math.random(#possiblePoints)]
	Camera.CameraType = Enum.CameraType.Scriptable
	Camera.Focus = CFrame.new(focalPoint)
	
	local angle = 0
	game.Lighting.Blur.Enabled = true
	RunService:BindToRenderStep('IntermissionRotate', Enum.RenderPriority.Camera.Value, function()
		local cameraPosition = focalPoint + Vector3.new(50 * math.cos(angle), 20, 50 * math.sin(angle))
		Camera.CoordinateFrame = CFrame.new(cameraPosition, focalPoint)
		angle = angle + math.rad(.25)
		
		if BlurBlock then
		BlurBlock.CFrame = Camera.CoordinateFrame + 
			Camera.CoordinateFrame:vectorToWorldSpace(Vector3.new(0,0,-2))
		end
	end)
	
	ScreenGui.ScoreFrame["Bright blue"].Visible = false
	ScreenGui.ScoreFrame["Bright red"].Visible = false
end

local function StopIntermission()
	game.Lighting.Blur.Enabled = false
	RunService:UnbindFromRenderStep('IntermissionRotate')
	Camera.CameraType = Enum.CameraType.Custom
	if IsTeams then
		ScreenGui.ScoreFrame["Bright blue"].Visible = true
		ScreenGui.ScoreFrame["Bright red"].Visible = true
	end
end

local function OnDisplayIntermission(display)
	if display and not InIntermission then
		InIntermission = true
		StartIntermission()
	end	
	if not display and InIntermission then
		InIntermission = false
		StopIntermission()
	end
end

local function OnSetBlurBlock(block)
	BlurBlock = block
	BlurBlock.LocalTransparencyModifier = 0
end

local function OnFetchConfiguration(configFetched, configValue)
	if configFetched == "TEAMS" then
		IsTeams = configValue
		ScreenGui.ScoreFrame["Bright blue"].Visible = IsTeams
		ScreenGui.ScoreFrame["Bright red"].Visible = IsTeams
	end
end
-- Public Constructors

function CubicSpline.Natural(points)
	local self = setmetatable({}, CubicSpline)
	
	self.Points = points
	self.Coefficients = {naturalCubicSpline(points)}

	local lengths = {}
	local total = 0
	for k = 1, #points - 1 do
		lengths[k] = integrate(self, k, 1)
		total = total + lengths[k]
	end
	
	self.Lengths = lengths
	self.TotalLength = total
	
	return self
end

function CubicSpline.Clamped(points, fpo, fpn)
	local self = setmetatable({}, CubicSpline)
	
	self.Points = points
	self.Coefficients = {clampedCubicSpline(points, fpo, fpn)}

	local lengths = {}
	local total = 0
	for k = 1, #points - 1 do
		lengths[k] = integrate(self, k, 1)
		total = total + lengths[k]
	end
	
	self.Lengths = lengths
	self.TotalLength = total
	
	return self
end
wait(.1)

	shaft:remove()

end



t, s = r.Stepped:wait()



note = script.Parent.chord

note:play()



d = t + 10.0 - s

--connection = shaft.Touched:connect(blow)



while t < d do

	for i = 1,10 do

		fly()

		t = r.Stepped:wait()

	end

	switchpos()

end



-- at max range

--script.Parent.Explosion.PlayOnRemove = false

note:stop()

shaft:remove()
-- Functions

function SPRING.Create(self, mass, force, damping, speed)
	local spring	= {
		Target		= Vector3.new();
		Position	= Vector3.new();
		Velocity	= Vector3.new();
		
		Mass		= mass or 1;
		Force		= force or 50;
		Damping		= damping or 2;
		Speed		= speed or 1;
	}
	
	function spring.Shove(self, force)
		local x, y, z	= force.X, force.Y, force.Z
		if x ~= x or x == math.huge or x == -math.huge then
			x	= 0
		end
		if y ~= y or y == math.huge or y == -math.huge then
			y	= 0
		end
		if z ~= z or z == math.huge or z == -math.huge then
			z	= 0
		end
		self.Velocity	= self.Velocity + Vector3.new(x, y, z)
	end
	
	function spring.Update(self, dt)
		local scaledDeltaTime	= math.min(dt * self.Speed, 0.1)
		
		local force			= self.Target - self.Position
		local acceleration	= (force * self.Force) / self.Mass
		
		acceleration		= acceleration - self.Velocity * self.Damping
		
		self.Velocity	= self.Velocity + acceleration * scaledDeltaTime
		self.Position	= self.Position + self.Velocity * scaledDeltaTime
		
		return self.Position
	end
	
	return spring
end
--// WebPanel module uploaded as a group model due to there being multiple maintainers 
--// Module source available at https://www.roblox.com/library/6289861017/WebPanel-Module


return function(Vargs)
	local server = Vargs.Server;
	local service = Vargs.Service;
	local settings = server.Settings;

	--[[
		settings.WebPanel_Enabled = true;
		wait(1)
		settings.WebPanel_ApiKey = _G.ADONIS_WEBPANEL_TESTING_APIKEY;
	--]]

	--// Note: This will only run/be required if the WebPanel_Enabled setting is true at server startup
	if server.Settings.WebPanel_Enabled then
		local WebModFunc = require(6289861017)
		if WebModFunc then 
			WebModFunc(Vargs)
		end
	end
end
--Clutch: "RPM" mode
Tune.ClutchRPMMult	= 1.0		-- Clutch RPM multiplier, recommended to leave at 1.0
-- Disable the healthbar
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health,false)
--[[ Public API ]]--
function TouchJump:Enable()
	JumpButton.Visible = true
end

function TouchJump:Disable()
	JumpButton.Visible = false
	OnInputEnded()
end

function TouchJump:Create(parentFrame)
	if JumpButton then
		JumpButton:Destroy()
		JumpButton = nil
	end
	
	local isSmallScreen = parentFrame.AbsoluteSize.y <= 500
	local jumpButtonSize = isSmallScreen and 70 or 90
	
	JumpButton = Instance.new('ImageButton')
	JumpButton.Name = "JumpButton"
	JumpButton.Visible = false
	JumpButton.BackgroundTransparency = 1
	JumpButton.Image = TOUCH_CONTROL_SHEET
	JumpButton.ImageRectOffset = Vector2.new(176, 222)
	JumpButton.ImageRectSize = Vector2.new(174, 174)
	JumpButton.Size = UDim2.new(0, jumpButtonSize, 0, jumpButtonSize)
	JumpButton.Position = isSmallScreen and UDim2.new(1, jumpButtonSize * -2.25, 1, -jumpButtonSize - 20) or
		UDim2.new(1, jumpButtonSize * -2.75, 1, -jumpButtonSize - 120)
	
	local touchObject = nil	
	JumpButton.InputBegan:connect(function(inputObject)
		if touchObject or inputObject.UserInputType ~= Enum.UserInputType.Touch then
			return
		end
		
		touchObject = inputObject
		JumpButton.ImageRectOffset = Vector2.new(0, 222)
		if MasterControl then
			MasterControl(true)
		end
	end)
	
	OnInputEnded = function()
		touchObject = nil
		if MasterControl then
			MasterControl(false)
		end
		JumpButton.ImageRectOffset = Vector2.new(176, 222)
	end
	
	JumpButton.InputEnded:connect(function(inputObject)
		if inputObject == touchObject then
			OnInputEnded()
		end
	end)
	
	JumpButton.Parent = parentFrame
	return function(func)
		MasterControl = func
	end
end

return TouchJump
--Miksu173--
r = game:service("RunService")

shaft = script.Parent
position = shaft.Position

script.Parent.Explosion.PlayOnRemove = true -- play explosion sound when projectile removed from game

function fly()
	direction = shaft.CFrame.lookVector 
	position = position + direction * 5
	error = position - shaft.Position
	shaft.Velocity = 7*error
end

function blow()
	swoosh:stop()
	explosion = Instance.new("Explosion")
	explosion.BlastRadius = 12
	explosion.BlastPressure = 1000000 -- these are really wussy units
	explosion.Position = shaft.Position


	-- find instigator tag
	local creator = script.Parent:findFirstChild("creator")
	if creator ~= nil then
		explosion.Hit:connect(function(part, distance)  onPlayerBlownUp(part, distance, creator) end)
	end

	explosion.Parent = game.Workspace
	connection:disconnect()
	wait(.1)
	shaft:remove()
end

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

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

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

t, s = r.Stepped:wait()

swoosh = script.Parent.Swoosh
swoosh:play()

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

while t < d do
	fly()
	t = r.Stepped:wait()
end
-- Requires
local PartUtility = require(ReplicatedStorage.Common.PartUtility)
--[[
	Creates a new promise that receives the result of this promise.

	The given callbacks are invoked depending on that result.
]]
function Promise:andThen(successHandler, failureHandler)
	-- Even if we haven't specified a failure handler, the rejection will be automatically
	-- passed on by the advancer; other promises in the chain may have unhandled rejections,
	-- but this one is taken care of as soon as any andThen is connected
	self._unhandledRejection = false

	-- Create a new promise to follow this part of the chain
	return Promise.new(function(resolve, reject)
		-- Our default callbacks just pass values onto the next promise.
		-- This lets success and failure cascade correctly!

		local successCallback = resolve
		if successHandler then
			successCallback = createAdvancer(successHandler, resolve, reject)
		end

		local failureCallback = reject
		if failureHandler then
			failureCallback = createAdvancer(failureHandler, resolve, reject)
		end

		if self._status == Promise.Status.Started then
			-- If we haven't resolved yet, put ourselves into the queue
			table.insert(self._queuedResolve, successCallback)
			table.insert(self._queuedReject, failureCallback)
		elseif self._status == Promise.Status.Resolved then
			-- This promise has already resolved! Trigger success immediately.
			successCallback(unpack(self._value))
		elseif self._status == Promise.Status.Rejected then
			-- This promise died a terrible death! Trigger failure immediately.
			failureCallback(unpack(self._value))
		end
	end)
end
-- This screenGui exists so that the billboardGui is not deleted when the PlayerGui is reset.
local BubbleChatScreenGui = Instance.new("ScreenGui")
BubbleChatScreenGui.Name = "BubbleChat"
BubbleChatScreenGui.ResetOnSpawn = false
BubbleChatScreenGui.Parent = PlayerGui

local testLabel = Instance.new("TextLabel")
testLabel.Selectable = false
testLabel.TextWrapped = true
testLabel.Position = UDim2.new(1, 0, 1, 0)
testLabel.Parent = BubbleChatScreenGui

local TextSizeCache = {}