Roblox/luau_corpus huggingface dataset:
--//Setup//--
local WindLines = require(script.WindLines)
local WindShake = require(script.WindShake)

local WindSpeed = 20
local WindDirection = Vector3.new(1, 0, -0.15)

local WindShakeSettings = {
	WindPower = 3,
	WindSpeed = WindSpeed,
	WindDirection = WindDirection
}

local WindLinesSettings = {
	WindDirection = WindDirection,
	WindSpeed = WindSpeed,
	LifeTime = 9,
	SpawnRate = 15
}

local ShakableObjects = {
	"Leaf",
	"Leaves",
	"Bush", 
	"FLower"
}
--!strict
--[=[
  @function removeValue
  @within Dictionary

  @param dictionary {[K]: V} -- The dictionary to remove the value from.
  @param value V -- The value to remove.
  @return {[K]: V} -- The dictionary without the given value.

  Removes the given value from the given dictionary.

  ```lua
  local dictionary = { hello = "roblox", goodbye = "world" }

  local withoutHello = RemoveValue(dictionary, "roblox") -- { goodbye = "world" }
  local withoutGoodbye = RemoveValue(dictionary, "world") -- { hello = "roblox" }
  ```
]=]
local function removeValue<K, V>(dictionary: { [K]: V }, value: V): { [K]: V }
	local result = {}

	for key, v in pairs(dictionary) do
		if v ~= value then
			result[key] = v
		end
	end

	return result
end

return removeValue
-- Get all the frames inside the AppManager frame
local windows = {}
for _, child in ipairs(appManager:GetChildren()) do
	if child:IsA("Frame") then
		windows[child.Name] = child
	end
end
--------RIGHT DOOR --------

game.Workspace.doorright.l12.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l21.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l33.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l42.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l51.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l63.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l72.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
-- Local Functions
local function OnFetchConfiguration(callingClient, configToFetch)
	FetchConfiguration:FireClient(callingClient, configToFetch, Configurations[configToFetch])
end

FetchConfiguration.OnServerEvent:connect(OnFetchConfiguration)

return Configurations
--TheNexusAvenger
--Runs the server-side rocket launcher.

local Tool = script.Parent
local Handle = Tool:WaitForChild("Handle")
local EquipSound = Handle:WaitForChild("EquipSound")
local ReloadSound = Handle:WaitForChild("ReloadSound")

local Resources = require(script.Parent:WaitForChild("Resources"))
local RocketCreator = require(Resources:GetResource("RocketCreator"))
local BufferCreator = require(Resources:GetResource("BufferCreator"))
local RemoteEventCreator = require(Resources:GetResource("RemoteEventCreator"))
local Configuration = require(Resources:GetResource("Configuration"))

local ROCKET_RELOAD_TIME = Configuration.ROCKET_RELOAD_TIME

local RocketBuffer = BufferCreator:CreateServerBuffer("RocketBuffer")
local FireRocketEvent = RemoteEventCreator:CreateRemoteEvent("FireRocket")

local CurrentPlayer,CurrentCharacter
local CurrentHandRocket,CurrentRocket
local Equipped = false
local ToolEnabled = true
-- rbxthumb://type=Asset&id=00000000&w=420&h=420 -- use 150x150 for less memory
local function makeButton(v)
	local button; button = Button.new({
		Name = v.Name,
		Icon = "rbxthumb://type=Asset&id=" .. v.Id .. "&w=150&h=150",
		AssetId = v.Id,
		ActivatedCallback = function(inputObject)
			remoteEvent:FireServer("wear", v.Id)
		end,
		DetailsCallback = function(inputObject)
			purchasePrompt:Prompt(v.Id)
		end,
	})
	button:SetSelected(isWearing(v.Id))
	button:Parent(scrollingFrame)
	return button
end
--[[Brakes]]
	Tune.ABSEnabled		= true		-- Implements ABS
	Tune.ABSThreshold	= 20		-- Slip speed allowed before ABS starts working (in SPS) 

	Tune.FBrakeForce	= 2500		-- Front brake force
	Tune.RBrakeForce	= 1500		-- Rear brake force
	Tune.PBrakeForce	= 5000		-- Handbrake force
	
	Tune.FLgcyBForce	= 15000		-- Front brake force [PGS OFF]
	Tune.RLgcyBForce	= 10000		-- Rear brake force [PGS OFF]
	Tune.LgcyPBForce	= 25000		-- Handbrake force [PGS OFF]
-----------------------
if f2==1 then f2=0
	local b=script.b:Clone()
	b.Parent=script.Parent.PS.bu
	b.Position=UDim2.new(0,po2.X,0,po2.Y+6)
	b.BackgroundColor3=p2.BackgroundColor3
	b.inf.Value=Vector3.new(-1,y2)
end
if z2==0 and s2==0 then
po2=po2+Vector3.new(x2,y2)/3 end
po2=po2.X<44 and Vector3.new(44,po2.Y)or po2
po2=po2.X>68 and Vector3.new(68,po2.Y)or po2
po2=po2.Y<0 and Vector3.new(po2.X,0)or po2
po2=po2.Y>25 and Vector3.new(po2.X,25)or po2
p2.Position=UDim2.new(0,po2.X,0,po2.Y)
local fr1,fr2='b'
if s2==1 then fr1='k'fr2='k'
elseif z2==1 then
fr1='b2'
fr2=y2==0 and's1'or y2==1 and's3'or's2'
elseif math.abs(x2)+math.abs(y2)>0 then
fr1='b'
fr2=math.sin(tick()*8)>0 and'l1'or'l2'
else
fr1='b'
fr2='l2'
end
for _,v in pairs(p2:GetChildren())do
if v.Name==fr1 or v.Name==fr2 then
v.Visible=true else v.Visible=false
end end
-- Decompiled with the Synapse X Luau decompiler.

script.Parent.MouseButton1Click:connect(function()
	script.Parent.Parent.Parent.Radio:FireServer(script.Parent.Parent.id.Text, script.Parent.Parent.vol.Text, script.Parent.Parent.pitch.Text);
end);
-----------------
--| Constants |--
-----------------

local BLAST_RADIUS = 333
local BLAST_PRESSURE = 7500000
--[[
	Function called when leaving the state
]]
function PlayerCamera.onLeave(stateMachine, serverPlayer, event, from, to)
	for _, connection in pairs(connections) do
		connection:Disconnect()
	end
end

return PlayerCamera
-- Captions
local captionContainer = Instance.new("Frame")
captionContainer.Name = "CaptionContainer"
captionContainer.BackgroundTransparency = 1
captionContainer.AnchorPoint = Vector2.new(0, 0)
captionContainer.ClipsDescendants = true
captionContainer.ZIndex = 30
captionContainer.Visible = true
captionContainer.Parent = iconContainer
captionContainer.Active = false

local captionFrame = Instance.new("Frame")
captionFrame.Name = "CaptionFrame"
captionFrame.BorderSizePixel = 0
captionFrame.AnchorPoint = Vector2.new(0.5,0.5)
captionFrame.Position = UDim2.new(0.5,0,0.5,0)
captionFrame.Size = UDim2.new(1,0,1,0)
captionFrame.ZIndex = 31
captionFrame.Parent = captionContainer
captionFrame.Active = false

local captionLabel = Instance.new("TextLabel")
captionLabel.Name = "CaptionLabel"
captionLabel.BackgroundTransparency = 1
captionLabel.AnchorPoint = Vector2.new(0.5,0.5)
captionLabel.Position = UDim2.new(0.5,0,0.56,0)
captionLabel.TextXAlignment = Enum.TextXAlignment.Center
captionLabel.RichText = true
captionLabel.ZIndex = 32
captionLabel.Parent = captionContainer
captionLabel.Active = false

local captionCorner = Instance.new("UICorner")
captionCorner.Name = "CaptionCorner"
captionCorner.Parent = captionFrame

local captionOverlineContainer = Instance.new("Frame")
captionOverlineContainer.Name = "CaptionOverlineContainer"
captionOverlineContainer.BackgroundTransparency = 1
captionOverlineContainer.AnchorPoint = Vector2.new(0.5,0.5)
captionOverlineContainer.Position = UDim2.new(0.5,0,-0.5,3)
captionOverlineContainer.Size = UDim2.new(1,0,1,0)
captionOverlineContainer.ZIndex = 33
captionOverlineContainer.ClipsDescendants = true
captionOverlineContainer.Parent = captionContainer
captionOverlineContainer.Active = false

local captionOverline = Instance.new("Frame")
captionOverline.Name = "CaptionOverline"
captionOverline.AnchorPoint = Vector2.new(0.5,0.5)
captionOverline.Position = UDim2.new(0.5,0,1.5,-3)
captionOverline.Size = UDim2.new(1,0,1,0)
captionOverline.ZIndex = 34
captionOverline.Parent = captionOverlineContainer
captionOverline.Active = false

local captionOverlineCorner = captionCorner:Clone()
captionOverlineCorner.Name = "CaptionOverlineCorner"
captionOverlineCorner.Parent = captionOverline

local captionVisibilityBlocker = captionFrame:Clone()
captionVisibilityBlocker.Name = "CaptionVisibilityBlocker"
captionVisibilityBlocker.BackgroundTransparency = 1
captionVisibilityBlocker.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
captionVisibilityBlocker.ZIndex -= 1
captionVisibilityBlocker.Parent = captionFrame
captionVisibilityBlocker.Active = false

local captionVisibilityCorner = captionVisibilityBlocker.CaptionCorner
captionVisibilityCorner.Name = "CaptionVisibilityCorner"
--------------------------------------------------------------------
if brakewhistle == true then
	mouse.KeyDown:connect(function(key)
		if key == camkey and enabled == false then

			local seat = car.DriveSeat
			local effect = script.soundeffect:Clone()
			effect.Name = "soundeffectCop"
			effect.Parent = seat.Brakes

		elseif key == camkey and enabled == true then

			local seat = car.DriveSeat
			seat.Brakes.soundeffectCop:Destroy()

		end
		car.DriveSeat.ChildRemoved:Connect(function(child)

			if child.Name == "SeatWeld" then
				local seat = car.DriveSeat
				seat.Brakes.soundeffectCop:Destroy()
			end
		end)
	end)
end
--[[
	ROBLOX TODO: add default generic param when possible
	original code:
	export type RawMatcherFn<T extends MatcherState = MatcherState> = {
]]
-- ROBLOX FIXME: add Symbol to the definition: [INTERNAL_MATCHER_FLAG]: boolean?
export type RawMatcherFn<T> = any
--// Wrap
log("Wrap")

local service_Wrap = service.Wrap
local service_UnWrap = service.UnWrap

for i,val in pairs(service) do if type(val) == "userdata" then service[i] = service_Wrap(val, true) end end
-- Core connections
Connections = {};

function ClearConnections()
	-- Clears and disconnects temporary connections
	for Index, Connection in pairs(Connections) do
		Connection:Disconnect();
		Connections[Index] = nil;
	end;
end;

function InitializeUI()
	-- Sets up the UI

	-- Ensure UI has not yet been initialized
	if UI then
		return;
	end;

	-- Create the root UI
	UI = Instance.new('ScreenGui')
	UI.Name = 'Building Tools by F3X (UI)'

	-- Create dock
	local ToolList = {}
	local DockComponent = require(Tool:WaitForChild('UI'):WaitForChild('Dock'))
	local DockElement = Roact.createElement(DockComponent, {
		Core = Core;
		Tools = ToolList;
	})
	local DockHandle = Roact.mount(DockElement, UI, 'Dock')

	-- Provide API for adding tool buttons to dock
	local function AddToolButton(IconAssetId, HotkeyLabel, Tool)
		table.insert(ToolList, {
			IconAssetId = IconAssetId;
			HotkeyLabel = HotkeyLabel;
			Tool = Tool;
		})

		-- Update dock
		Roact.update(DockHandle, Roact.createElement(DockComponent, {
			Core = Core;
			Tools = Cryo.List.join(ToolList);
		}))
	end
	Core.AddToolButton = AddToolButton

	-- Clean up UI on tool teardown
	UIMaid = Maid.new()
	Tool.AncestryChanged:Connect(function (Item, Parent)
		if Parent == nil then
			UIMaid:Destroy()
		end
	end)
end

local UIElements = Tool:WaitForChild 'UI'
local ExplorerTemplate = require(UIElements:WaitForChild 'Explorer')
Core.ExplorerVisibilityChanged = Signal.new()
Core.ExplorerVisible = false

function ToggleExplorer()
	if not Core.ExplorerVisible then
		OpenExplorer()
	else
		CloseExplorer()
	end
end

function OpenExplorer()

	-- Ensure explorer not already open
	if ExplorerHandle then
		return
	end

	-- Initialize explorer
	Explorer = Roact.createElement(ExplorerTemplate, {
		Core = getfenv(0),
		Close = CloseExplorer,
		Scope = Targeting.Scope
	})

	-- Mount explorer
	ExplorerHandle = Roact.mount(Explorer, UI, 'Explorer')
	Core.ExplorerVisible = true

	-- Unmount explorer on tool cleanup
	UIMaid.Explorer = Support.Call(Roact.unmount, ExplorerHandle)
	UIMaid.ExplorerScope = Targeting.ScopeChanged:Connect(function (Scope)
		local UpdatedProps = Support.Merge({}, Explorer.props, { Scope = Scope })
		local UpdatedExplorer = Roact.createElement(ExplorerTemplate, UpdatedProps)
		ExplorerHandle = Roact.update(ExplorerHandle, UpdatedExplorer)
	end)

	-- Fire signal
	Core.ExplorerVisibilityChanged:Fire()
end

function CloseExplorer()

	-- Clean up explorer
	UIMaid.Explorer = nil
	UIMaid.ExplorerScope = nil
	ExplorerHandle = nil
	Core.ExplorerVisible = false

	-- Fire signal
	Core.ExplorerVisibilityChanged:Fire()
end
--Click/Touch
local cmdBar = main.gui.CmdBar
local textBox = cmdBar.SearchFrame.TextBox
local arrowKeys = {[Enum.KeyCode.Left] = true, [Enum.KeyCode.Right] = true, [Enum.KeyCode.Up] = true, [Enum.KeyCode.Down] = true}
local movementKeys = {[Enum.KeyCode.Left]="Left",[Enum.KeyCode.Right]="Right",[Enum.KeyCode.Up]="Forwards",[Enum.KeyCode.Down]="Backwards",[Enum.KeyCode.A]="Left",[Enum.KeyCode.D]="Right",[Enum.KeyCode.W]="Forwards",[Enum.KeyCode.S]="Backwards", [Enum.KeyCode.Space]="Up", [Enum.KeyCode.R]="Up", [Enum.KeyCode.Q]="Down", [Enum.KeyCode.LeftControl]="Down", [Enum.KeyCode.F]="Down"}
main.movementKeysPressed = {}
main.userInputService.InputBegan:Connect(function(input, pressedUI)
	if (input.UserInputType == clickInput or input.UserInputType == touchInput) and (not pressedUI or frameDragging) and not main.mouseDown then
		main.mouseDown = true
		checkPressFunctions(input.Position)
	elseif not main.chatting or (cmdBar.Visible and #textBox.Text < 2) then
		local direction = movementKeys[input.KeyCode]
		if direction then
			table.insert(main.movementKeysPressed, direction)
		elseif input.KeyCode == Enum.KeyCode.E then
			for speedCommandName, _ in pairs(main.commandSpeeds) do
				if main.commandsActive[speedCommandName] then
					main:GetModule("cf"):EndCommand(speedCommandName)
				else
					main:GetModule("cf"):ActivateClientCommand(speedCommandName)
				end
			end
			
		elseif input.KeyCode == Enum.KeyCode.Quote or input.KeyCode == Enum.KeyCode.Semicolon then
			main:GetModule("CmdBar"):ToggleBar(input.KeyCode)
		end
	end
	if arrowKeys[input.KeyCode] then
		main:GetModule("CmdBar"):PressedArrowKey(input.KeyCode)
	end
end)
main.userInputService.InputEnded:Connect(function(input, pressedUI)
	local direction = movementKeys[input.KeyCode] 
	if input.UserInputType == clickInput or input.UserInputType == touchInput then
		main.mouseDown = false
	elseif direction then
		for i,v in pairs(main.movementKeysPressed) do
			if v == direction then
				table.remove(main.movementKeysPressed,i)
			end
		end
	end
end)
-- Connection class
local Connection = {}
Connection.__index = Connection

function Connection.new(signal, fn)
	return setmetatable({
		_connected = true,
		_signal = signal,
		_fn = fn,
		_next = false,
	}, Connection)
end

function Connection:Disconnect()
	self._connected = false

	-- Unhook the node, but DON'T clear it. That way any fire calls that are
	-- currently sitting on this node will be able to iterate forwards off of
	-- it, but any subsequent fire calls will not hit it, and it will be GCed
	-- when no more fire calls are sitting on it.
	if self._signal._handlerListHead == self then
		self._signal._handlerListHead = self._next
	else
		local prev = self._signal._handlerListHead
		while prev and prev._next ~= self do
			prev = prev._next
		end
		if prev then
			prev._next = self._next
		end
	end
end

Connection.Destroy = Connection.Disconnect
--[[Manage Plugins]]
	
		script.Parent["A-Chassis Interface"].Car.Value=car
	for i,v in pairs(script.Parent.Plugins:GetChildren()) do
		for _,a in pairs(v:GetDescendants()) do
			if a:IsA("RemoteEvent") or a:IsA("RemoteFunction") then 
				a.Parent=car
				for _,b in pairs(a:GetChildren()) do
					if b:IsA("Script") then b.Disabled=false end
				end	
			end
		end
		v.Parent = script.Parent["A-Chassis Interface"]
	end
	script.Parent.Plugins:Destroy()
--/////////////////////////////////////////////////////////--

local dZIndex 	 = 2
local dScrollBar = 4
local dBackground 	= Color3.new(31/255, 31/255, 31/255)
local dTransparency = 0
local dPixelSize 	= 0
local dBorder 		= Color3.new(27/255,42/255,53/255)
local dPosition 	= UDim2.new(0,5,0,5)
local dCanvasSize 	= UDim2.new(0, 0, 0, 0)
local dScrollImage 	= "http://roblox.com/asset?id=158348114"
local dTextColor = Color3.new(1,1,1)
local dSize 	 = UDim2.new(1,-10,1,-10)
local dFont 	 = "Gotham"
local dTextSize  = 15
local dPlaceholderColor = Color3.fromRGB(178, 178, 178)
local MouseIcons = {
	Horizontal = "rbxassetid://1243146213";
	Vertical = "rbxassetid://1243145985";
	LeftCorner = "rbxassetid://1243145459";
	RightCorner = "rbxassetid://1243145350";
	TopRight = "rbxassetid://1243145459";
	TopLeft = "rbxassetid://1243145350";
}
--------RIGHT DOOR --------
game.Workspace.doorright.l11.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l23.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l32.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l41.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l53.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l62.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l71.BrickColor = BrickColor.new(106)

game.Workspace.doorright.l12.BrickColor = BrickColor.new(1013)
game.Workspace.doorright.l21.BrickColor = BrickColor.new(1013)
game.Workspace.doorright.l33.BrickColor = BrickColor.new(1013)
game.Workspace.doorright.l42.BrickColor = BrickColor.new(1013)
game.Workspace.doorright.l51.BrickColor = BrickColor.new(1013)
game.Workspace.doorright.l63.BrickColor = BrickColor.new(1013)
game.Workspace.doorright.l72.BrickColor = BrickColor.new(1013)

game.Workspace.doorright.l13.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l22.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l31.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l43.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l52.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l61.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l73.BrickColor = BrickColor.new(1023)

game.Workspace.doorright.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.Lighting.flashcurrent.Value = "12"
-- Set local variables
local player = players:GetPlayerFromCharacter(script.Parent)
local character = player.Character or player.CharacterAdded:wait()
local humanoid = character.Humanoid
--Collision checking--
core.spawn(function()
	while myHuman.Health > 0 do
		
		if not criticalAction and engineRunning then
			flight.checkCollisions()
		end
		
		wait()
	end
end)
-- Player's tank GUI
GUI = script.Parent.Parent.Parent.PlayerGui.TankGUI;
GUI.HP.Hitpoints.Text = parts.Parent:findFirstChild("Damage").Value

local Hull = parts.Parent:findFirstChild("Damage")

if Hull.Value<0 then
	GUI.HP.Hitpoints.Text = "DISABLED"
end

	
local MGDamage = math.random(40,80)


braking = false;
firingMg = false;
reloading = false;
currRound = tankStats.Round; -- Current loaded ammo (AP/HE)


myMouse = nil;

function updateAmmo()
	GUI.Ammo.Text = "Cannon Ammo = " .. tankStats[tankStats.Round.Value .. "Ammo"].Value;
	GUI.MG_Ammo.Text = tankStats.MGAmmo.Value;
	GUI.HP.Hitpoints.Text = parts.Parent:findFirstChild("Damage").Value
end


function Brakes()
	for i = 1, 5 do
	parts.Engine.BodyVelocity.Velocity = Vector3.new(0,0,0)
	print("Brakes activated")
	end
end

Loaded = false
--[[ 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")
-- This function merges the Packages folder from a DevModule into a shared
-- location. Until we have an improved package implementation, we need to
-- manually dedupe our libraries to cut down on bloat
local function dedupePackages(packages: Folder)
	local packageStorage = getPackageStorage()

	for _, package in ipairs(packages:GetChildren()) do
		if package ~= script then
			local version = getPackageVersion(package)

			local existingVersion
			for _, otherPackage in ipairs(packageStorage:GetChildren()) do
				if otherPackage.Name:match(("^%s_"):format(package.Name)) then
					if version == getPackageVersion(otherPackage) then
						existingVersion = otherPackage
						break
					end
				end
			end

			if not existingVersion then
				local clone = package:Clone()
				clone.Parent = packageStorage
				clone.Name = ("%s_%s"):format(clone.Name, version)
				existingVersion = clone
			end

			-- Link the package with the existing version (which was either
			-- there previously, or is the one we just generated)
			local packageRef = constants.PACKAGE_REF:Clone()
			packageRef.Name = package.Name
			packageRef.package.Value = existingVersion
			packageRef.Parent = package.Parent

			package:Destroy()

			log("link", ("%s <-> %s"):format(package.Name, existingVersion:GetFullName()))
		end
	end
end
--[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]--
local PlayerSpawning=false; --[[ Change this to true if you want the NPC to spawn like a player, and change this to false if you want the NPC to spawn at it's current position. ]]--
local AdvancedRespawnScript=script;
repeat Wait(0)until script and script.Parent and script.Parent.ClassName=="Model";
local JeffTheKiller=AdvancedRespawnScript.Parent;
if AdvancedRespawnScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Thumbnail")then
JeffTheKiller:FindFirstChild("Thumbnail"):Destroy();
end;
local GameDerbis=Game:GetService("Debris");
local JeffTheKillerHumanoid;
for _,Child in pairs(JeffTheKiller:GetChildren())do
if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
JeffTheKillerHumanoid=Child;
end;
end;
local Respawndant=JeffTheKiller:Clone();
if PlayerSpawning then --[[ LOOK AT LINE: 2. ]]--
coroutine.resume(coroutine.create(function()
if JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid:FindFirstChild("Status")and not JeffTheKillerHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns")then
SpawnModel=Instance.new("Model");
SpawnModel.Parent=JeffTheKillerHumanoid.Status;
SpawnModel.Name="AvalibleSpawns";
else
SpawnModel=JeffTheKillerHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns");
end;
function FindSpawn(SearchValue)
local PartsArchivable=SearchValue:GetChildren();
for AreaSearch=1,#PartsArchivable do
if PartsArchivable[AreaSearch].className=="SpawnLocation"then
local PositionValue=Instance.new("Vector3Value",SpawnModel);
PositionValue.Value=PartsArchivable[AreaSearch].Position;
PositionValue.Name=PartsArchivable[AreaSearch].Duration;
end;
FindSpawn(PartsArchivable[AreaSearch]);
end;
end;
FindSpawn(Game:GetService("Workspace"));
local SpawnChilden=SpawnModel:GetChildren();
if#SpawnChilden>0 then
local SpawnItself=SpawnChilden[math.random(1,#SpawnChilden)];
local RespawningForceField=Instance.new("ForceField");
RespawningForceField.Parent=JeffTheKiller;
RespawningForceField.Name="SpawnForceField";
GameDerbis:AddItem(RespawningForceField,SpawnItself.Name);
JeffTheKiller:MoveTo(SpawnItself.Value+Vector3.new(0,3.5,0));
else
if JeffTheKiller:FindFirstChild("SpawnForceField")then
JeffTheKiller:FindFirstChild("SpawnForceField"):Destroy();
end;
JeffTheKiller:MoveTo(Vector3.new(0,115,0));
end;
end));
end;
function Respawn()
Wait(5);
Respawndant.Parent=JeffTheKiller.Parent;
Respawndant:makeJoints();
Respawndant:FindFirstChild("Head"):MakeJoints();
Respawndant:FindFirstChild("Torso"):MakeJoints();
JeffTheKiller:remove();
end;
if AdvancedRespawnScript and JeffTheKiller and JeffTheKillerHumanoid then
JeffTheKillerHumanoid.Died:connect(Respawn);
end;