Pinkstack/roblox-luau-corpus-text huggingface dataset:
--/Recoil Modification


module.camRecoil = {
	RecoilUp 		= 1
	,RecoilTilt 	= 1
	,RecoilLeft 	= 1
	,RecoilRight 	= 1
}

module.gunRecoil = {
	RecoilUp 		= 1
	,RecoilTilt 	= 1
	,RecoilLeft 	= 1
	,RecoilRight 	= 1
}

module.AimRecoilReduction = .85
module.AimSpreadReduction = 1

module.MinRecoilPower 			= 1
module.MaxRecoilPower 			= 1
module.RecoilPowerStepAmount 	= 1

module.MinSpread 				= 1
module.MaxSpread 				= 1					
module.AimInaccuracyStepAmount 	= 1
module.AimInaccuracyDecrease 	= 1
module.WalkMult 				= 1

module.MuzzleVelocityMod	 	= 1

return module
-- texan fixed for new ELS :))) 


seat = script.Parent.Parent--the car's vehicle seat. Currently can be any part

sound = seat.Parent.Sound
sirens = {}
for i,v in pairs (sound:GetChildren()) do
	if v:IsA("Sound") and v.Name ~= "horn" then
		table.insert(sirens,{playing=false,horn=v})
	end
end

function siren()
	local distto = seat.Values.siren.Value:find(",")+0
	local siren1 = seat.Values.siren.Value:sub(1,distto-1)
	local siren2 = seat.Values.siren.Value:sub(distto+0)
	for _,i in pairs (sirens) do
		if i.horn.Name ~= siren1 and i.horn.Name ~= siren2 then
			i.playing = false
			i.horn:Stop()
		end
		if i.horn.Name == siren1 or i.horn.Name == siren2 then
			if not i.playing then
				i.playing = true
				i.horn:Play()
			end
		end
	end
end
seat.Values.siren.Changed:connect(siren)
--health.Changed:connect(function()
--root.Velocity = Vector3.new(0,5000,0)
--end)



local anims = {}
local lastAttack= tick()

local target,targetType

local lastLock = tick()

local fleshDamage = 35
local structureDamage = 50

local path = nil
local animController = ant:WaitForChild("AnimationController")

local preAnims = {
--[[
	Removes a Spring from the scheduler.
]]


function SpringScheduler.remove(spring: Spring)
	local damping = spring._lastDamping
	local speed = spring._lastSpeed

	local dampingBucket = springBuckets[damping]

	if dampingBucket == nil then
		return
	end

	local speedBucket = dampingBucket[speed]

	if speedBucket == nil then
		return
	end

	speedBucket[spring] = nil
end
-- CHARACTER HANDLER
-- This enables character data (volume, HumanoidRootParts, etc) to be handled on
-- an event-basis, instead of being retrieved every interval


local function updateCharactersTotalVolume()
	charactersTotalVolume = 0
	bodyParts = {}
	-- We ignore these due to their insignificance (e.g. we ignore the lower and
	-- upper torso because the HumanoidRootPart also covers these areas)
	-- This ultimately reduces the burden on the player region checks
	local bodyPartsToIgnore = {
		UpperTorso = true,
		LowerTorso = true,
		Torso = true,
		LeftHand = true,
		RightHand = true,
		LeftFoot = true,
		RightFoot = true,
	}
	for _, plr in pairs(players:GetPlayers()) do
		local charRegion = ZoneController.getCharacterRegion(plr)
		if charRegion then
			local rSize = charRegion.Size
			local charVolume = rSize.X*rSize.Y*rSize.Z
			charactersTotalVolume += charVolume
			for _, part in pairs(plr.Character:GetChildren()) do
				if part:IsA("BasePart") and not bodyPartsToIgnore[part.Name] then
					table.insert(bodyParts, part)
				end
			end
		end
	end
end
players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		local humanoid = char:WaitForChild("Humanoid", 3)
		if humanoid then
			updateCharactersTotalVolume()
			for _, valueInstance in pairs(humanoid:GetChildren()) do
				if valueInstance:IsA("NumberValue") then
					valueInstance.Changed:Connect(function()
						updateCharactersTotalVolume()
					end)
				end
			end
		end
	end)
end)
players.PlayerRemoving:Connect(function(plr)
	updateCharactersTotalVolume()
	playerExitDetections[plr] = nil
end)
-- Roblox character sound script



local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

local SOUND_DATA : { [string]: {[string]: any}} = {
	Climbing = {
		SoundId = "",
		Looped = true,
	},
	Died = {
		SoundId = "",
	},
	FreeFalling = {
		SoundId = "",
		Looped = true,
	},
	GettingUp = {
		SoundId = "",
	},
	Jumping = {
		SoundId = "",
	},
	Landing = {
		SoundId = "",
	},
	Running = {
		SoundId = "rbxassetid://10298831700",
		Looped = true,
		Volume = 0.2,
	},
	Splash = {
		SoundId = "",
	},
	Swimming = {
		SoundId = "",
		Looped = true,
		Pitch = 1.6,
	},
}
--[[
body.MP.Sound.Changed:Connect(function(val)
	if val == "Volume" then
		--body.MP.Sound.Volume = body.Parent.DriveSeat.Values.MusicVolume.Value
		body.MP.OutsideSound.Volume = 0 --prevents muffle
	--	body.MP.OutsideSound.Muffle.Enabled = false
	end
end)--]]
--// F key, Horn


mouse.KeyUp:connect(function(key)
	if key=="f" then 
		veh.Lightbar.middle.Airhorn:Stop()
	end
end)








mouse.KeyDown:connect(function(key)
	if key=="j" then 
		veh.Lightbar.middle.Beep:Play()
veh.Lightbar.RemoteEvent:FireServer(true)
	end
	end)
-- places a death touch on all green parts, kill blocks.



local waits = .01
local debounce = false

for _, x in pairs(game:GetService("Workspace"):GetDescendants()) do
	if x:IsA("Part") then
		if x.Color == Color3.fromRGB(0,255,0) then
			x.Touched:Connect(function(player)
				pcall(function()
					local plr = game:GetService("Players"):GetPlayerFromCharacter(player.Parent)
					local human = plr.Character.Humanoid
					if human then
						if not debounce then  -- Check that debounce variable is not true
							debounce = true  -- Set variable to true
							plr.Character:WaitForChild("Humanoid").Health = 0
							debounce = false  -- Reset variable to false
						end
					else

					end
				end)
			end)
		end
	end
end
--[=[
	@within Gamepad
	@prop ButtonUp Signal<(button: Enum.KeyCode, processed: boolean)>
	@readonly
	The ButtonUp signal fires when a gamepad button is released.
	The released KeyCode is passed to the signal, along with
	whether or not the event was processed.

	```lua
	gamepad.ButtonUp:Connect(function(button: Enum.KeyCode, processed: boolean)
		print("Button up", button, processed)
	end)
	```
]=]
--!strict


type Object = { [string]: any }
local Array = require(script.Parent.Parent.Array)
type Array<T> = Array.Array<T>
type Tuple<T, V> = Array<T | V>

return function(value: string | Object | Array<any>): Array<any>
	assert(value :: any ~= nil, "cannot get entries from a nil value")
	local valueType = typeof(value)

	local entries: Array<Tuple<string, any>> = {}
	if valueType == "table" then
		for key, keyValue in pairs(value :: Object) do
			-- Luau FIXME: Luau should see entries as Array<any>, given object is [string]: any, but it sees it as Array<Array<string>> despite all the manual annotation
			table.insert(entries, { key :: string, keyValue :: any })
		end
	elseif valueType == "string" then
		for i = 1, string.len(value :: string) do
			entries[i] = { tostring(i), string.sub(value :: string, i, i) }
		end
	end

	return entries
end
--WeaponsSystem.camera:setEnabled(false)



Camera.CFrame = original_cameraCF
		else
			WeaponsSystem.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
			humanoid:EquipTool(WeaponsSystem.seatedWeapon)
		end
	end)
end

function WeaponsSystem.shutdown()
	if not WeaponsSystem.didSetup then
		return
	end

	for _, weapon in pairs(WeaponsSystem.knownWeapons) do
		weapon:onDestroyed()
	end
	WeaponsSystem.knownWeapons = {}

	if IsServer and WeaponsSystem.networkFolder then
		WeaponsSystem.networkFolder:Destroy()
	end
	WeaponsSystem.networkFolder = nil
	WeaponsSystem.remoteEvents = {}
	WeaponsSystem.remoteFunctions = {}

	for _, connection in pairs(WeaponsSystem.connections) do
		if typeof(connection) == "RBXScriptConnection" then
			connection:Disconnect()
		end
	end
	WeaponsSystem.connections = {}
end

function WeaponsSystem.getWeaponTypeFromTags(instance)
	for _, tag in pairs(CollectionService:GetTags(instance)) do
		local weaponTypeFound = WEAPON_TYPES_LOOKUP[tag]
		if weaponTypeFound then
			return weaponTypeFound
		end
	end

	return nil
end

function WeaponsSystem.createWeaponForInstance(weaponInstance)
	coroutine.wrap(function()
		local weaponType = WeaponsSystem.getWeaponTypeFromTags(weaponInstance)
		if not weaponType then
			local weaponTypeObj = weaponInstance:WaitForChild("WeaponType")

			if weaponTypeObj and weaponTypeObj:IsA("StringValue") then
				local weaponTypeName = weaponTypeObj.Value
				local weaponTypeFound = WEAPON_TYPES_LOOKUP[weaponTypeName]
				if not weaponTypeFound then
					warn(string.format("Cannot find the weapon type \"%s\" for the instance %s!", weaponTypeName, weaponInstance:GetFullName()))
					return
				end

				weaponType = weaponTypeFound
			else
				warn("Could not find a WeaponType tag or StringValue for the instance ", weaponInstance:GetFullName())
				return
			end
		end

		-- Since we might have yielded while trying to get the WeaponType, we need to make sure not to continue
		-- making a new weapon if something else beat this iteration.
		if WeaponsSystem.getWeaponForInstance(weaponInstance) then
			warn("Already got ", weaponInstance:GetFullName())
			warn(debug.traceback())
			return
		end

		-- We should be pretty sure we got a valid weaponType by now
		assert(weaponType, "Got invalid weaponType")

		local weapon = weaponType.new(WeaponsSystem, weaponInstance)
		WeaponsSystem.knownWeapons[weaponInstance] = weapon
	end)()
end

function WeaponsSystem.getWeaponForInstance(weaponInstance)
	if not typeof(weaponInstance) == "Instance" then
		warn("WeaponsSystem.getWeaponForInstance(weaponInstance): 'weaponInstance' was not an instance.")
		return nil
	end

	return WeaponsSystem.knownWeapons[weaponInstance]
end
--[=[
	Throws an error if the Brio is dead.

	```lua
	brio.DEAD:ErrorIfDead() --> ERROR: [Brio.ErrorIfDead] - Brio is dead
	```
]=]


function Brio:ErrorIfDead()
	if not self._values then
		error("[Brio.ErrorIfDead] - Brio is dead")
	end
end
--//Custom Functions\\--


function FindKiller(victimTeamColor, victim)	
	local creator = victim:FindFirstChildOfClass("ObjectValue")
	
	if creator and (string.lower(creator.Name) == "creator") and creator.Value then
		sendFeed:FireAllClients({creator, victim, victimTeamColor})
	elseif not creator then
		sendFeed:FireAllClients({victim, victimTeamColor})
	end
end
-- Script Below





















































local frame = script.Parent
local rgb = Color3.fromRGB
local ud2 = UDim2.new
repeat
	wait()
until game.Players.LocalPlayer
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()

frame.ClipsDescendants = true
frame.AutoButtonColor = false


function tweenInRipple(ripple)
	spawn(function()
		local TweenService = game:GetService("TweenService")
		local Part = ripple
		local Info = TweenInfo.new(
			TimeLength,
			Enum.EasingStyle.Linear,
			Enum.EasingDirection.InOut,
			0,
			false,
			0
		)
		local Goals = 
		{
			Size = ud2(0, PixelSize, 0, PixelSize);
		}
		local Tween = TweenService:Create(Part, Info, Goals)
		Tween:Play()
	end)
end

function fadeOutRipple(ripple)
	spawn(function()
		local TweenService = game:GetService("TweenService")
		local Part = ripple
		local Info = TweenInfo.new(
			FadeLength,
			Enum.EasingStyle.Linear,
			Enum.EasingDirection.InOut,
			0,
			false,
			0
		)
		local Goals = 
		{
			ImageTransparency = 1;
		}
		local Tween = TweenService:Create(Part, Info, Goals)
		Tween:Play()
		wait(FadeLength + 0.1)
		ripple:Destroy()
	end)
end

frame.MouseButton1Down:Connect(function()
	local done = false
	local ripple = script.Circle:Clone()
	ripple.Parent = frame
	ripple.ZIndex = frame.ZIndex + 1
	ripple.ImageColor3 = RippleColor
	ripple.ImageTransparency = RippleTransparency
	tweenInRipple(ripple)
	frame.MouseButton1Up:Connect(function()
		if done == false then
			done = true
			fadeOutRipple(ripple)
		end
	end)
	wait(4);
	done = true;
	fadeOutRipple(ripple) -- if it doesnt detect that it was unselected
end)
--[=[
	@class Streamable
	@client
	Because parts in StreamingEnabled games can stream in and out of existence at
	any point in time, it is hard to write code to interact with them. This is
	where Streamables come into play. Streamables will observe the existence of
	a given instance, and will signal when the instance exists and does not
	exist.

	The API is very simple. Create a Streamable that points to a certain parent
	and looks for a specific child instance (typically a BasePart). Then, call
	the `Observe` method to observe when the instance streams in and out.

	```lua
	local Streamable = require(packages.Streamable).Streamable

	-- Models might take a bit to load, but the model instance
	-- is never removed, thus we can use WaitForChild.
	local model = workspace:WaitForChild("MyModel")

	-- Watch for a specific part in the model:
	local partStreamable = Streamable.new(model, "SomePart")

	partStreamable:Observe(function(part, trove)
		print(part:GetFullName() .. " added")
		-- Run code on the part here.
		-- Use the trove to manage cleanup when the part goes away.
		trove:Add(function()
			-- General cleanup stuff
			print(part.Name .. " removed")
		end)
	end)

	-- Watch for the PrimaryPart of a model to exist:
	local primaryStreamable = Streamable.primary(model)
	primaryStreamable:Observe(function(primary, trove)
		print("Model now has a PrimaryPart:", primary.Name)
		trove:Add(function()
			print("Model's PrimaryPart has been removed")
		end)
	end)

	-- At any given point, accessing the Instance field will
	-- reference the observed part, if it exists:
	if partStreamable.Instance then
		print("Streamable has its instance:", partStreamable.Instance)
	end

	-- When/if done, call Destroy on the streamable, which will
	-- also clean up any observers:
	partStreamable:Destroy()
	primaryStreamable:Destroy()
	```

	For more information on the mechanics of how StreamingEnabled works
	and what sort of behavior to expect, see the
	[Content Streaming](https://developer.roblox.com/en-us/articles/content-streaming#technical-behavior)
	page. It is important to understand that only BaseParts and their descendants are streamed in/out,
	whereas other instances are loaded during the initial client load. It is also important to understand
	that streaming only occurs on the client. The server has immediate access to everything right away.
]=]


local Streamable = {}
Streamable.__index = Streamable
--once someone talks to the shopkeeper, the GUI will be cloned to the player, and this script will be cloned to the GUI and then enabled to load all the items



shop = game.ServerStorage:findFirstChild(script.Parent.Name)
gui = script.Parent.CenterFrame.Shop

gui.Header.Text = script.Parent.Name

items = shop:GetChildren()

xv = 0
yv = 0

for i,v in pairs(items) do
	if v.className == "Model" then
		local button = gui.Items.BaseButton:clone() --make new button for each item
		button.Parent = gui.Items
		button.Name = v.Name
		button.Image = "http://www.roblox.com/asset/?id="..v.DecalID.Value
		button.Position = UDim2.new(0, xv*80, 0, yv*80)
		xv = xv + 1
		if xv == 4 then
			xv = 0
			yv = yv + 1
		end
		local desc = v.ItemDesc:clone() --place the item desc into the button
		desc.Parent = button
		local cost = v.ItemCost:clone()
		cost.Parent = button
		button.Visible = true
	end
end
--Updated for R15 avatars by StarWars


local Tool = script.Parent;
debris = game:GetService("Debris")

enabled = true

local sounds = {Tool.Handle.MoneySound1, Tool.Handle.MoneySound2, Tool.Handle.MoneySound3}
local buck = nil


buck = Instance.new("Part")
buck.formFactor = 2
buck.Size = Vector3.new(2,.4,1)
buck.BrickColor = BrickColor.new(28)
buck.TopSurface = 0
buck.BottomSurface = 0
buck.Elasticity = .01 

local d = Instance.new("Decal")
d.Face = 4
d.Texture = "http://www.roblox.com/asset/?id=16658163"
d.Parent = buck

local d2 = d:Clone()
d2.Face = 1
d2.Parent = buck

function isTurbo(character)
	return character:FindFirstChild("Monopoly") ~= nil
end

function MakeABuck(pos)

	local limit = 5
	if (isTurbo(Tool.Parent) == true) then
		limit = 15 -- LOL!
	end

	for i=1,limit do

		local b = buck:Clone()
		local v = Vector3.new(math.random() - .5, math.random() - .5, math.random() - .5).unit
		b.CFrame = CFrame.new(pos + (v * 2) + Vector3.new(0,4,0), v)
		b.Parent = game.Workspace
		debris:AddItem(b, 60)
	end

end

function onActivated()
	if not enabled  then
		return
	end

	enabled = false

	local char = Tool.Parent

	sounds[math.random(3)]:Play()

	MakeABuck(Tool.Handle.Position)
	
	local Torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
	local RightArm = char:FindFirstChild("Right Arm") or char:FindFirstChild("RightUpperArm")
	local RightShoulder = Torso:FindFirstChild("Right Shoulder") or RightArm:FindFirstChild("RightShoulder")

	RightShoulder.MaxVelocity = 0.5
	RightShoulder.DesiredAngle = 3
	wait(.2)
	RightShoulder.MaxVelocity = 0.5
	RightShoulder.DesiredAngle = 3
	wait(.2)
	RightShoulder.MaxVelocity = 0.5
	RightShoulder.DesiredAngle = 3
	wait(.2)
	RightShoulder.MaxVelocity = 0.5
	RightShoulder.DesiredAngle = 3
	wait(.2)


	RightShoulder.MaxVelocity = 1
--[[		-- поиск максимального индекса потомков
		local num = 0
		local temp= sf:GetChildren() -- стартовый индекс
		if #temp ~= 1 then
			for a,b in pairs(temp) do
				if b.Name ~= "UI" then
					if b.LayoutOrder > num then
						num = b.LayoutOrder
					end
				end
			end
		else
			num = 0
		end
]]

		
			-- добавление новых элементов в список
			for a,b in pairs(tmp) do
				local x = b:FindFirstChild("text") 
				if x then
--[=[
	Observes the spring animating
	@return Observable<T>
]=]


function SpringObject:ObserveRenderStepped()
	return self:ObserveOnSignal(RunService.RenderStepped)
end

function SpringObject:ObserveVelocityOnRenderStepped()
	return self:ObserveVelocityOnSignal(RunService.RenderStepped)
end

function SpringObject:ObserveVelocityOnSignal(signal)
	return Observable.new(function(sub)
		local maid = Maid.new()

		local startAnimate, stopAnimate = StepUtils.bindToSignal(signal, function()
			local animating = SpringUtils.animating(self._currentSpring)
			if animating then
				sub:Fire(SpringUtils.fromLinearIfNeeded(self._currentSpring.Velocity))
			else
				sub:Fire(SpringUtils.fromLinearIfNeeded(0*self._currentSpring.Velocity))
			end
			return animating
		end)

		maid:GiveTask(stopAnimate)
		maid:GiveTask(self.Changed:Connect(startAnimate))
		startAnimate()

		return maid
	end)
end
--[[==============================================================================
HOW TO USE:
Put this inside StarterPlayer > StarterPlayerScript and this script will make

DESCRIPTION:
The camera type - custom has changed from Roblox on 30/11/2020
This script is to change the camera type to track (The old vehicle camera type)

You should use this script for temporary use and change all the camera script in your game from Custom to Track
==============================================================================--]]


	
local cam = workspace.CurrentCamera

function UpdateCamera()
	if cam.CameraType == Enum.CameraType.Custom then
		cam.CameraType = Enum.CameraType.Track
	end
end

cam:GetPropertyChangedSignal("CameraType"):Connect(UpdateCamera)
UpdateCamera()
--[[
	Takes two tables A and B, returns if they are deeply equal. ignoreMetatables specifies if metatables should be ignored
	in the deep compare
	Assumes tables do not have self-references
]]



local function deepEqual(A, B, ignoreMetatables)
	if A == B then
		return true
	end
	local AType = type(A)
	local BType = type(B)
	if AType ~= BType then
		return false
	end
	if AType ~= "table" then
		return false
	end

	if not ignoreMetatables then
		local mt1 = getmetatable(A)
		if mt1 and mt1.__eq then
			--compare using built in method
			return A == B
		end
	end

	local keySet = {}

	for key1, value1 in pairs(A) do
		local value2 = B[key1]
		if value2 == nil or not deepEqual(value1, value2, ignoreMetatables) then
			return false
		end
		keySet[key1] = true
	end

	for key2, _ in pairs(B) do
		if not keySet[key2] then
			return false
		end
	end
	return true
end

return deepEqual
-- print(plr.Name)



local str=""
local inf
while true do	
	inf=plr:FindFirstChild("Info")
	if inf ~= nil then
		str=plr.Info.Value
		if str~="" then
			me.Text = str
			wait(2)
			-- уберётся только локальное сообщение -- серверное очищать надо на сервере!!!
			str = ""
			plr.Info.Value=""
			me.Text = ""
		end
	end
	wait(1)
end
-- Function to make a player explode


local function explodePlayer(player)
	if player.Character then
		local humanoid = player.Character:FindFirstChild("Humanoid")

		if humanoid then
			-- Listen for the jump event
			local connection
			connection = humanoid:GetPropertyChangedSignal("Jump"):Connect(function()
				if humanoid:GetState() == Enum.HumanoidStateType.Seated then
					return
				end

				-- Remove the connection to prevent multiple explosions
				connection:Disconnect()

				-- Create an explosion at the player's position
				local explosion = Instance.new("Explosion")
				explosion.Position = humanoid.Parent.HumanoidRootPart.Position
				explosion.Parent = game.Workspace

				-- Respawn the player (optional)
				wait(5) -- You can adjust the respawn delay as needed
				game:GetService("StarterPlayer"):RemovePlayer(player)
			end)
		end
	end
end
--[[
	While the humanoid is running, update isMoving, which is used to generate interest points
]]


local function connectInterestToCharacter(character)
	local humanoid = character:FindFirstChild("Humanoid")

	connections.running =
		humanoid.Running:Connect(
		function(speed)
			if speed > 0.1 then
				isMoving = true
			else
				isMoving = false
			end
		end
	)
end
---------------------------------------------------------------


function onChildAdded(child)
	if child.Name == "SeatWeld" then
		local human = child.part1.Parent:findFirstChild("Humanoid") 
		if (human ~= nil) then
			print("Human IN")
			seat.SirenControl.Control.CarName.Value = human.Parent.Name.."'s Car"
			seat.Parent.Name = human.Parent.Name.."'s Car"
			s.Parent.SirenControl:clone().Parent = game.Players:findFirstChild(human.Parent.Name).PlayerGui
			s.Parent.RDetector:clone().Parent = game.Players:findFirstChild(human.Parent.Name).PlayerGui
			seat.Start:Play()
			wait(1)
			seat.Start:Stop()
			seat.Engine:Play()
		end
	end
end

function onChildRemoved(child)
	if (child.Name == "SeatWeld") then	
		local human = child.part1.Parent:findFirstChild("Humanoid") 
		if (human ~= nil) then
			print("Human OUT")
			seat.Parent.Name = "Empty Car"
			seat.SirenControl.Control.CarName.Value = "Empty Car"
			game.Players:findFirstChild(human.Parent.Name).PlayerGui.SirenControl:remove()
			game.Players:findFirstChild(human.Parent.Name).PlayerGui.RDetector:remove()
			seat.Engine:Stop()
		end
	end
end


script.Parent.ChildAdded:connect(onChildAdded)
script.Parent.ChildRemoved:connect(onChildRemoved)