Roblox/luau_corpus huggingface dataset:
-----------------
--| Variables |--
-----------------

local PlayersService = game:GetService('Players')

local Camera = nil
local CameraChangeConn = nil

local SubjectPart = nil

local PlayerCharacters = {} -- For ignoring in raycasts
local VehicleParts = {} -- Also just for ignoring

local LastPopAmount = 0
local LastZoomLevel = 0
local PopperEnabled = false

local CFrame_new = CFrame.new
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 448		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
	Tune.Redline		= 6700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 4.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)
-- Controller script
local SegwayController = script:WaitForChild("SegwayController")
--// UI Tween Info
local L_163_ = TweenInfo.new(
	1,
	Enum.EasingStyle.Sine,
	Enum.EasingDirection.Out,
	0,
	false,
	0
)

local L_164_ = {
	TextTransparency = 1
}
--Made by Stickmasterluke


sp = script.Parent

speedboost = 0		--100% speed bonus
speedforsmoke = math.huge	--smoke apears when character running >= 10 studs/second.


local tooltag = script:WaitForChild("ToolTag",2)

if tooltag~=nil then
	local tool=tooltag.Value
	local h=sp:FindFirstChild("Humanoid")
	if h~=nil then
		h.WalkSpeed=16+16*speedboost
		local hrp = sp:FindFirstChild("HumanoidRootPart")
		if hrp ~= nil then
			smokepart=Instance.new("Part")
			smokepart.FormFactor="Custom"
			smokepart.Size=Vector3.new(0,0,0)
			smokepart.TopSurface="Smooth"
			smokepart.BottomSurface="Smooth"
			smokepart.CanCollide=false
			smokepart.Transparency=1
			local weld=Instance.new("Weld")
			weld.Name="SmokePartWeld"
			weld.Part0 = hrp
			weld.Part1=smokepart
			weld.C0=CFrame.new(0,-3.5,0)*CFrame.Angles(math.pi/4,0,0)
			weld.Parent=smokepart
			smokepart.Parent=sp
			smoke=Instance.new("Smoke")
			smoke.Enabled = hrp.Velocity.magnitude>speedforsmoke
			smoke.RiseVelocity=2
			smoke.Opacity=.25
			smoke.Size=.5
			smoke.Parent=smokepart
			h.Running:connect(function(speed)
				if smoke and smoke~=nil then
					smoke.Enabled=speed>speedforsmoke
				end
			end)
		end
	end
	while tool~=nil and tool.Parent==sp and h~=nil do
		sp.ChildRemoved:wait()
	end
	local h=sp:FindFirstChild("Humanoid")
	if h~=nil then
		h.WalkSpeed=16
	end
end

if smokepart~=nil then
	smokepart:Destroy()
end
script:Destroy()
-- for offset calc
local A1 = cloth:FindFirstChild("A1", true)
local A1P = physicsParts:WaitForChild("A1")

local offset = A1P.Position - A1.WorldPosition
local parts = {}

local function indexParts()
	for iterator, part : BasePart in physicsParts:GetChildren() do
		parts[part.Name] = part
		if iterator%50 == 0 then
			task.wait()
		end
	end
end

local function boneUpdate()
	for _, bone in bones do
		local part = parts[bone.Name]
		bone.WorldCFrame = part.CFrame+offset
	end
end

indexParts()
RunService.RenderStepped:Connect(boneUpdate)
-- regeneration
function regenHealth()
	if regening then return end
	regening = true
	
	while Humanoid.Health < Humanoid.MaxHealth do
		local s = wait(1)
		local health = Humanoid.Health
		if health~=0 and health < Humanoid.MaxHealth then
			local newHealthDelta = 0.01 * s * 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
	
	regening = false
end

Humanoid.HealthChanged:connect(regenHealth)
  
function onTouched(hit)
   local player = game.Players:GetPlayerFromCharacter(hit.Parent)
   if player then
       game:GetService("TeleportService"):Teleport(4641921091,player)  --replace the numbers with your place id
  end
end


script.Parent.Torso.Touched:connect(onTouched)
-- TableWatcher
-- Stephen Leitnick
-- April 29, 2022

type AnyTable = { [any]: any }

type Watcher = {
	Changes: AnyTable,
	Tbl: AnyTable,
}

local Util = require(script.Parent.Util)

local watchers: { [TableWatcher]: Watcher } = {}
setmetatable(watchers, { __mode = "k" })

local WatcherMt = {}

function WatcherMt:__index(index)
	local w = watchers[self]
	local c = w.Changes[index]
	if c ~= nil then
		if c == Util.None then
			return nil
		else
			return c
		end
	end
	return w.Tbl[index]
end

function WatcherMt:__newindex(index, value)
	local w = watchers[self]
	if w.Tbl[index] == value then
		return
	end
	if value == nil then
		w.Changes[index] = Util.None
	else
		w.Changes[index] = value
	end
end

function WatcherMt:__call()
	local w = watchers[self]
	if next(w.Changes) == nil then
		return w.Tbl
	end
	return Util.Extend(w.Tbl, w.Changes)
end

local function TableWatcher(t: AnyTable): TableWatcher
	local watcher = setmetatable({}, WatcherMt)
	watchers[watcher] = {
		Changes = {},
		Tbl = t,
	}
	return watcher
end

type TableWatcher = typeof(setmetatable({}, WatcherMt))

return TableWatcher
-- Right Arms
character.Constraint.ConstraintRightUpperArm.Attachment0 = RUA
character.Constraint.ConstraintRightUpperArm.Attachment1 = RUARig
character.Constraint.ConstraintRightLowerArm.Attachment0 = RLA
character.Constraint.ConstraintRightLowerArm.Attachment1 = RLARig
character.Constraint.ConstraintRightHand.Attachment0 = RH
character.Constraint.ConstraintRightHand.Attachment1 = RHRig
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take

Cooldown = 30 -- cooldown for use of the tool again

ZoneModelName = "DJ Disco" -- name the zone model

MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
--LINK THUNDERBOLT HEAD BELOW
SirenAddress = script.Parent.Parent.Parent["FederalSignalThunderbolt1003ASeriesC"]
-- initialize to idle
playAnimation("idle", 0.1, Humanoid)
pose = "Standing"

while Figure.Parent~=nil do
	task.wait(0.1)
	move(os.clock())
end
--// Events
local L_28_ = L_6_:WaitForChild('Equipped')
local L_29_ = L_6_:WaitForChild('ShootEvent')
local L_30_ = L_6_:WaitForChild('DamageEvent')
local L_31_ = L_6_:WaitForChild('CreateOwner')
local L_32_ = L_6_:WaitForChild('Stance')
local L_33_ = L_6_:WaitForChild('HitEvent')
--------------------------------------------------------------------------

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/3	,
	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
}
--[[ Modules ]]--
local CurrentControlModule = nil
local ClickToMoveTouchControls = nil
local ControlModules = {}
if IsTouchDevice then
	ControlModules.Thumbstick = require(script:WaitForChild('Thumbstick'))
	ControlModules.Thumbpad = require(script:WaitForChild('Thumbpad'))
	ControlModules.DPad = require(script:WaitForChild('DPad'))
	ControlModules.Default = ControlModules.Thumbstick
	TouchJumpModule = require(script:WaitForChild('TouchJump'))
	BindableEvent_OnFailStateChanged = script.Parent:WaitForChild('OnClickToMoveFailStateChange')
else
	ControlModules.Keyboard = require(script:WaitForChild('KeyboardMovement'))
end
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take

Cooldown = 5 -- cooldown for use of the tool again

ZoneModelName = "Outer Star" -- name the zone model

MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
-- Engine Sound Parameters
local RPM_CROSSOVER = 250 -- How much more engine power is needed to crossover to the next engine audio track
local ENGINE_GAIN_ACCEL = 0.1 -- Exponent that builds the engine RPM when accelerating (gives the engine sound more oomph the higher the value)
local ENGINE_GAIN_DECCEL = 0.5 -- Exponent that builds the engine RPM when decelerating (braking)
local BASE_RPM = Vehicle:GetAttribute("BaseEngineRPM") or 1500 -- Resting state for the engine
local MAX_RPM = Vehicle:GetAttribute("MaxEngineRPM") or 5000 -- The engine RPM correlating to the highest pitch for engine sounds
local MAX_IDEAL_RPM = MAX_RPM-(MAX_RPM-BASE_RPM)/4 -- engine RPM correlating to normal usage (not under stress)
local MAX_SPEED = 125 -- The rotational velocity a vehicle's wheels would be reaching for the highest pitched engine sounds
--[=[
	@class ServerComm
	@server
]=]
local ServerComm = {}
ServerComm.__index = ServerComm
--Tune--
local StockHP = 200		--Power output desmos: https://www.desmos.com/calculator/wezfve8j90 (does not come with torque curve)
local TurboCount = 1	--(1 = SingleTurbo),(2 = TwinTurbo),(if bigger then it will default to 2 turbos)
local TurboSize = 20	--bigger the turbo, the more lag it has (actually be realistic with it) no 20mm turbos
local WasteGatePressure = 15	--Max PSI for each turbo (if twin and running 10 PSI, thats 10PSI for each turbo)
local CompressionRatio = 9/1	--Compression of your car (look up the compression of the engine you are running)
local AntiLag = true	--if true basically keeps the turbo spooled up so less lag

local BOV_Loudness = 0.5	--volume of the BOV (not exact volume so you kinda have to experiment with it)
local BOV_Pitch = 0.5	--max pitch of the BOV (not exact so might have to mess with it)
local TurboLoudness = 0.65 --volume of the Turbo (not exact volume so you kinda have to experiment with it also)
--Running Script--
local UIS = game:GetService('UserInputService')
local Player = game.Players.LocalPlayer
local Character = Player.Character

UIS.InputBegan:connect(function(input)
	if input.KeyCode == Enum.KeyCode.LeftShift then
		Character.Humanoid.WalkSpeed = 30
		local Anim = Instance.new('Animation')
		Anim.AnimationId = "rbxassetid://" 
		PlayAnim = Character.Humanoid:LoadAnimation(Anim)
		PlayAnim:Play()
	end
end)

UIS.InputEnded:connect(function(input)
	if input.KeyCode == Enum.KeyCode.LeftShift then
		Character.Humanoid.WalkSpeed = 16
		PlayAnim:Stop()
	end
end)
-- ROBLOX deviation START: adding default colors since we don't currently support colors
type Colors = typesModule.Colors
local DEFAULT_COLORS: Colors = {
	comment = { close = "", open = "" },
	content = { close = "", open = "" },
	prop = { close = "", open = "" },
	tag = { close = "", open = "" },
	value = { close = "", open = "" },
}
-- Decompiled with the Synapse X Luau decompiler.

wait(0.1);
local l__Value__1 = script.Parent.Parent.Car.Value;
script.Parent:Play();
while wait() do
	if l__Value__1.Body.Left.on.Value == true or l__Value__1.Body.Right.on.Value == true then
		script.Parent.Volume = 1;
	else
		script.Parent.Volume = 0;
	end;
end;
--// All global vars will be wiped/replaced except script

return function(data)
	local playergui = service.PlayerGui
	local localplayer = service.Players.LocalPlayer
	local ping = script.Parent.Parent
	local frame = ping.Frame
	local ms = ping.Frame.Ms
	local close = ping.Frame.Close
	
	gTable:Ready()
	
	ms.Text = "..."
	
	close.MouseButton1Click:connect(function()
		ping:Destroy()
	end)
	
	repeat
		ms.Text = client.Remote.Ping().."ms"
		wait(1.5)
	until not ping
	
	if ping then 
		ping:Destroy()
	end
end
--Settings--

script.Parent.Activated:Connect(function()
	if debounce == false then
		debounce = true
		RS.Events.SelfDestruct:FireServer()
		task.wait(Cooldown)
		debounce = false
	end	
end)

RS.Events.SelfDestruct.OnClientEvent:Connect(function(char)
	
	local Shakes = script.ShakeScript:Clone()
	Shakes.Parent = char
	Shakes.Disabled = false
	game.Debris:AddItem(Shakes,1)	
	
	for i,v in pairs(effect:GetDescendants()) do
		if v:IsA("ParticleEmitter") then
			v:Emit(10)
		end
	end
	
	RocksModule.Ground(char.HumanoidRootPart.Position + Vector3.new(0, -1, 0), 40, Vector3.new(5, 3.5, 5), nil, 20, false, 5)
	
end)
-- ROBLOX deviation END
export type MutableSourceVersion = ReactTypes.MutableSourceVersion
export type MutableSourceGetSnapshotFn<Source, Snapshot> =
	ReactTypes.MutableSourceGetSnapshotFn<Source, Snapshot>
export type MutableSourceSubscribeFn<Source, Snapshot> = ReactTypes.MutableSourceSubscribeFn<
	Source,
	Snapshot
>
export type MutableSourceGetVersionFn = ReactTypes.MutableSourceGetVersionFn
export type MutableSource<Source> = ReactTypes.MutableSource<Source>
export type Wakeable = ReactTypes.Wakeable
export type Thenable<R> = ReactTypes.Thenable<R>
export type Source = ReactElementType.Source
export type ReactElement<P = Object, T = any> = ReactElementType.ReactElement<P, T>
export type OpaqueIDType = ReactFiberHostConfig.OpaqueIDType
export type Dispatcher = ReactSharedInternals.Dispatcher
--------------------------------------------------------------------------
local car = script.Parent.Parent.Car.Value
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		= car.DriveSeat.TireStats.Fwear.Value	,
	FTargetFriction	= car.DriveSeat.TireStats.Ffriction.Value	,
	FMinFriction 	= .35	,
	
	RWearSpeed		= car.DriveSeat.TireStats.Rwear.Value	,
	RTargetFriction	= car.DriveSeat.TireStats.Rfriction.Value	,
	RMinFriction	= .35	,
	
	--Tire Slip
	TCSOffRatio		= 1/3	,
	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		= car.DriveSeat.Speed.Value		--SS6 Default = 3.6
}
--[=[
	Adds json to a localization table
	@param localizationTable LocalizationTable -- The localization table to add to
	@param localeId string -- The localeId to use
	@param json string -- The json to add with
]=]
function JsonToLocalizationTable.addJsonToTable(localizationTable, localeId, json)
	local decodedTable = HttpService:JSONDecode(json)
	recurseAdd(localizationTable, localeId, "", decodedTable)
end

return JsonToLocalizationTable
--allows players to send that they are in water

local s = workspace:WaitForChild("Values").swimidle.Swim.Swim.Swim.Swim.Swim.Swim.Swim.HumanoidSwimmingModules


script.Parent.Start.MouseButton1Click:Connect(function()
	local SwimInformation = script.Parent.Swimming.Text
	s.StartSwimming:FireServer(SwimInformation)
end)

s.StartSwimming.OnClientEvent:Connect(function(e)
	error(e)
end)

game:GetService("UserInputService").InputBegan:Connect(function(i,g)

	if i.KeyCode == Enum.KeyCode.F7 then
		script.Parent.Parent.Enabled = not script.Parent.Parent.Enabled
		if script.Parent.Parent.Enabled == true then
			game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.Default
			script.Parent.Swimming:CaptureFocus()
		else
			script.Parent.Swimming:ReleaseFocus()
		end
	end
	
	
end)
------------------------DO NOT EDIT------------------------
local click = Instance.new("ClickDetector", script.Parent)
local g = Instance.new("BillboardGui", script.Parent)
g.Size = UDim2.new(4, 0, 2, 0)
g.AlwaysOnTop = true
local c = Instance.new("TextLabel", script.Parent:WaitForChild("BillboardGui"))
c.BackgroundColor3 = Color3.new(255, 255, 255)
c.BorderColor3 = Color3.new(27, 42, 53)
c.Size = UDim2.new(1, 0, 1, 0)
c.Font = "Cartoon"
c.Text = "buy "..ITEM_NAME.." for "..ITEM_PRICE.." cash"
c.TextScaled = true
c.TextStrokeTransparency = 0
c.TextColor3 = Color3.new(255, 255, 255)
c.BackgroundTransparency = 1
c.Visible = false
local s = Instance.new("Sound", script)
s.Name = "cash"
s.SoundId = "rbxassetid://4525871712"
s.Volume = 1
script.Parent.ClickDetector.MouseHoverEnter:Connect(function()
	script.Parent.BillboardGui.TextLabel.Visible = true
end)
script.Parent.ClickDetector.MouseHoverLeave:Connect(function()
	script.Parent.BillboardGui.TextLabel.Visible = false
end)
script.Parent.ClickDetector.MouseClick:Connect(function(p)
	local plr = p
	if game.Players:FindFirstChild(p.Name).leaderstats:FindFirstChild(CURRENCY_NAME).Value >= ITEM_PRICE then
		script.cash:Play()
		local ppa = game.Players:FindFirstChild(p.Name)
		ppa.leaderstats.Cash.Value = ppa.leaderstats:FindFirstChild(CURRENCY_NAME).Value-ITEM_PRICE
		local c = game.ReplicatedStorage:FindFirstChild(ITEM_NAME):Clone()
		c.Parent = ppa.Backpack
	end
end)
-- Services

local replicatedStorage = game:GetService("ReplicatedStorage")
local status = replicatedStorage:WaitForChild("Status")
-- ROBLOX FIXME: Can we define ClientChatModules statically in the project config
pcall(function() ChatLocalization = require((game:GetService("Chat") :: any).ClientChatModules.ChatLocalization :: any) end)

function CreateWelcomeMessageLabel(messageData, channelName)
	local message = messageData.Message
	if ChatLocalization and ChatLocalization.LocalizeFormattedMessage then
		message = ChatLocalization:LocalizeFormattedMessage(message)
	end
	local extraData = messageData.ExtraData or {}
	local useFont = extraData.Font or ChatSettings.DefaultFont
	local useTextSize = extraData.FontSize or ChatSettings.ChatWindowTextSize
	local useChatColor = extraData.ChatColor or ChatSettings.DefaultMessageColor
	local useChannelColor = extraData.ChannelColor or useChatColor

	local BaseFrame, BaseMessage = util:CreateBaseMessage(message, useFont, useTextSize, useChatColor)
	local ChannelButton = nil

	if channelName ~= messageData.OriginalChannel then
			local localizedChannelName = messageData.OriginalChannel
			if ChatLocalization.tryLocalize then
				localizedChannelName = ChatLocalization:tryLocalize(messageData.OriginalChannel)
			end
			local formatChannelName = string.format("{%s}", localizedChannelName)
			ChannelButton = util:AddChannelButtonToBaseMessage(BaseMessage, useChannelColor, formatChannelName, messageData.OriginalChannel)
			local numNeededSpaces = util:GetNumberOfSpaces(formatChannelName, useFont, useTextSize) + 1
			BaseMessage.Text = util:CreateLeadingSpaces(numNeededSpaces) .. message
	end

	local function GetHeightFunction(xSize)
		return util:GetMessageHeight(BaseMessage, BaseFrame, xSize)
	end

	local FadeParmaters = {}
	FadeParmaters[BaseMessage] = {
		TextTransparency = {FadedIn = 0, FadedOut = 1},
		TextStrokeTransparency = {FadedIn = 0.75, FadedOut = 1}
	}

	if ChannelButton then
		FadeParmaters[ChannelButton] = {
			TextTransparency = {FadedIn = 0, FadedOut = 1},
			TextStrokeTransparency = {FadedIn = 0.75, FadedOut = 1}
		}
	end

	local FadeInFunction, FadeOutFunction, UpdateAnimFunction = util:CreateFadeFunctions(FadeParmaters)

	return {
		[util.KEY_BASE_FRAME] = BaseFrame,
		[util.KEY_BASE_MESSAGE] = BaseMessage,
		[util.KEY_UPDATE_TEXT_FUNC] = nil,
		[util.KEY_GET_HEIGHT] = GetHeightFunction,
		[util.KEY_FADE_IN] = FadeInFunction,
		[util.KEY_FADE_OUT] = FadeOutFunction,
		[util.KEY_UPDATE_ANIMATION] = UpdateAnimFunction
	}
end

return {
	[util.KEY_MESSAGE_TYPE] = ChatConstants.MessageTypeWelcome,
	[util.KEY_CREATOR_FUNCTION] = CreateWelcomeMessageLabel
}
--	local now = os.time()
--	if now - lastMoan > 5 then
--		if math.random() > .3 then
--			zombie.Moan:Play()
----			print("playing moan")
--			lastMoan = now
--		end
--	end
	wait(2)
end
--[[
	@class Blend.story
]]

local require = require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).load(script)

local RunService = game:GetService("RunService")

local Blend = require("Blend")
local Maid = require("Maid")

return function(target)
	local maid = Maid.new()

	local isVisible = Instance.new("BoolValue")
	isVisible.Value = false

	local percentVisible = Blend.Spring(Blend.Computed(isVisible, function(visible)
		return visible and 1 or 0
	end), 35)

	local transparency = Blend.Computed(percentVisible, function(percent)
		return 1 - percent
	end)

	maid:GiveTask((Blend.New "Frame" {
		Size = UDim2.new(0.5, 0, 0.5, 0);
		BackgroundColor3 = Color3.new(0.9, 0.9, 0.9);
		AnchorPoint = Vector2.new(0.5, 0.5);
		Position = UDim2.new(0.5, 0, 0.5, 0);
		BackgroundTransparency = transparency;
		Parent = target;

		[Blend.Children] = {
			Blend.New "UIScale" {
				Scale = Blend.Computed(percentVisible, function(percent)
					return 0.8 + 0.2*percent
				end);
			};
			Blend.New "UICorner" {
				CornerRadius = UDim.new(0.05, 0);
			};
		};
	}):Subscribe())

	local PERIOD = 5
	maid:GiveTask(RunService.RenderStepped:Connect(function()
		isVisible.Value = os.clock()/PERIOD % 1 < 0.5
	end))

	return function()
		maid:DoCleaning()
	end
end
-- Events
local Events = ReplicatedStorage:FindFirstChild("Events")
local CheckpointEvent = Events:FindFirstChild("CheckpointEvent")
-- the random part/tool spawn positions.
Pos1 = script.Parent.Pos1.CFrame
Pos2 = script.Parent.Pos2.CFrame
--[[**
	<description>
	Saves the data to the data store. Called when a player leaves.
	</description>
**--]]
function DataStore:Save()
	if not self.valueUpdated then
		
		return
	end

	if RunService:IsStudio() and not SaveInStudio then
	
		if not SaveInStudioObject then
			
		end
		return
	end

	if self.backup then

		return
	end

	if self.value ~= nil then
		local save = clone(self.value)

		if self.beforeSave then
			local success, newSave = pcall(self.beforeSave, save, self)

			if success then
				save = newSave
			else
			
				return
			end
		end

		if not Verifier.warnIfInvalid(save) then return  end

		local success, problem = self.savingMethod:Set(save)

		if not success then
			-- TODO: Something more robust than this
			error("save error! " .. tostring(problem))
		end

		for _, afterSave in pairs(self.afterSave) do
			local success, err = pcall(afterSave, save, self)

			if not success then
			
			end
		end

	
	end
end
-- slash1
Attack(target,structureDamage)
end
wait(.3)
end
end

else
if not enRoute then
wait(math.random(1,4))
if not target then
ScanForPoint()
end
end

end

wait()
end -- end of loop
end)
movementCoroutine()

local scanCoroutine = coroutine.wrap(function()
while wait(3) do
local nearestPlayer,closestPlayerDist = nil,60
local nearestBuilding,closestBuildingDist = nil, 100

for _,player in next,game.Players:GetPlayers() do
if player.Character and player.Character:IsDescendantOf(workspace) then
local pos = player.Character.PrimaryPart.Position
local dist = (root.Position-pos).magnitude
if dist < closestPlayerDist then
nearestPlayer = player
closestPlayerDist = dist
end
end
game:GetService("RunService").Heartbeat:wait()
end

local structures = _G.worldStructures
for building,buildingData in next,structures do
local dist = (building.PrimaryPart.Position-root.Position).magnitude
if dist < closestBuildingDist then
nearestBuilding = building
closestBuildingDist = dist
end
game:GetService("RunService").Heartbeat:wait()
end

if nearestPlayer and nearestBuilding then