Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- Create component


local Notifications = Roact.PureComponent:extend(script.Name)

function Notifications:init()
    self.Active = true
    self:setState({
        ShouldWarnAboutHttpService = false;
        ShouldWarnAboutUpdate = false;
    })

    fastSpawn(function ()
        local IsOutdated = self.props.Core.IsVersionOutdated()
        if self.Active then
            self:setState({
                ShouldWarnAboutUpdate = IsOutdated;
            })
        end
    end)
    fastSpawn(function ()
        local Core = self.props.Core
        local IsHttpServiceDisabled = (Core.Mode == 'Tool') and
            not Core.SyncAPI:Invoke('IsHttpServiceEnabled')
        if self.Active then
            self:setState({
                ShouldWarnAboutHttpService = IsHttpServiceDisabled;
            })
        end
    end)
end

function Notifications:willUnmount()
    self.Active = false
end

function Notifications:render()
    return new('ScreenGui', {}, {
        Container = new('Frame', {
            AnchorPoint = Vector2.new(0.5, 0.5);
            BackgroundTransparency = 1;
            Position = UDim2.new(0.5, 0, 0.5, 0);
            Size = UDim2.new(0, 300, 1, 0);
        }, {
            Layout = new('UIListLayout', {
                Padding = UDim.new(0, 10);
                FillDirection = Enum.FillDirection.Vertical;
                HorizontalAlignment = Enum.HorizontalAlignment.Left;
                VerticalAlignment = Enum.VerticalAlignment.Center;
                SortOrder = Enum.SortOrder.LayoutOrder;
            });
            UpdateNotification = (self.state.ShouldWarnAboutUpdate or nil) and new(NotificationDialog, {
                LayoutOrder = 1;
                ThemeColor = Color3.fromRGB(255, 170, 0);
                NoticeText = 'This version of Building Tools is <b>outdated.</b>';
                DetailText = (self.props.Core.Mode == 'Plugin') and
                    'To update plugins, go to\n<b>PLUGINS</b> > <b>Manage Plugins</b> :-)' or
                    'Own this place? Simply <b>reinsert</b> the Building Tools model.';
                OnDismiss = function ()
                    self:setState({
                        ShouldWarnAboutUpdate = false;
                    })
                end;
            });
            HTTPEnabledNotification = (self.state.ShouldWarnAboutHttpService or nil) and new(NotificationDialog, {
                LayoutOrder = 0;
                ThemeColor = Color3.fromRGB(255, 0, 4);
                NoticeText = 'HTTP requests must be <b>enabled</b> for some features of Building Tools to work, including exporting.';
                DetailText = 'Own this place? Edit it in Studio, and toggle on\nHOME > <b>Game Settings</b> > Security > <b>Allow HTTP Requests</b> :-)';
                OnDismiss = function ()
                    self:setState({
                        ShouldWarnAboutHttpService = false;
                    })
                end;
            });
        });
    })
end

return Notifications
--- Helper method that registers types from all module scripts in a specific container.


function Registry:RegisterTypesIn (container)
	for _, object in pairs(container:GetChildren()) do
		if object:IsA("ModuleScript") then
			object.Parent = self.Cmdr.ReplicatedRoot.Types

			require(object)(self)
		else
			self:RegisterTypesIn(object)
		end
	end
end
-- Checks for conditions for enabling/disabling the active controller and updates whether the active controller is enabled/disabled


function ControlModule:UpdateActiveControlModuleEnabled()
	-- helpers for disable/enable
	local disable = function()
		self.activeController:Enable(false)

		if self.moveFunction then
			self.moveFunction(Players.LocalPlayer, Vector3.new(0,0,0), true)
		end
	end

	local enable = function()
		if self.activeControlModule == ClickToMove then
			-- For ClickToMove, when it is the player's choice, we also enable the full keyboard controls.
			-- When the developer is forcing click to move, the most keyboard controls (WASD) are not available, only jump.
			self.activeController:Enable(
				true,
				Players.LocalPlayer.DevComputerMovementMode == Enum.DevComputerMovementMode.UserChoice,
				self.touchJumpController
			)
		elseif self.touchControlFrame then
			self.activeController:Enable(true, self.touchControlFrame)
		else
			self.activeController:Enable(true)
		end
	end

	-- there is no active controller
	if not self.activeController then
		return
	end

	-- developer called ControlModule:Disable(), don't turn back on
	if not self.controlsEnabled then
		disable()
		return
	end

	-- GuiService.TouchControlsEnabled == false and the active controller is a touch controller,
	-- disable controls
	if not GuiService.TouchControlsEnabled and UserInputService.TouchEnabled and
			(self.activeControlModule == ClickToMove or self.activeControlModule == TouchThumbstick or
			self.activeControlModule == DynamicThumbstick) then
		disable()
		return
	end

	-- no settings prevent enabling controls
	enable()
end

function ControlModule:Enable(enable: boolean?)
	if enable == nil then
		enable = true
	end
	self.controlsEnabled = enable

	if not self.activeController then
		return
	end

	self:UpdateActiveControlModuleEnabled()
end
--		print(animName .. " * " .. idx .. " [" .. origRoll .. "]")


		local anim = animTable[animName][idx].anim

		if (toolAnimInstance ~= anim) then
			
			if (toolAnimTrack ~= nil) then
				toolAnimTrack:Stop()
				toolAnimTrack:Destroy()
				transitionTime = 0
			end
					
			-- load it to the humanoid; get AnimationTrack
			toolAnimTrack = humanoid:LoadAnimation(anim)
			 
			-- play the animation
			toolAnimTrack:Play(transitionTime)
			toolAnimName = animName
			toolAnimInstance = anim

			currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
		end
end

function stopToolAnimations()
	local oldAnim = toolAnimName

	if (currentToolAnimKeyframeHandler ~= nil) then
		currentToolAnimKeyframeHandler:disconnect()
	end

	toolAnimName = ""
	toolAnimInstance = nil
	if (toolAnimTrack ~= nil) then
		toolAnimTrack:Stop()
		toolAnimTrack:Destroy()
		toolAnimTrack = nil
	end


	return oldAnim
end
--[[ Constants ]]

--
local ZERO_VECTOR3 = Vector3.new(0,0,0)
local TOUCH_CONTROLS_SHEET = "rbxasset://textures/ui/Input/TouchControlsSheetV2.png"

local DYNAMIC_THUMBSTICK_ACTION_NAME = "DynamicThumbstickAction"
local DYNAMIC_THUMBSTICK_ACTION_PRIORITY = Enum.ContextActionPriority.High.Value

local MIDDLE_TRANSPARENCIES = {
	1 - 0.89,
	1 - 0.70,
	1 - 0.60,
	1 - 0.50,
	1 - 0.40,
	1 - 0.30,
	1 - 0.25
}
local NUM_MIDDLE_IMAGES = #MIDDLE_TRANSPARENCIES

local FADE_IN_OUT_BACKGROUND = true
local FADE_IN_OUT_MAX_ALPHA = 0.35

local FADE_IN_OUT_HALF_DURATION_DEFAULT = 0.3
local FADE_IN_OUT_BALANCE_DEFAULT = 0.5
local ThumbstickFadeTweenInfo = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)

local Players = game:GetService("Players")
local GuiService = game:GetService("GuiService")
local UserInputService = game:GetService("UserInputService")
local ContextActionService = game:GetService("ContextActionService")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")

local LocalPlayer = Players.LocalPlayer
if not LocalPlayer then
	Players:GetPropertyChangedSignal("LocalPlayer"):Wait()
	LocalPlayer = Players.LocalPlayer
end
--------END LIGHT SET 1--------
--------DJ BACKLIGHT--------



game.Workspace.djbacklight.l1.BrickColor = BrickColor.new(194)
game.Workspace.djbacklight.l2.BrickColor = BrickColor.new(194)
game.Workspace.djbacklight.l3.BrickColor = BrickColor.new(194)
game.Workspace.djbacklight.l4.BrickColor = BrickColor.new(194)
-- Called when the player's character is added.
-- Sets up mirroring of the player's head for first person.



function FpsCamera:OnCharacterAdded(character)
	local mirrorBin = self.MirrorBin
	
	if mirrorBin then
		mirrorBin:ClearAllChildren()
		mirrorBin.Parent = nil
	end
	
	self.HeadMirrors = {}
	
	for _,desc in pairs(character:GetDescendants()) do
		self:AddHeadMirror(desc)
	end
	
	self:Connect("AddHeadMirror", character.DescendantAdded)
	self:Connect("RemoveHeadMirror", character.DescendantRemoving)
end
--[=[
	Service bags handle recursive initialization of services, and the
	retrieval of services from a given source. This allows the composition
	of services without the initialization of those services becoming a pain,
	which makes refactoring downstream services very easy.

	This also allows multiple copies of a service to exist at once, although
	many services right now are not designed for this.

	```lua
	local serviceBag = ServiceBag.new()

	serviceBag:GetService({
		Init = function(self)
			print("Service initialized")
		end;
	})
	serviceBag:Init()
	serviceBag:Start()
	```

	@class ServiceBag
]=]



local require = require(script.Parent.loader).load(script)

local Signal = require("Signal")
local BaseObject = require("BaseObject")
--edit the below function to execute code when this response is chosen OR this prompt is shown
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data


return function(player, dialogueFolder)
	dialogueFolder.Parent.OrbThrow.Use:Fire(player.Character)
	delay(4,function()
		print("New character")
		game.ReplicatedStorage.Events.System.NewCharacterServer:Fire(player)
	end)
	
end
--[[
	Manages batch updating of tween objects.
]]



local RunService = game:GetService("RunService")

local Package = script.Parent.Parent
local Types = require(Package.Types)
local lerpType = require(Package.Animation.lerpType)
local getTweenRatio = require(Package.Animation.getTweenRatio)
local updateAll = require(Package.Dependencies.updateAll)

local TweenScheduler = {}

type Set<T> = {[T]: any}
type Tween = Types.Tween<any>

local WEAK_KEYS_METATABLE = {__mode = "k"}
--[[**
	Calls each Object's `MethodName` (or calls the Object if `MethodName == true`) and removes them from the Janitor. Also clears the namespace. This function is also called when you call a Janitor Object (so it can be used as a destructor callback).
	@returns [t:void]
**--]]


function Janitor.__index:Cleanup()
	if not self.CurrentlyCleaning then
		self.CurrentlyCleaning = nil
		for Object, MethodName in next, self do
			if Object == IndicesReference then
				continue
			end

			if MethodName == true then
				Object()
			else
				local ObjectMethod = Object[MethodName]
				if ObjectMethod then
					ObjectMethod(Object)
				end
			end

			self[Object] = nil
		end

		local This = self[IndicesReference]
		if This then
			for Index in next, This do
				This[Index] = nil
			end

			self[IndicesReference] = {}
		end

		self.CurrentlyCleaning = false
	end
end
--[=[
	@interface Extension
	@within Component
	.ShouldConstruct ExtensionConstructFn?
	.Constructing ExtensionFn?
	.Constructed ExtensionFn?
	.Starting ExtensionFn?
	.Started ExtensionFn?
	.Stopping ExtensionFn?
	.Stopped ExtensionFn?

	An extension allows the ability to extend the behavior of
	components. This is useful for adding injection systems or
	extending the behavior of components by wrapping around
	component lifecycle methods.

	A special `ShouldConstruct` function can be used to indicate
	if the component should actually be created. This must
	return `true` or `false`. A component with multiple
	`ShouldConstruct` extension functions must have them _all_
	return `true` in order for the component to be constructed.
	The `ShouldConstruct` function runs _before_ all other
	extension functions and component lifecycle methods.

	For instance, an extension could be created to simply log
	when the various lifecycle stages run on the component:

	```lua
	local Logger = {}
	function Logger.Constructing(component) print("Constructing", component) end
	function Logger.Constructed(component) print("Constructed", component) end
	function Logger.Starting(component) print("Starting", component) end
	function Logger.Started(component) print("Started", component) end
	function Logger.Stopping(component) print("Stopping", component) end
	function Logger.Stopped(component) print("Stopped", component) end

	local MyComponent = Component.new({Tag = "MyComponent", Extensions = {Logger}})
	```

	Sometimes it is useful for an extension to control whether or
	not a component should be constructed. For instance, if a
	component on the client should only be instantiated for the
	local player, an extension might look like this, assuming the
	instance has an attribute linking it to the player's UserId:

	```lua
	local player = game:GetService("Players").LocalPlayer

	local OnlyLocalPlayer = {}
	function OnlyLocalPlayer.ShouldConstruct(component)
		local ownerId = component.Instance:GetAttribute("OwnerId")
		return ownerId == player.UserId
	end

	local MyComponent = Component.new({Tag = "MyComponent", Extensions = {OnlyLocalPlayer}})
	```
]=]


type Extension = {
	ShouldConstruct: ExtensionConstructFn?,
	Constructing: ExtensionFn?,
	Constructed: ExtensionFn?,
	Starting: ExtensionFn?,
	Started: ExtensionFn?,
	Stopping: ExtensionFn?,
	Stopped: ExtensionFn?,
}
--[[
This was created by realgms took some inspiration from ER:LC on the ui

watch my yt video on how to set it up https://youtu.be/_x6XG6RcHec
]]





local part = script.Parent

part.Touched:Connect(function(hit)
	script.Parent.BeingTouched.Value = true -- set the flag to true when the part is touched
end)

part.TouchEnded:Connect(function(hit)
	script.Parent.BeingTouched.Value = false -- set the flag to false when the part is no longer being touched
end)
--[=[
	@param instance Instance
	@return RBXScriptConnection
	Attaches the trove to a Roblox instance. Once this
	instance is removed from the game (parent or ancestor's
	parent set to `nil`), the trove will automatically
	clean up.

	:::caution
	Will throw an error if `instance` is not a descendant
	of the game hierarchy.
	:::
]=]


function Trove:AttachToInstance(instance: Instance)
	assert(instance:IsDescendantOf(game), "Instance is not a descendant of the game hierarchy")
	return self:Connect(instance.Destroying, function()
		self:Destroy()
	end)
end
------//Sprinting Animations


self.RightSprint = CFrame.new(-.9, 1.25, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0));
self.LeftSprint = CFrame.new(1,1,-0.6) * CFrame.Angles(math.rad(-45),math.rad(15),math.rad(-25));

self.RightElbowSprint = CFrame.new(0,-0.45,-.25) * CFrame.Angles(math.rad(-80), math.rad(0), math.rad(0));
self.LeftElbowSprint = CFrame.new(0,0,0)  * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0));

self.RightWristSprint = CFrame.new(0,0,0.15) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0));
self.LeftWristSprint = CFrame.new(0,0,0)  * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0));

return self
--[[
	
	\\\ Returns a consistant UID from a string, based on an additive string.byte per character
	
	Functions.StringByte(
		string, 				<-- |REQ|	String
	)
	
--]]





return function(str)
	--- Vars
	local int = 0
	
	--- Convert each character to byte and add it up
	for i = 1, string.len(str) do
		int = int + string.byte(string.sub(str, i, i))
	end
	
	--
	return int
end
-- [ SETTINGS ] --



local statsName = "Minutes" -- Your stats name
local maxItems = 100 -- Max number of items to be displayed on the leaderboard
local minValueDisplay = 1 -- Any numbers lower than this will be excluded
local maxValueDisplay = 10e15 -- (10 ^ 15) Any numbers higher than this will be excluded
local abbreviateValue = true -- The displayed number gets abbreviated to make it "human readable"
local updateEvery = 60 -- (in seconds) How often the leaderboard has to update
local headingColor = Color3.fromRGB(25, 181, 254) -- The background color of the heading
----------------//


end
function KeyUI:remove(plr,Name)
for i,v in pairs(plr.PlayerGui:WaitForChild("UI").Main.Keys.Holder:GetChildren()) do
if v.Name == Name then
v:destroy()
end
end
end


function KeyUI:Get(plr,name)
return plr.PlayerGui:WaitForChild("UI").Main.Keys.Holder:FindFirstChild(name)
end

return KeyUI
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 200		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 7000		--		Use sliders to manipulate values
	Tune.Redline		= 7700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 6500
	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)
----------------



debounce = false
function onTouch(hit)

if game.Players:FindFirstChild(hit.Parent.Name) ~= nil and debounce == false then

local player = game.Players:FindFirstChild(hit.Parent.Name)
local c = player.Character:GetChildren()

debounce = true

	for i=1, #c do 
		if (c[i].className == "Hat") or c[i].Name == "Character" then 
			c[i]:Destroy()
		end 
	end


player.Character.Torso.Transparency = 1
player.Character:FindFirstChild("Left Arm").Transparency = 1
player.Character:FindFirstChild("Left Leg").Transparency = 1
player.Character:FindFirstChild("Right Arm").Transparency = 1
player.Character:FindFirstChild("Right Leg").Transparency = 1

player.Character.Humanoid.WalkSpeed = (Speed)		-- You can change how fast players walk as this character!

local hide = Instance.new("SpecialMesh")

hide.MeshType = "FileMesh"
MeshId = ""
hide.Parent = player.Character.Head

local p = script.Parent.Parent:FindFirstChild("Character"):clone()
p.Parent = player.Character
p.CFrame = CFrame.new(player.Character.Torso.Position)
p.Anchored = false

local Y = Instance.new("Weld")
Y.Part0 = player.Character.Torso
Y.Part1 = p
Y.Parent = Y.Part0


itemlist = script.Parent:FindFirstChild("StartTools"):GetChildren()

if #itemlist ~= 0 then
for i= 1, #itemlist do
local itemc = itemlist[i]:clone()
itemc.Parent = player.Backpack
end
end

wait(1)
debounce = false

end
end

script.Parent.Touched:connect(onTouch)
--!strict


local types = require(script.Parent.Parent.types)
type Array<T> = types.Array<T>
type Map<K, V> = types.Map<K, V>
type Tuple<T, V> = types.Tuple<T, V>

return function<T>(value: string | { [string]: T } | Array<T> | Map<any, T>): Array<Tuple<string, T>>
	assert(value :: any ~= nil, "cannot get entries from a nil value")
	local valueType = typeof(value)

	local entries: Array<Tuple<string, T>> = {}
	if valueType == "table" then
		for key, keyValue in pairs(value :: { [string]: T } | Array<T>) do
			-- Luau FIXME: Luau should see entries as Array<any>, given object is [string]: any, but it sees it as Array<Array<string>> despite all the manual annotation
			table.insert(entries, { key, keyValue })
		end
	elseif valueType == "string" then
		-- TODO: should we be using utf8.len?
		for i = 1, string.len(value :: string) do
			entries[i] = { tostring(i), string.sub(value :: string, i, i) }
		end
	end

	return entries
end
-- << Variables >> --



local Player = game:GetService("Players").LocalPlayer
local Mouse = Player:GetMouse()
local Camera = game:GetService("Workspace").CurrentCamera
local UserInputService = game:GetService("UserInputService")
local Humanoid = Player.Character:WaitForChild("Humanoid")
local bobbing = nil
local func1 = 0
local func2 = 0
local func3 = 0
local func4 = 0
local val = 0
local val2 = 0
local int = 10
local int2 = 10
local vect3 = Vector3.new()
-- Movement mode standardized to Enum.ComputerCameraMovementMode values


function BaseCamera:SetCameraMovementMode( cameraMovementMode )
	self.cameraMovementMode = cameraMovementMode
end

function BaseCamera:GetCameraMovementMode()
	return self.cameraMovementMode
end

function BaseCamera:SetIsMouseLocked(mouseLocked)
	self.inMouseLockedMode = mouseLocked
	if not FFlagUserCameraToggle then
		self:UpdateMouseBehavior()
	end
end

function BaseCamera:GetIsMouseLocked()
	return self.inMouseLockedMode
end

function BaseCamera:SetMouseLockOffset(offsetVector)
	self.mouseLockOffset = offsetVector
end

function BaseCamera:GetMouseLockOffset()
	return self.mouseLockOffset
end

function BaseCamera:InFirstPerson()
	return self.inFirstPerson
end

function BaseCamera:EnterFirstPerson()
	-- Overridden in ClassicCamera, the only module which supports FirstPerson
end

function BaseCamera:LeaveFirstPerson()
	-- Overridden in ClassicCamera, the only module which supports FirstPerson
end
--[[
	Tells whether the current test we're in should be skipped.
]]


function TestSession:shouldSkip()
	-- If our test tree had any exclusive tests, then normal tests are skipped!
	if self.hasFocusNodes then
		for i = #self.nodeStack, 1, -1 do
			local node = self.nodeStack[i]

			-- Skipped tests are still skipped
			if node.planNode.modifier == TestEnum.NodeModifier.Skip then
				return true
			end

			-- Focused tests are the only ones that aren't skipped
			if node.planNode.modifier == TestEnum.NodeModifier.Focus then
				return false
			end
		end

		return true
	else
		for i = #self.nodeStack, 1, -1 do
			local node = self.nodeStack[i]

			if node.planNode.modifier == TestEnum.NodeModifier.Skip then
				return true
			end
		end
	end

	return false
end
--Rescripted by Luckymaxer



Pie = script.Parent

Players = game:GetService("Players")
Debris = game:GetService("Debris")

Creator = Pie:FindFirstChild("creator")

BodyForce = Pie:FindFirstChild("BodyForce")
BodyGyro = Pie:FindFirstChild("BodyGyro")

HitSound = Pie:FindFirstChild("Hit")

Stuck = false

Damage = 0

function TagHumanoid(humanoid, player)
	local Creator_Tag = Instance.new("ObjectValue")
	Creator_Tag.Name = "creator"
	Creator_Tag.Value = player
	Debris:AddItem(Creator_Tag, 2)
	Creator_Tag.Parent = humanoid
end

function UntagHumanoid(humanoid)
	for i, v in pairs(humanoid:GetChildren()) do
		if v:IsA("ObjectValue") and v.Name == "creator" then
			v:Destroy()
		end
	end
end

function Stick(Object, Hit)
	local Weld = Instance.new("Weld")
	Weld.Part0 = Pie
	Weld.Part1 = Hit
	local HitPos = Pie.Position
	local CJ = CFrame.new(HitPos)
	Weld.C0 = Pie.CFrame:inverse() * CJ
	Weld.C1 = Hit.CFrame:inverse() * CJ
	Weld.Parent = Object
	return Weld
end

function IsTeamMate(Player1, Player2)
	return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor)
end

function Touched(Hit)
	if not Hit or not Hit.Parent or Stuck then
		return
	end
	local character = Hit.Parent
	if character:IsA("Hat") or character:IsA("Tool") then
		character = character.Parent
	end
	local CreatorPlayer
	if Creator and Creator.Value and Creator.Value:IsA("Player") then
		CreatorPlayer = Creator.Value
	end
	if CreatorPlayer and CreatorPlayer.Character == character then
		return
	end
	local player = Players:GetPlayerFromCharacter(character)
	if CreatorPlayer and player and IsTeamMate(CreatorPlayer, player) then
		return
	end
	Stuck = true
	PieWeld = Stick(Pie, Hit)
	if HitSound then
		HitSound:Play()
	end
	for i, v in pairs({BodyForce, BodyGyro}) do
		if v and v.Parent then
			v:Destroy()
		end
	end
	local humanoid = character:FindFirstChild("Humanoid")
	if humanoid and humanoid.Health > 0 then
		UntagHumanoid(humanoid)
		if CreatorPlayer then
			TagHumanoid(humanoid, CreatorPlayer)
		end
		humanoid:TakeDamage(Damage)
	end
end

Pie.Touched:connect(Touched)

for i = 1, 10 do
	wait(0.1 * i)
	if BodyGyro and BodyGyro.Parent then
		local Direction = Pie.Velocity.unit
		BodyGyro.maxTorque = Vector3.new(1e4, 1e4, 1e4)
		BodyGyro.cframe = CFrame.new(Vector3.new(0, 0, 0), -Direction)
	end
end

wait(2)

if PieWeld and PieWeld.Parent then
	PieWeld:Destroy()
end

wait(8)

Debris:AddItem(Pie, 0)