Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[local function attack(target)
	local distance = (TeddyAI.HumanoidRootPart.Position - target.HumanoidRootPart.Position).Magnitude
	if distance > 90 then
		humanoid:MoveTo(target.HumanoidRootPart.Position)
	else
		--stop movement
		--TeddyAI.Humanoid.WalkSpeed = 0
		--target.Humanoid.WalkSpeed = 0
		-- play sound
		--TeddyAI.Head.AttackSound:Play()
		--fire event
		local events = game.ReplicatedStorage:WaitForChild("Events")
		local player = game.Players:GetPlayerFromCharacter(target)
		events:WaitForChild("playerDeath"):FireClient(player, TeddyAI)
		-- play the animation
		local attackAnim = humanoid:LoadAnimation(script.AttackAnim)
		attackAnim:Play()
		attackAnim.Stopped:Wait()
		-- kill the player
		target.Humanoid.Health = 0
		--restart movement
		TeddyAI.Humanoid.WalkSpeed = script.Parent.Humanoid.WalkSpeed
	end
end]]



local function displayPath(waypoints)
	local color = BrickColor.Random()
	for index, waypoint in pairs(waypoints) do
		local part = Instance.new("Part")
		part.BrickColor = color
		part.Anchored = true
		part.CanCollide = false
		part.Size = Vector3.new(1,1,1)
		part.Position = waypoint.Position
		part.Parent = workspace
		local Debris = game:GetService("Debris")
		Debris:AddItem(part, 6)
	end
end

local function walkTo(destination)

	local path = getPath(destination)

	if path.Status == Enum.PathStatus.Success then
		for index, waypoint in pairs(path:GetWaypoints()) do
			local target = findTarget()
			if target and target.Humanoid.Health > 0 then
				attack(target)
				break
			else
				humanoid:MoveTo(waypoint.Position)
				humanoid.MoveToFinished:Wait()
			end
		end
	else
		humanoid:MoveTo(destination.Position - (TeddyAI.HumanoidRootPart.CFrame.LookVector * 10))
	end
end

function patrol()
	local waypoints = TeddyAI.Parent.TeddyWaypoints:GetChildren()
	local randomNum = math.random(1, #waypoints)
	walkTo(waypoints[randomNum])
end

while true do
	patrol()
end
-- EVENTS --


local ResizeEvent = ParentContainer.Attribs.ResizeEvent

local RowCt = 5
local CellSize = 0.25
local Padding = 6
local ContainerPadding_Bottom = 32

function getNewCellSize()
	 CellSize = (Container.AbsoluteSize.X / RowCt) - Padding
end

function updateLayout()
	--[[
	if #Container.Cells:GetChildren() < 1 then
		Container.Parent.HeaderFrame.Visible = false
	else
		Container.Parent.HeaderFrame.Visible = true
	end
	]]
	getNewCellSize()

	local cells = Container.Cells:GetChildren()
	
	for i, cell in pairs(cells) do
		local index = i - 1
		local posX = ((index % RowCt) * (CellSize + Padding)) + (Padding / 2)
		local posY = (math.floor(index / RowCt) * (CellSize + Padding)) + (Padding / 2)

		cell.Size = UDim2.fromOffset(CellSize, CellSize)
		cell.Position = UDim2.fromOffset(posX, posY)
	end

	local rows = math.ceil((#cells / RowCt))

	local newSize = UDim2.new(1, -24, 0, (rows * CellSize + Padding) + ContainerPadding_Bottom)
	Container.Size = newSize

	ResizeEvent:Fire(ParentContainer.Name)
end


Container.Cells.ChildAdded:Connect(updateLayout)
Container.Cells.ChildRemoved:Connect(updateLayout)
Container:GetPropertyChangedSignal("AbsoluteSize"):Connect(updateLayout)
-- regeneration


while true do
	local s = wait(1)
	local health = Humanoid.Health

	if health > 0 and health < Humanoid.MaxHealth then
		health = health + 0.01 * s * Humanoid.MaxHealth

		if health * 1.05 < Humanoid.MaxHealth then
			Humanoid.Health = health
		else
			Humanoid.Health = Humanoid.MaxHealth
		end
	end
end
------



UIS.InputBegan:connect(function(i,GP) 
if not GP then 
	
if i.KeyCode == Enum.KeyCode.L then REvent:FireServer("L",true) end
if i.KeyCode == Enum.KeyCode.H then REvent:FireServer("H",true) end
if i.KeyCode == Enum.KeyCode.J then REvent:FireServer("J",true)	end

end
end)

UIS.InputEnded:connect(function(i,GP)
if not GP then 
	
if i.KeyCode == Enum.KeyCode.H then REvent:FireServer("H",false) end

end
end)
--// All global vars will be wiped/replaced except script



return function(data)
	local playergui = service.PlayerGui
	local localplayer = service.Player
	local toggle = script.Parent.Parent.Toggle
	
	if client.Core.Get("Chat") then
		toggle.Position = UDim2.new(1, -(45+40),1, -45)
	end
	
	toggle.MouseButton1Down:Connect(function()
		local found = client.Core.Get("UserPanel",nil,true)
		if found then
			found.Object:Destroy()
		else
			client.Core.Make("UserPanel",{})
		end
	end)
	
	script.Parent.Parent.Parent = playergui
end
-- double rd_dbl_basic(byte f1..8)
-- @f1..8 - The 8 bytes composing a little endian double


local function rd_dbl_basic(f1, f2, f3, f4, f5, f6, f7, f8)
	local sign = (-1) ^ bit.rshift(f8, 7)
	local exp = bit.lshift(bit.band(f8, 0x7F), 4) + bit.rshift(f7, 4)
	local frac = bit.band(f7, 0x0F) * 2 ^ 48
	local normal = 1

	frac = frac + (f6 * 2 ^ 40) + (f5 * 2 ^ 32) + (f4 * 2 ^ 24) + (f3 * 2 ^ 16) + (f2 * 2 ^ 8) + f1 -- help

	if exp == 0 then
		if frac == 0 then
			return sign * 0
		else
			normal = 0
			exp = 1
		end
	elseif exp == 0x7FF then
		if frac == 0 then
			return sign * (1 / 0)
		else
			return sign * (0 / 0)
		end
	end

	return sign * 2 ^ (exp - 1023) * (normal + frac / 2 ^ 52)
end
-- Отображение глобальной статистики с учётом DataStore2 значения 
-- Что больше, то и будет результатом 



local ServerScriptService = game:GetService("ServerScriptService") -- берём ссылку на сервис серверных скриптов
local DataStore2 = require(ServerScriptService.DataStore2) -- если скачали модуль и залили в игру
BASE = game.Workspace.BASE.Value
DataParam="Kill"	-- ключ для баз DataStoreService и DataStore2 
DataStore2.Combine(BASE,DataParam)

local tmp, DonateStore

local sg = script.Parent --Surface GUI
local sample = script:WaitForChild("Sample") --Our Sample frame
local sf = sg:WaitForChild("ScrollingFrame") --The scrolling frame
local ui = sf:WaitForChild("UI") --The UI list layout
--CHANGE THE NAME, COPY ALL BELOW, AND PAST INTO COMMAND BAR



local TycoonName = "Tycoon kit"

if game.Workspace:FindFirstChild(TycoonName) then
	local s = nil
	local bTycoon = game.Workspace:FindFirstChild(TycoonName)
	local zTycoon = game.Workspace:FindFirstChild("Zednov's Tycoon Kit")
	local new_Collector = zTycoon['READ ME'].Script:Clone()
	local Gate = zTycoon.Tycoons:GetChildren()[1].Entrance['Touch to claim!'].GateControl:Clone()
	if zTycoon then
		for i,v in pairs(zTycoon.Tycoons:GetChildren()) do --Wipe current tycoon 'demo'
			if v then
				s = v.PurchaseHandler:Clone()
				v:Destroy()
			end
		end
		-- Now make it compatiable
		if s ~= nil then
			for i,v in pairs(bTycoon.Tycoons:GetChildren()) do
				local New_Tycoon = v:Clone()
				New_Tycoon:FindFirstChild('PurchaseHandler'):Destroy()
				s:Clone().Parent = New_Tycoon
				local Team_C = Instance.new('BrickColorValue',New_Tycoon)
				Team_C.Value = BrickColor.new(tostring(v.Name))
				Team_C.Name = "TeamColor"
				New_Tycoon.Name = v.TeamName.Value
				New_Tycoon.Cash.Name = "CurrencyToCollect"
				New_Tycoon.Parent = zTycoon.Tycoons
				New_Tycoon.TeamName:Destroy()
				v:Destroy()
				New_Tycoon.Essentials:FindFirstChild('Cash to collect: $0').NameUpdater:Destroy()
				local n = new_Collector:Clone()
				n.Parent = New_Tycoon.Essentials:FindFirstChild('Cash to collect: $0')
				n.Disabled = false
				New_Tycoon.Gate['Touch to claim ownership!'].GateControl:Destroy()
				local g = Gate:Clone()
				g.Parent = New_Tycoon.Gate['Touch to claim ownership!']
			end
		else
			error("Please don't tamper with script names or this won't work!")
		end
	else
		error("Please don't change the name of our tycoon kit or it won't work!")
	end
	bTycoon:Destroy()
	Gate:Destroy()
	new_Collector:Destroy()
	print('Transfer complete! :)')
else
	error("Check if you spelt the kit's name wrong!")
end
-- XxWrithyxX



local Bloco = script.Parent
local Esperar = false

Bloco.Touched:Connect(function(Hit)
	local Humanoid = Hit.Parent:FindFirstChild("Humanoid")
	
	if Humanoid and Esperar == false then
		Esperar = true
		
		Humanoid:TakeDamage(101) -- Damage
		
		wait(0.5) -- Seconds
		
		Esperar = false
		
	end
end)
--Old never do it like this because child of Tycoons get deleted the the child children is empty causes bug
--local tycoons = script.Parent:WaitForChild("Tycoons"):GetChildren()



local Tycoons = script.Parent:WaitForChild("Tycoons")
local serverStorage = game:GetService("ServerStorage")
local runService = game:GetService("RunService")

local DataStoreService = game:GetService("DataStoreService")
local SaveSettings = require(script.Parent.SaveTrigger.Settings).Save

local playerData = DataStoreService:GetDataStore(SaveSettings.databaseName)
--// All global vars will be wiped/replaced except script



return function(data)
	local playergui = service.PlayerGui
	local gui = client.UI.Prepare(script.Parent.Parent)
	local label = gui.LABEL
	local str = data.Message

	client.UI.Remove("Notif",script.Parent.Parent)

	if str and type(str)=="string" then
		label.Text = str
		gTable:Ready()
	else
		gui:Destroy()
	end
end
---- Create motors


local ovenMotor = Instance.new("Motor")
ovenMotor.Name = "OvenMotor"
ovenMotor.Parent = stove.Bottom
ovenMotor.Part0 = stove.Bottom
ovenMotor.Part1 = stove.Door
ovenMotor.C0 = CFrame.new(0,stove.Bottom.Size.Y,-stove.Bottom.Size.Z/2+stove.Door.Size.Z/2) * CFrame.Angles(0,-math.pi/2,0)
ovenMotor.C1 = CFrame.new(0,-stove.Door.Size.Y/2+stove.Bottom.Size.Y/2,0) * CFrame.Angles(0,3*math.pi/2,0)
ovenMotor.MaxVelocity = .1
-- TOOLAME CONFIDENTIAL --


Use = false
function ChangeCode(Code,l)
if script.Parent.Parent.Status.Value ~= 0 then return end
if Use then return end
Use = true
for i,l in pairs(script.Parent.Parent.CPanelButtons:GetChildren()) do l.BrickColor = BrickColor.new("Light stone grey") end


l.BrickColor =  BrickColor.new("Lime green")
script.Parent.Parent.SounderTone.Value = Code
wait(0.5)
Use = false
end


for i,l in pairs(script.Parent.Parent.CPanelButtons:GetChildren()) do
	
	l.ClickDetector.MouseClick:connect(function() ChangeCode(l.Name:sub(7),l) end)
end
--------RIGHT DOOR 8--------


game.Workspace.doorright.l73.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l72.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l71.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l63.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l62.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l61.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l53.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l52.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l51.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l43.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l42.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l41.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l33.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l32.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l31.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l23.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l22.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l21.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l12.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l11.BrickColor = BrickColor.new(135)

game.Workspace.doorright.l13.BrickColor = BrickColor.new(102)
-- Visualizes a ray. This will not run if FastCast.VisualizeCasts is false.


function DbgVisualizeSegment(castStartCFrame: CFrame, castLength: number): ConeHandleAdornment?
	if ClientSettings.Debug.Value == false then return nil end
	local adornment = Instance.new("CylinderHandleAdornment")
	adornment.Adornee = workspace.Terrain
	adornment.CFrame = castStartCFrame
	adornment.Height = castLength
	adornment.Color3 = Color3.new(1, 0, 0)
	adornment.Radius = 0.05
	adornment.Transparency = 0.5
	adornment.Parent = GetFastCastVisualizationContainer()
	Debris:AddItem(adornment, 3)
	return adornment
end
--Binds



Service.InputBegan:Connect(function(input, gameProcessedEvent)
	local buttons = Service:GetMouseButtonsPressed()
	for _, button in pairs (buttons) do
	if (button.UserInputType.Name == "MouseButton1") then
		Slash()
	end
	end
end)

Service.InputBegan:connect(function(input, recieved)
	if input.UserInputType == Enum.UserInputType.Keyboard then
		if input.KeyCode == Enum.KeyCode.Q then
		Shield()	
		end
	end
end)

Service.InputBegan:connect(function(input, recieved)
	if input.UserInputType == Enum.UserInputType.Keyboard then
		if input.KeyCode == Enum.KeyCode.E then
		Replace()	
		end
	end
end)
--> VARIABLES


local Module = script.Parent
local Door = Module:WaitForChild("Door")
local Board = Module:WaitForChild("Board")
local Text = Board:WaitForChild("Informer"):WaitForChild("SurfaceGui"):WaitForChild("TextLabel")
local Code = Module:WaitForChild("Code").Value
local EnteredText = script:WaitForChild("EnteredText")
local OtherButtons = Board:WaitForChild("Other")
---------------------------------------------------------------------------------------------------------------------------
-- Functions
---------------------------------------------------------------------------------------------------------------------------



ClientControl.OnClientInvoke = (function(Mode, Value)
	if Mode == "PlayAnimation" and Humanoid then
		for i, v in pairs(Animations) do
			if v.Animation == Value.Animation then
				v.AnimationTrack:Stop()
				table.remove(Animations, i)
			end
		end
		local AnimationTrack = Humanoid:LoadAnimation(Value.Animation)
		table.insert(Animations, {Animation = Value.Animation, AnimationTrack = AnimationTrack})
		AnimationTrack:Play(Value.FadeTime, Value.Weight, Value.Speed)
	elseif Mode == "StopAnimation" and Value then
		for i, v in pairs(Animations) do
			if v.Animation == Value.Animation then
				v.AnimationTrack:Stop()
				table.remove(Animations, i)
			end
		end
	elseif Mode == "Preload" and Value then
		ContentProvider:Preload(Value)
	elseif Mode == "PlaySound" and Value then
		Value:Play()
	elseif Mode == "StopSound" and Value then
		Value:Stop()
	elseif Mode == "MousePosition" then
		return PlayerMouse.Hit.p
	end
end)

function InvokeServer(Mode, Value)
	pcall(function()
		local ServerReturn = ServerControl:InvokeServer(Mode, Value)
		return ServerReturn
	end)
end

function CheckIfAlive()
	return (Player and Player.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0)
end

function Equipped(Mouse)
	Character = Tool.Parent
	Player = Players:GetPlayerFromCharacter(Character)
	Humanoid = Character:FindFirstChild("Humanoid")
	if not CheckIfAlive() then
		return
	end
	PlayerMouse = Player:GetMouse()
	Mouse.Button1Down:connect(function()
		InvokeServer("MouseClick", {Down = true})
	end)
	Mouse.Button1Up:connect(function()
		InvokeServer("MouseClick", {Down = false})
	end)
	Mouse.KeyDown:connect(function(Key)
		InvokeServer("KeyPress", {Key = Key, Down = true})
	end)
	Mouse.KeyUp:connect(function(Key)
		InvokeServer("KeyPress", {Key = Key, Down = false})
	end)
end

function Unequipped()
	for i, v in pairs(Animations) do
		if v and v.AnimationTrack then
			v.AnimationTrack:Stop()
		end
	end
	Animations = {}
end

Tool.Equipped:connect(Equipped)
Tool.Unequipped:connect(Unequipped)
--			car.Body.Dash.D.door.Enabled = false


			
			open.Value = true
			
			script.Parent.Parent.DoorOpen:Play()
			e.Muffle.Enabled = false
			e.Muffle2.Enabled = false				
		elseif m.DesiredAngle == -1 then
			m.DesiredAngle = 0
			while m.CurrentAngle < 0 do wait() end
			script.Parent.Parent.DoorClose:Play()
			open.Value = false
			
			if carSeat.Occupied.Value == true and car.Electrics.Value == false then
				--car.Body.Dash.D.door.Enabled = true
			end
--[[ TELEPORT SERVICE ]]

--

if (game.VIPServerId ~= "" and game.VIPServerOwnerId == 0) then

	warn("Booting Server !")

	local waitTime = 20

	Players.PlayerAdded:connect(function(player)
		wait(waitTime)
		waitTime = waitTime / 2
		TeleportService:Teleport(game.PlaceId, player)
	end)

	for _,player in pairs(Players:GetPlayers()) do
		TeleportService:Teleport(game.PlaceId, player)
		wait(waitTime)
		waitTime = waitTime / 2
	end
else
	game:BindToClose(function()
		local con

		if (#Players:GetPlayers() == 0) then
			return
		end

		if (game:GetService("RunService"):IsStudio()) then
			return
		end

		for i,v in pairs(game.Players:GetChildren()) do
			AddUI(v)
		end

		con = Players.PlayerAdded:connect(function(v)
			wait(1)
			AddUI(v)
		end)

		wait(15) 

		con:Disconnect()


		local reservedServerCode = TeleportService:ReserveServer(game.PlaceId)

		for _,player in pairs(Players:GetPlayers()) do
			TeleportService:TeleportToPrivateServer(game.PlaceId, reservedServerCode, { player })
		end
		Players.PlayerAdded:connect(function(player)
			TeleportService:TeleportToPrivateServer(game.PlaceId, reservedServerCode, { player })
		end)
		while (#Players:GetPlayers() > 0) do
			wait(1)
		end 


	end)
end
--Lamp Controls -------------------------------------------


script.Parent.Configuration.LampStatus.Changed:connect(function()
if script.Parent.Configuration.LampStatus.Value == 1 then
	Model.Tilt.Lamp.SpotLight.Brightness = .1
	Model.Tilt.Light.Transparency = .9
	wait(.1)
	Model.Tilt.Lamp.SpotLight.Brightness = .2
	Model.Tilt.Light.Transparency = .8
	wait(.1)
	Model.Tilt.Lamp.SpotLight.Brightness = .3
	Model.Tilt.Light.Transparency = .7
	wait(.1)
	Model.Tilt.Lamp.SpotLight.Brightness = .4
	Model.Tilt.Light.Transparency = .6
	wait(.1)
	Model.Tilt.Lamp.SpotLight.Brightness = .5
	Model.Tilt.Light.Transparency = .5
	wait(.1)
	Model.Tilt.Lamp.SpotLight.Brightness = .6
	Model.Tilt.Light.Transparency = .4
	wait(.1)
	Model.Tilt.Lamp.SpotLight.Brightness = .7
	Model.Tilt.Light.Transparency = .3
	wait(.1)
	Model.Tilt.Lamp.SpotLight.Brightness = .8
	Model.Tilt.Light.Transparency = .2
	wait(.1)
	Model.Tilt.Lamp.SpotLight.Brightness = .9
	Model.Tilt.Light.Transparency = .1
	wait(.1)
	Model.Tilt.Lamp.SpotLight.Brightness = 1
	Model.Tilt.Light.Transparency = 0
	
	for i,v in pairs(Model.Tilt:GetChildren()) do 
		if v.Name == "Light" and v:isA("Part") then
		end
					
	end
else

	
	Model.Tilt.Lamp.SpotLight.Brightness = .9
	Model.Tilt.Light.Transparency = 0
	wait(.1)
	Model.Tilt.Lamp.SpotLight.Brightness = .8
	Model.Tilt.Light.Transparency = .1
	wait(.1)
	Model.Tilt.Lamp.SpotLight.Brightness = .7
	Model.Tilt.Light.Transparency = .2
	wait(.1)
	Model.Tilt.Lamp.SpotLight.Brightness = .6
	Model.Tilt.Light.Transparency = .3
	wait(.1)
	Model.Tilt.Lamp.SpotLight.Brightness = .5
	Model.Tilt.Light.Transparency = .4
	wait(.1)
	Model.Tilt.Lamp.SpotLight.Brightness = .4
	Model.Tilt.Light.Transparency = .5
	wait(.1)
	Model.Tilt.Lamp.SpotLight.Brightness = .3
	Model.Tilt.Light.Transparency = .6
	wait(.1)
	Model.Tilt.Lamp.SpotLight.Brightness = .2
	Model.Tilt.Light.Transparency = .7
	wait(.1)
	Model.Tilt.Lamp.SpotLight.Brightness = .1
	Model.Tilt.Light.Transparency = .8
	wait(.1)
	Model.Tilt.Lamp.SpotLight.Brightness = 0
	Model.Tilt.Light.Transparency = 1
	
	for i,v in pairs(Model.Tilt:GetChildren()) do 
		if v.Name == "Lamp" and v:isA("Part") then
			
		end
			end
					
	end
end)
--[[
	
	This is a wrapper for the SmoothDamp module. It stores
	all needed variables internally for ease of use.
	
	-------------------------------------------------------------------------

	local smooth = Smooth.new(Vector3 initialValue, Number smoothTime)
	
	smooth.Value
	smooth.Goal
	smooth.SmoothTime
	
	smooth:Update([Vector goal])
	smooth:UpdateAngle([Vector goal])
	smooth:SetMaxSpeed(Number speed)
	smooth:GetMaxSpeed()

	-------------------------------------------------------------------------

	EXAMPLE:

		local smoothPosition = Smooth.new(part.Position, 0.5)

		runService:BindToRenderStep("Example", 0, function()
			local position = smoothPosition:Update(mouse.Hit.p)
			part.Position = position
		end)

--]]





local Smooth = {}
Smooth.__index = Smooth

local SmoothDamp = require(script:WaitForChild("SmoothDamp"))


function Smooth.new(initialValue, smoothTime)

	assert(typeof(initialValue) == "Vector3", "initialValue should be Vector3")
	assert(typeof(smoothTime) == "number", "smoothTime should be a number")
	assert(smoothTime >= 0, "smoothTime must be a positive number")
	
	local self = setmetatable({
		Value = initialValue;
		Goal = initialValue;
		SmoothTime = smoothTime;
	}, Smooth)
	
	self._smoothDamp = SmoothDamp.new()
	
	return self
	
end


function Smooth:Update(goal)
	if (goal) then
		self.Goal = goal
	else
		goal = self.Goal
	end
	local value = self._smoothDamp:Update(self.Value, goal, self.SmoothTime)
	self.Value = value
	return value
end


function Smooth:UpdateAngle(goal)
	if (goal) then
		self.Goal = goal
	else
		goal = self.Goal
	end
	local value = self._smoothDamp:UpdateAngle(self.Value, goal, self.SmoothTime)
	self.Value = value
	return value
end


function Smooth:SetMaxSpeed(speed)
	self._smoothDamp.MaxSpeed = speed
end


function Smooth:GetMaxSpeed()
	return self._smoothDamp.MaxSpeed
end


return Smooth
-- You don't need to touch any of this


local cameraType = camera.CameraType
camera.CameraType = Enum.CameraType.Scriptable

local aimGui

if config.GunsEnabled.Value then
	aimGui = plane.AimPart.GUI:Clone()
	aimGui.Parent = player.PlayerGui
	aimGui.Enabled = true
	aimGui.Adornee = plane.AimPart
	
	if plane:FindFirstChild("Guns") then
		for _, gun in pairs(plane.Guns:GetChildren()) do
			gun.ChildAdded:connect(function(bullet)
				if bullet.Name == "Bullet" then
					bullet.CFrame = gun.Muzzle.CFrame
				end
			end)
		end
	end
end

local rs = game:GetService("RunService").RenderStepped

local mobileGui = script.MobileGui
local sliding = false

local thumb1, thumb2 = Vector2.new(), Vector2.new()
local x, y = 0, 0
local speed = 0

if userInputService.TouchEnabled then
	userInputService.ModalEnabled = true
	mobileGui.Parent = player.PlayerGui
	mobileGui.Throttle.Slider.MouseButton1Down:connect(function()
		sliding = true
		local mu
		mu = userInputService.TouchEnded:connect(function()
			sliding = false
			mu:disconnect()
		end)
		while sliding do
			rs:wait()
			local mouseY = mouse.Y - mobileGui.Throttle.AbsolutePosition.Y
			local s = math.min(math.max(mouseY / mobileGui.Throttle.AbsoluteSize.Y, 0), 1)
			speed = (1 - s) * config.Speed.Value
			mobileGui.Throttle.Slider.Position = UDim2.new(0, -10, s, -35)
		end
	end)
else
	mobileGui:Destroy()
end

local bodyGyro = Instance.new("BodyGyro", body)
bodyGyro.D = 30
bodyGyro.P = 300
bodyGyro.MaxTorque = Vector3.new()

local bodyVelocity = Instance.new("BodyVelocity", body)
bodyVelocity.P = math.huge
bodyVelocity.MaxForce = Vector3.new()
-- Scripted by Corktail


script.Parent.Humanoid.BreakJointsOnDeath = false
name="Humanoid"





while wait() do
	
	if script.Parent.Humanoid.Health<1 then
		
		 wait(0.0001)
script.Parent:findFirstChild("Torso"):findFirstChild("Left Shoulder"):Destroy()
script.Parent:findFirstChild("Torso"):findFirstChild("Right Shoulder"):Destroy()
script.Parent:findFirstChild("Torso"):findFirstChild("Left Hip"):Destroy()
script.Parent:findFirstChild("Torso"):findFirstChild("Right Hip"):Destroy()
script.Parent:findFirstChild("Head"):findFirstChild("face").Texture = "http://www.roblox.com/asset/?id=1312972246"
	end

end
----------------------------------------------------------------------------------------------------
-------------------=[ PROJETIL ]=-------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,Distance = 10000
	,BDrop = .25
	,BSpeed = 2500

	,SuppressMaxDistance = 25	--- Studs
	,SuppressTime = 10			--- Seconds

	,BulletWhiz = true
	,BWEmitter = 25
	,BWMaxDistance = 200
	
	,BulletFlare = false
	,BulletFlareColor = Color3.fromRGB(255,255,255)

	,Tracer = true
	,TracerColor = Color3.fromRGB(255,255,255)
	,TracerLightEmission = 1
	,TracerLightInfluence = 0
	,TracerLifeTime = .2
	,TracerWidth = .1
	,RandomTracer = false
	,TracerEveryXShots = 3
	,TracerChance = 100
	
	,BulletLight = false
	,BulletLightBrightness = 1
	,BulletLightColor = Color3.fromRGB(255,255,255)
	,BulletLightRange = 10

	,ExplosiveHit = false
	,ExPressure = 500
	,ExpRadius = 25
	,DestroyJointRadiusPercent = 0	--- Between 0 & 1
	,ExplosionDamage = 100

	,LauncherDamage = 100
	,LauncherRadius = 25
	,LauncherPressure = 500
	,LauncherDestroyJointRadiusPercent = 0