Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[
--▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬--
				   May, 3rd 2021
			    Created by NovemberReject

  Put this script in Workspace or ServerScriptService
   Set technology "ShadowMap" in Lighting properties

--▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬--
]]




local Vignette = true -- change to false if you don't want a shadow frame



local Lighting = game:GetService("Lighting")
local StarterGui = game:GetService("StarterGui")
local Bloom = Instance.new("BloomEffect")
local Blur = Instance.new("BlurEffect")
local ColorCor = Instance.new("ColorCorrectionEffect")
local SunRays = Instance.new("SunRaysEffect")
local Sky = Instance.new("Sky")
local Atm = Instance.new("Atmosphere")


for i, v in pairs(Lighting:GetChildren()) do
	if v then
		v:Destroy()
	end
end

Bloom.Parent = Lighting
Blur.Parent = Lighting
ColorCor.Parent = Lighting
SunRays.Parent = Lighting
Sky.Parent = Lighting
Atm.Parent = Lighting

if Vignette == true then
	local Gui = Instance.new("ScreenGui")
	Gui.Parent = StarterGui
	Gui.IgnoreGuiInset = true
	
	local ShadowFrame = Instance.new("ImageLabel")
	ShadowFrame.Parent = Gui
	ShadowFrame.AnchorPoint = Vector2.new(0.5,1)
	ShadowFrame.Position = UDim2.new(0.5,0,1,0)
	ShadowFrame.Size = UDim2.new(1,0,1.05,0)
	ShadowFrame.BackgroundTransparency = 1
	ShadowFrame.Image = "rbxassetid://4576475446"
	ShadowFrame.ImageTransparency = 0.3
	ShadowFrame.ZIndex = 10
end

Bloom.Intensity = 0.3
Bloom.Size = 10
Bloom.Threshold = 0.8

Blur.Size = 5

ColorCor.Brightness = 0.1
ColorCor.Contrast = 0.5
ColorCor.Saturation = -0.3
ColorCor.TintColor = Color3.fromRGB(255, 235, 203)

SunRays.Intensity = 0.075
SunRays.Spread = 0.727

Sky.SkyboxBk = "http://www.roblox.com/asset/?id=151165214"
Sky.SkyboxDn = "http://www.roblox.com/asset/?id=151165197"
Sky.SkyboxFt = "http://www.roblox.com/asset/?id=151165224"
Sky.SkyboxLf = "http://www.roblox.com/asset/?id=151165191"
Sky.SkyboxRt = "http://www.roblox.com/asset/?id=151165206"
Sky.SkyboxUp = "http://www.roblox.com/asset/?id=151165227"
Sky.SunAngularSize = 10

Lighting.Ambient = Color3.fromRGB(2,2,2)
Lighting.Brightness = 2.25
Lighting.ColorShift_Bottom = Color3.fromRGB(0,0,0)
Lighting.ColorShift_Top = Color3.fromRGB(0,0,0)
Lighting.EnvironmentDiffuseScale = 0.2
Lighting.EnvironmentSpecularScale = 0.2
Lighting.GlobalShadows = true
Lighting.OutdoorAmbient = Color3.fromRGB(0,0,0)
Lighting.ShadowSoftness = 0.2
Lighting.ClockTime = 17
Lighting.GeographicLatitude = 45
Lighting.ExposureCompensation = 0.5

Atm.Density = 0.364
Atm.Offset = 0.556
Atm.Color = Color3.fromRGB(199, 175, 166)
Atm.Decay = Color3.fromRGB(44, 39, 33)
Atm.Glare = 0.36
Atm.Haze = 1.72

script:Destroy()
-- spawn a random ore


local oreName = oreBank[math.random(1,#oreBank)]
local newOre = game.ServerStorage.Items:FindFirstChild(oreName):Clone()
newOre.CFrame = root.CFrame*CFrame.new(0,1,0)
newOre.Parent = workspace--DevVince was here, hehe.
game.Debris:AddItem(newOre, 85)--Yay, no more spam lag.. o.o
end
end)
AttitudeCoroutine()


while true do
if mode == "charLock" then
targetLocation = (charRoot.CFrame*CFrame.new(-3,-2.6,1)).p
targetLook = charRoot.CFrame*CFrame.new(charRoot.CFrame.lookVector*1000)
end
bg.CFrame = targetLook
bp.Position = targetLocation
wait()
end
--------DO NOT TOUCH ANYTHING IN HERE UNLESS YOU KNOW WHAT YOU'RE DOING!!!--------



script.Parent.MaxSpeed = script.Parent.Settings.MaxSpeed.Value
maxspeed = script.Parent.MaxSpeed
script.Parent.BodyPosition.position = script.Parent.Position
script.Parent.BodyGyro.cframe = script.Parent.CFrame

value1 = 0

while true do

wait()

if script.Parent.Throttle == 1 then
	
	if value1 < maxspeed then value1 = value1 + script.Parent.Settings.Acceleration.Value end
		
		script.Parent.Driving.Value = true
		
		script.Parent.BodyVelocity.velocity = script.Parent.CFrame.lookVector*value1
		
		script.Parent.Left.Value = false
		
		script.Parent.Right.Value = false
end

if script.Parent.Throttle == 0 then 
	
	script.Parent.Driving.Value = false
	
	script.Parent.BodyVelocity.velocity = script.Parent.CFrame.lookVector*value1
	
	script.Parent.Left.Value = false
	
	script.Parent.Right.Value = false
	
end

if script.Parent.Throttle == -1 then

	if value1 > - maxspeed then value1 = value1 -script.Parent.Settings.Acceleration.Value end
		
		script.Parent.Driving.Value = true
		
		script.Parent.BodyVelocity.velocity = script.Parent.CFrame.lookVector*value1
		
		script.Parent.Left.Value = false
		
		script.Parent.Right.Value = false
		
end

if script.Parent.Steer == 1 then
	
	script.Parent.BodyGyro.cframe = script.Parent.BodyGyro.cframe * CFrame.fromEulerAnglesXYZ(0,- script.Parent.Settings.TurnSpeed.Value,0)
	
	script.Parent.Driving.Value = true
	
	script.Parent.Right.Value = true
	
	script.Parent.Left.Value = false
	
end

if script.Parent.Steer == -1 then
	
	
	script.Parent.BodyGyro.cframe = script.Parent.BodyGyro.cframe * CFrame.fromEulerAnglesXYZ(0,script.Parent.Settings.TurnSpeed.Value,0)
	
	script.Parent.Driving.Value = true
	
	script.Parent.Left.Value = true
	
	script.Parent.Right.Value = false
	
end
end
--open the cabinets script



local cab1 = script.Parent.Cab1
local cab2 = script.Parent.Cab2
local handle1 = script.Parent.handle
local handle2 = script.Parent.handle2

local CD1 = Instance.new("ClickDetector",cab1)
local CD1_2 = Instance.new("ClickDetector",handle1)
local CD2 = Instance.new("ClickDetector",cab2)
local CD2_2 = Instance.new("ClickDetector",handle2)
CD1.MaxActivationDistance = 5
CD2.MaxActivationDistance = 5
CD1_2.MaxActivationDistance = 5
CD2_2.MaxActivationDistance = 5

local TS = game:GetService("TweenService")
--[[local function playSoundLocal(sId,sParent)
	local sound = Instance.new("Sound",sParent)
	sound.SoundId = "http://www.roblox.com/asset/?id="..sId
	sound:Play()
	sound:Destroy()
end ]]

--

local function onClicked(player)
	--print(player.Name.." clicked on Uniform Giver")
	
	--playSoundLocal(152206246,player)	-- Declaring the sound ID and Parent
	
	
	
	
	local foundShirt = player.Character:FindFirstChild("Shirt") -- Tries to find Shirt
	if not foundShirt then -- if there is no shirt
		print("No shirt found, creating for "..player.Name)
		local newShirt = Instance.new("Shirt",player.Character)
		newShirt.Name = "Shirt"
	else if foundShirt then -- if there is a shirt
		print("Shirt found, reconstructing for "..player.Name)
		player.Character.Shirt:remove()
		local newShirt = Instance.new("Shirt",player.Character)
		newShirt.Name = "Shirt"
	end
	end
	
	
	
	
	local foundPants = player.Character:FindFirstChild("Pants") -- Tries to find Pants
	if not foundPants then -- if there are no pants
		print("No pants found, creating for "..player.Name)
		local newPants = Instance.new("Pants",player.Character)
		newPants.Name = "Pants"
	else if foundPants then -- if there are pants
		print("Pants found, reconstructing for "..player.Name)
		player.Character.Pants:remove()
		local newPants = Instance.new("Pants",player.Character)
		newPants.Name = "Pants"
	end
	end
	
	player.Character.Shirt.ShirtTemplate = shirtId
	player.Character.Pants.PantsTemplate = pantsId
	end
----


local tweenInfo = TweenInfo.new(.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
local Current = 2.1
local CenterWeldG1 	= {}
CenterWeldG1.C0 	= CFrame.new(0,Current,-5)
local leftWeldG1	= {}
leftWeldG1.C0	= CFrame.new(-7,Current,-2)*CFrame.fromEulerAnglesXYZ(0, math.rad(45), 0)
local rightWeldG1	= {}
rightWeldG1.C0	= CFrame.new(7,Current,-2)*CFrame.fromEulerAnglesXYZ(0, math.rad(-45), 0)

local Current = 2

local CenterWeldG2 = {}
CenterWeldG2.C0     = CFrame.new(0,Current,-5)
local leftWeldG2 = {}
leftWeldG2.C0 = CFrame.new(-7,Current,-2)*CFrame.fromEulerAnglesXYZ(0, math.rad(45), 0)
local rightWeldG2 = {}
rightWeldG2.C0 = CFrame.new(7,Current,-2)*CFrame.fromEulerAnglesXYZ(0, math.rad(-45), 0)
--[[Brakes]]


	Tune.ABSEnabled		= true		-- Implements ABS
	Tune.ABSThreshold	= 20		-- Slip speed allowed before ABS starts working (in SPS) 

	Tune.FBrakeForce	= 2500		-- Front brake force
	Tune.RBrakeForce	= 2000		-- Rear brake force
	Tune.PBrakeForce	= 5000		-- 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]
--// # key, ManOff


mouse.KeyUp:connect(function(key)
	if key=="h" then 
		veh.Lightbar.middle.Man:Stop()
		veh.Lightbar.middle.Wail.Volume = 2
		veh.Lightbar.middle.Yelp.Volume = 2
		veh.Lightbar.middle.Priority.Volume = 2
		script.Parent.Parent.Sirens.Man.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		veh.Lightbar.MANUAL.Transparency = 1
	end
end)
-- [[ Variables ]]


local MAIN = script.Parent

local CastAttachment  = require(MAIN.CastLogics.CastAttachment)
local CastVectorPoint = require(MAIN.CastLogics.CastVectorPoint)
local CastLinkAttach  = require(MAIN.CastLogics.CastLinkAttachment)

local Signal = require(MAIN.Tools.Signal)
local clock = os.clock
---------END RIGHT DOOR



game.Workspace.backdoorleft.p1.CFrame = game.Workspace.backdoorleft.p1.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
game.Workspace.backdoorleft.p2.CFrame = game.Workspace.backdoorleft.p2.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
game.Workspace.backdoorleft.p3.CFrame = game.Workspace.backdoorleft.p3.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
game.Workspace.backdoorleft.p4.CFrame = game.Workspace.backdoorleft.p4.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
game.Workspace.backdoorleft.p5.CFrame = game.Workspace.backdoorleft.p5.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
game.Workspace.backdoorleft.p6.CFrame = game.Workspace.backdoorleft.p6.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
game.Workspace.backdoorleft.p7.CFrame = game.Workspace.backdoorleft.p7.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
game.Workspace.backdoorleft.p8.CFrame = game.Workspace.backdoorleft.p8.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
game.Workspace.backdoorleft.p9.CFrame = game.Workspace.backdoorleft.p9.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
game.Workspace.backdoorleft.p10.CFrame = game.Workspace.backdoorleft.p10.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
game.Workspace.backdoorleft.p11.CFrame = game.Workspace.backdoorleft.p11.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
game.Workspace.backdoorleft.p12.CFrame = game.Workspace.backdoorleft.p12.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
game.Workspace.backdoorleft.p13.CFrame = game.Workspace.backdoorleft.p13.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
game.Workspace.backdoorleft.p14.CFrame = game.Workspace.backdoorleft.p14.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
game.Workspace.backdoorleft.p15.CFrame = game.Workspace.backdoorleft.p15.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
game.Workspace.backdoorleft.p16.CFrame = game.Workspace.backdoorleft.p16.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
game.Workspace.backdoorleft.p17.CFrame = game.Workspace.backdoorleft.p17.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
game.Workspace.backdoorleft.p18.CFrame = game.Workspace.backdoorleft.p18.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
game.Workspace.backdoorleft.p19.CFrame = game.Workspace.backdoorleft.p19.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
game.Workspace.backdoorleft.p20.CFrame = game.Workspace.backdoorleft.p20.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
-- END OF SETTINGS --



local gamepassusers = {} 

local chatservice = require(game:GetService("ServerScriptService"):WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))

game:GetService("Chat"):RegisterChatCallback(Enum.ChatCallbackType.OnServerReceivingMessage, function(message)
	local chatspeaker = chatservice:GetSpeaker(message.FromSpeaker)
	local arguments = message.Message:lower():split(" ")
	local player = chatspeaker:GetPlayer()
	local normalarguments = message.Message:split(" ")

	if player == nil then
		return message
	end

	if arguments[1] == prefix.."char" then
		if hidemessage == true then
			message.ShouldDeliver = false
		end

		if gamepassid ~= nil then
			if table.find(gamepassusers, player.UserId) == nil then
				chatspeaker:SendSystemMessage("You need to own the gamepass to use this command.", message.OriginalChannel)
				return message
			end
		end	
		
		if needswhitelist == true then
			if table.find(whitelist, player.UserId) == nil then
				chatspeaker:SendSystemMessage("You are not whitelisted to use this command.", message.OriginalChannel)
				return message
			end
		end
		
		if arguments[2] == nil then
			chatspeaker:SendSystemMessage("Please provide a username.", message.OriginalChannel)
		elseif player.Character == nil then
			chatspeaker:SendSystemMessage("Character has not loaded.", message.OriginalChannel)
		else
			script.CharFunction.Fire:Fire(player, chatspeaker.Name, message.OriginalChannel, arguments, normalarguments, matchsize)
		end
	end

	return message
end)

if game.CreatorType == Enum.CreatorType.User then
	table.insert(whitelist, game.CreatorId)	
end

game:GetService("Players").PlayerAdded:Connect(function(player)
	if game.CreatorType == Enum.CreatorType.Group then
		if player:GetRankInGroup(game.CreatorId) == 255 then
			table.insert(whitelist, player.UserId)
		end
	end
	if gamepassid ~= nil then
		local success, err = pcall(function()
			if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, gamepassid) then
				table.insert(gamepassusers, player.UserId)
			end
		end)
	end
end)
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 310		--	[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)
-- Create component


local Component = Cheer.CreateComponent('BTExportDialog', View);

function Component.Start()

	-- Show the view
	View.Visible = true;

	-- Animate opening
	View.Loading.Size = UDim2.new(1, 0, 0, 0);
	View.Loading:TweenSize(UDim2.new(1, 0, 0, 80), nil, nil, 0.25);

	-- Enable close buttons
	Cheer.Bind(View.Close.Button, Component.Close);
	Cheer.Bind(View.Loading.CloseButton, Component.Close);

	-- Return component for chaining
	return Component;

end;

function Component.Close()
	-- Closes the dialog

	-- Destroy the view
	View:Destroy();

end;

function Component.SetError(Error)
	-- Sets the dialog error

	-- Set error text
	View.Loading.TextLabel.Text = Error;

end;

function Component.SetResult(Result)
	-- Sets the dialog result

	-- Hide loading message
	View.Loading.Visible = false;	

	-- Set result text
	View.Info.CreationID.Text = Result;

	-- Animate opening for result UI
	View.Info.Size = UDim2.new(1, 0, 0, 0);
	View.Info.Visible = true;
	View.Info:TweenSize(UDim2.new(1, 0, 0, 75), nil, nil, 0.25);
	View.Tip.Size = UDim2.new(1, 0, 0, 0);
	View.Tip.Visible = true;
	View.Tip:TweenSize(UDim2.new(1, 0, 0, 30), nil, nil, 0.25);
	View.Close.Size = UDim2.new(1, 0, 0, 0);
	View.Close.Visible = true;
	View.Close:TweenSize(UDim2.new(1, 0, 0, 20), nil, nil, 0.25);

end;

return Component;
-- Given a weapon definition a weapons runtime data will be constructed.
-- Basic methods allow for managing of the weapons runtime data.
-- @param WeaponDefinition weaponDefinition
-- @param Model character
-- @return WeaponRuntimeData


function WeaponRuntimeData.New(weaponDefinition,character)
	local self = {}
	setmetatable(self,WeaponRuntimeData)
	
	self.weaponDefinition = weaponDefinition
	self.character = character
	self.recoilSimulator = RecoilSimulator.New(self)
	self.spreadSimulator = SpreadSimulator.New(self)
	
	-- Runtime Variables
	self.currentAmmo = self.weaponDefinition:GetMaxAmmo() -- Weapon starts out with max ammo

	return self
end
--------LEFT DOOR --------


game.Workspace.doorleft.l31.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l32.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l33.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l61.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l62.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l63.BrickColor = BrickColor.new(106)
--driving


mouse.KeyDown:connect(function (key1)
key1 = string.lower(key1)


if key1 == "w" then
		carSeat.hitter.CanCollide = false
		carSeat.exhaust.Part.Spring.Stiffness = 0
else
			carSeat.hitter.CanCollide = true
					carSeat.exhaust.Part.Spring.Stiffness = 500

end
end)
-- Sets the parent of all cached parts.


function PartCacheStatic:SetCacheParent(newParent: Instance)
	assert(getmetatable(self) == PartCacheStatic, ERR_NOT_INSTANCE:format("SetCacheParent", "PartCache.new"))
	assert(newParent:IsDescendantOf(workspace) or newParent == workspace, "Cache parent is not a descendant of Workspace! Parts should be kept where they will remain in the visible world.")
	
	self.CurrentCacheParent = newParent
	for i = 1, #self.Open do
		self.Open[i].Parent = newParent
	end
	for i = 1, #self.InUse do
		self.InUse[i].Parent = newParent
	end
end
--Precalculated paths


local t,f,n=true,false,{}
local r={
[58]={{22,21,20,58},t},
[49]={{22,21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49},t},
[16]={n,f},
[19]={{22,21,20,19},t},
[59]={{22,21,20,57,56,30,41,59},t},
[63]={{22,21,20,63},t},
[34]={{22,21,20,57,56,30,41,39,35,34},t},
[21]={{22,21},t},
[48]={{22,21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48},t},
[27]={{22,21,20,57,56,30,41,39,35,34,32,31,29,28,27},t},
[14]={n,f},
[31]={{22,21,20,57,56,30,41,39,35,34,32,31},t},
[56]={{22,21,20,57,56},t},
[29]={{22,21,20,57,56,30,41,39,35,34,32,31,29},t},
[13]={n,f},
[47]={{22,21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47},t},
[12]={n,f},
[45]={{22,21,20,57,56,30,41,39,35,34,32,31,29,28,44,45},t},
[57]={{22,21,20,57},t},
[36]={{22,21,20,57,56,30,41,39,35,37,36},t},
[25]={{22,21,20,57,56,30,41,39,35,34,32,31,29,28,27,26,25},t},
[71]={{22,21,20,57,56,30,41,59,61,71},t},
[20]={{22,21,20},t},
[60]={{22,21,20,57,56,30,41,60},t},
[8]={n,f},
[4]={n,f},
[75]={{22,21,20,57,56,30,41,59,61,71,72,76,73,75},t},
[22]={{22},t},
[74]={{22,21,20,57,56,30,41,59,61,71,72,76,73,74},t},
[62]={{22,21,20,62},t},
[1]={n,f},
[6]={n,f},
[11]={n,f},
[15]={n,f},
[37]={{22,21,20,57,56,30,41,39,35,37},t},
[2]={n,f},
[35]={{22,21,20,57,56,30,41,39,35},t},
[53]={{22,21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53},t},
[73]={{22,21,20,57,56,30,41,59,61,71,72,76,73},t},
[72]={{22,21,20,57,56,30,41,59,61,71,72},t},
[33]={{22,21,20,57,56,30,41,39,35,37,36,33},t},
[69]={{22,21,20,57,56,30,41,60,69},t},
[65]={{22,21,20,19,66,64,65},t},
[26]={{22,21,20,57,56,30,41,39,35,34,32,31,29,28,27,26},t},
[68]={{22,21,20,19,66,64,67,68},t},
[76]={{22,21,20,57,56,30,41,59,61,71,72,76},t},
[50]={{22,21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50},t},
[66]={{22,21,20,19,66},t},
[10]={n,f},
[24]={{22,21,20,57,56,30,41,39,35,34,32,31,29,28,27,26,25,24},t},
[23]={{22,21,20,62,23},t},
[44]={{22,21,20,57,56,30,41,39,35,34,32,31,29,28,44},t},
[39]={{22,21,20,57,56,30,41,39},t},
[32]={{22,21,20,57,56,30,41,39,35,34,32},t},
[3]={n,f},
[30]={{22,21,20,57,56,30},t},
[51]={{22,21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50,51},t},
[18]={n,f},
[67]={{22,21,20,19,66,64,67},t},
[61]={{22,21,20,57,56,30,41,59,61},t},
[55]={{22,21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t},
[46]={{22,21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,46},t},
[42]={{22,21,20,57,56,30,41,39,40,38,42},t},
[40]={{22,21,20,57,56,30,41,39,40},t},
[52]={{22,21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52},t},
[54]={{22,21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54},t},
[43]={n,f},
[7]={n,f},
[9]={n,f},
[41]={{22,21,20,57,56,30,41},t},
[17]={n,f},
[38]={{22,21,20,57,56,30,41,39,40,38},t},
[28]={{22,21,20,57,56,30,41,39,35,34,32,31,29,28},t},
[5]={n,f},
[64]={{22,21,20,19,66,64},t},
}
return r
--



local spring = {};
local spring_mt = {__index = spring};

function spring.new(position, velocity, target, stiffness, damping, precision)
	local self = {};
	
	self.position = position;
	self.velocity = velocity;
	self.target = target;
	self.stiffness = stiffness;
	self.damping = damping;
	self.precision = precision;
	
	return setmetatable(self, spring_mt);
end
-- Waits for parent.child to exist, then returns it


local function WaitForChild(parent, childName)
	assert(parent, "ERROR: WaitForChild: parent is nil")
	while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
	return parent[childName]
end

local PlayersService = Game:GetService('Players')
local DebrisService = Game:GetService('Debris')

local Tool = script.Parent
local ToolHandle = Tool.Handle

local ThrowSound = WaitForChild(ToolHandle, 'Throw')
--       else print("Didn't hit Target")


       end
       if makeRays then
        makeRay(CFrame.new(origPos, position)
         * CFrame.new(0, 0, -distance/2), Vector3.new(0.2, 0.2, distance))
       end
      end
     end
    end
   end
  end
  round:remove()
  break
 end
 wait()
end
if round then
	round:remove()
end
script:remove()
-- Listeners


Tool.Equipped:connect(function()
	
	-- Redefine character and humanoid just in case
	Character = Player.Character
	Humanoid = Character:WaitForChild("Humanoid")
	
	-- Show the segway menu gui and color gui
	NewDisplayGui = DisplayGui:Clone()
	NewDisplayGui.Parent = PlayerGui
	
	NewColorGui = ColorGui:Clone()
	NewColorGui.Parent = PlayerGui
	NewColorGui:WaitForChild("MyTool").Value = Tool
	
	local OpenButton = NewDisplayGui:WaitForChild("OpenButton")
	local ColorOpenButton = NewColorGui:WaitForChild("OpenButton")
	
	OpenButton:TweenPosition(UDim2.new(1, -92,1, -38),0,0,0.4,true)
	ColorOpenButton:TweenPosition(UDim2.new(0, -6,0.5, -70),0,0,0.4,true)
end)

Tool.Unequipped:connect(function() -- Remove segway when tool is unequipped
	if NewDisplayGui and NewColorGui then
		NewDisplayGui:Destroy()
		NewColorGui:Destroy()
	end
	
	if SpawnedSegway.Value then
		RemoveSegway()
	end
end)

Tool.Activated:connect(function()
	if HasSpawnedSegway.Value == false and IsCoolingDown == false then -- So workspace won't be spammed with segways
	IsCoolingDown = true
	HasSpawnedSegway.Value = true
	
	-- Hide the tool player is holding
	ConfigTool:FireServer(1,Tool,false,nil)
	
	-- Spawn segway
	SpawnSegway:FireServer(Character,Tool,SpawnedSegway,StarterColor.Value) -- Fire remote event to spawn
	
	-- Prevent spamming of segways which may lag the server
	wait(ToolCoolDown)
	IsCoolingDown = false
	end
end)

Humanoid.Died:connect(function()
	RemoveSegway()
end)