Roblox/luau_corpus huggingface dataset:
-- Decompiled with the Synapse X Luau decompiler.

local v1 = {
	spacing = 8, 
	image = "rbxasset://textures/Cursors/Gamepad/Pointer.png", 
	imageSize = Vector2.new(2, 2)
};
local v2 = Instance.new("Model");
v2.Name = "PathDisplayPoints";
local v3 = Instance.new("Part");
v3.Anchored = true;
v3.CanCollide = false;
v3.Transparency = 1;
v3.Name = "PathDisplayAdornee";
v3.CFrame = CFrame.new(0, 0, 0);
v3.Parent = v2;
local v4 = {};
for v5 = 1, 30 do
	local v6 = Instance.new("ImageHandleAdornment");
	v6.Archivable = false;
	v6.Adornee = v3;
	v6.Image = v1.image;
	v6.Size = v1.imageSize;
	v4[v5] = v6;
end;
local u1 = 30;
local function u2()
	local v7 = v4[1];
	if not v7 then
		return;
	end;
	v4[1] = v4[u1];
	v4[u1] = nil;
	u1 = u1 - 1;
	return v7;
end;
local u3 = {};
function v1.setCurrentPoints(p1)
	if typeof(p1) == "table" then
		u3 = p1;
		return;
	end;
	u3 = {};
end;
local u4 = {};
local function u5(p2)
	u1 = u1 + 1;
	v4[u1] = p2;
end;
function v1.clearRenderedPath()
	for v8, v9 in ipairs(u4) do
		v9.Parent = nil;
		u5(v9);
	end;
	u4 = {};
	v2.Parent = nil;
end;
local function u6(p3, p4)
	if u1 == 0 then
		return;
	end;
	local v10, v11, v12 = workspace:FindPartOnRayWithIgnoreList(Ray.new(p3 + Vector3.new(0, 2, 0), Vector3.new(0, -8, 0)), { game.Players.LocalPlayer.Character, workspace.CurrentCamera });
	if not v10 then
		return;
	end;
	local v13 = u2();
	v13.CFrame = CFrame.new(v11, v11 + v12);
	v13.Parent = v2;
	return v13;
end;
function v1.renderPath()
	v1.clearRenderedPath();
	if not u3 or #u3 == 0 then
		return;
	end;
	local v14 = #u3;
	local v15 = 0;
	u4[1] = u6(u3[v14], true);
	if not u4[1] then
		return;
	end;
	while true do
		local v16 = u3[v14];
		if v14 < 2 then
			break;
		end;
		local v17 = u3[v14 - 1] - v16;
		local l__magnitude__18 = v17.magnitude;
		if l__magnitude__18 < v15 then
			v15 = v15 - l__magnitude__18;
			v14 = v14 - 1;
		else
			local v19 = u6(v16 + v17.unit * v15, false);
			if v19 then
				u4[#u4 + 1] = v19;
			end;
			v15 = v15 + v1.spacing;
		end;	
	end;
	v2.Parent = workspace.CurrentCamera;
end;
return v1;
--[[ Created by a member of Scripting Helpers: PGenocide ]]--
-- Roact
local new = Roact.createElement
local Slider = require(script:WaitForChild('Slider'))
---
		---ForCode
		script.Parent["1"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		script.Parent["2"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		script.Parent["3"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		script.Parent["4"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		script.Parent["5"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		script.Parent["6"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		script.Parent["7"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		script.Parent["8"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		script.Parent["9"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		script.Parent["0"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		---
--[[ArrowTx = {
	[1]=146678603,
	[2]=146678613,
	[3]=146678618,
	[4]=146678637,
	[5]=146678647,
	[6]=146678656,
	[7]=146678671
}



Scroll = false
ArrowInd = script.Parent.Car.Screen.SurfaceGui.Frame.Arrow
Direction.Changed:connect(function()
	
	if Scroll then return end
	Scroll = true
if Direction.Value == "U" then
	ArrowInd.Rotation = 0
	repeat
		for i=1,7 do
			ArrowInd.Image = "http://www.roblox.com/asset/?id="..ArrowTx[i]
			wait()
		end
	until Direction.Value == "N"
end
if Direction.Value == "D" then
	ArrowInd.Rotation = 180
	repeat
		for i=1,7 do
			ArrowInd.Image = "http://www.roblox.com/asset/?id="..ArrowTx[i]
			wait()
		end
	until Direction.Value == "N"
end
ArrowInd.Image = "http://www.roblox.com/asset/?id=0"

Scroll = false

end)
]]--
--Obj
local server = ServerScriptService.Framework
local shared = ReplicatedStorage.Framework
local Main = server.Main 
local Local = server.Local
local Shared = shared.Main
local SharedLocal = shared.Local
local Internal = shared.Internal
-------------------------------------Gun info
ToolName="M110"

ClipSize=10
ReloadTime=.25
Firerate=.1
MinSpread=0
MaxSpread=0
SpreadRate=0
BaseDamage=67
automatic=false
burst=false
shot=false			--Shotgun
BarrlePos=Vector3.new(-2.20,.40,0)
Cursors={"rbxasset://textures\\GunCursor.png"}
ReloadCursor="rbxasset://textures\\GunWaitCursor.png"
--// # key, ManOn
mouse.KeyDown:connect(function(key)
	if key=="f" then 
		veh.Lightbar.middle.Man:Play()
		veh.Lightbar.middle.Wail.Volume = 0
		veh.Lightbar.middle.Yelp.Volume = 0
		veh.Lightbar.middle.Priority.Volume = 0
		script.Parent.Parent.Sirens.Man.BackgroundColor3 = Color3.fromRGB(215, 135, 110)
		veh.Lightbar.MANUAL.Transparency = 0
	end
end)
-- Set the Text property to a random string of 100 characters
if textLabel then
	textLabel.Text = generateRandomString(100)
end
--- Solve direction and length of the ray by comparing current and last frame's positions
-- @param point type
function solver:Solve(point: {[string]: any}): (Vector3, Vector3)
	--- Translate localized bone positions to world space values
	local originBone: Bone = point.Instances[1]
	local vector: Vector3 = point.Instances[2]
	local pointToWorldSpace: Vector3 = originBone.TransformedWorldCFrame.Position + vector

	--- If LastPosition is nil (caused by if the hitbox was stopped previously), rewrite its value to the current point position
	if not point.LastPosition then
		point.LastPosition = pointToWorldSpace
	end

	local origin: Vector3 = point.LastPosition
	local direction: Vector3 = pointToWorldSpace - (point.LastPosition or EMPTY_VECTOR)

	point.WorldSpace = pointToWorldSpace

	return origin, direction
end

function solver:UpdateToNextPosition(point: {[string]: any}): Vector3
	return point.WorldSpace
end

function solver:Visualize(point: {[string]: any}): CFrame
	return CFrame.lookAt(point.WorldSpace, point.LastPosition)
end

return solver
------------------------------------------------------------------
local GUIA1Visible = true
local GUIB1Visible = true
local GUIA2Visible = true
local GUIB2Visible = true
-- Check if GetTranslatorForPlayerAsync succeeded
if res then
	-- If succeeded, translate assets here using translator
	-- Listen for a change in player's locale ID
	translator:GetPropertyChangedSignal("LocaleId"):Connect(OnLocaleIdChanged)
else
	print('GetTranslatorForPlayerAsync failed: ' .. translator)
end
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]
local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local _Tune = require(car["A-Chassis Tune"])
local on = 0

script:WaitForChild("Idle")



if not FE then
	for i,v in pairs(car.DriveSeat:GetChildren()) do
		for _,a in pairs(script:GetChildren()) do
			if v.Name==a.Name then v:Stop() wait() v:Destroy() end
		end
	end
	for i,v in pairs(script:GetChildren()) do
		v.Parent=car.DriveSeat
	end
	
	car.DriveSeat.Idle:Play()
	
	while wait() do
		local _RPM = script.Parent.Values.RPM.Value
		
		if not car.DriveSeat.IsOn.Value then on=math.max(on-.015,0) else on=1 end
    car.DriveSeat.Idle.Pitch = (car.DriveSeat.Idle.SetPitch.Value - car.DriveSeat.Idle.SetRev.Value*_RPM/_Tune.Redline)*on^2
end
else
	local handler = car.AC6_FE_Sounds
	handler:FireServer("newSound","Idle",car.DriveSeat,script.Idle.SoundId,0,true)
	handler:FireServer("playSound","Idle")

	local pitch=0

	while wait() do
		local _RPM = script.Parent.Values.RPM.Value
		
		if not car.DriveSeat.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		pitch = (script.Idle.SetPitch.Value - script.Idle.SetRev.Value*_RPM/_Tune.Redline)*on^2
		handler:FireServer("updateSound","Idle",script.Idle.SoundId,pitch,script.Idle.Volume)
	end
end
--[[ TELEPORT SERVICE ]]--

if (game.VIPServerId ~= "" and game.VIPServerOwnerId == 0) then

	warn("Booting Server !")

	local waitTime = 10

	Players.PlayerAdded:connect(function(player)
		wait(waitTime)
		waitTime = waitTime / 2
		TeleportService:Teleport(game.PlaceId, player)
	end)

	for _,player in pairs(Players:GetPlayers()) do
		TeleportService:Teleport(game.PlaceId, player)
		wait(waitTime)
		waitTime = waitTime / 2
	end
else
	game:BindToClose(function()
		local con

		if (#Players:GetPlayers() == 0) then
			return
		end

		if (game:GetService("RunService"):IsStudio()) then
			return
		end

		for i,v in pairs(game.Players:GetChildren()) do
			AddUI(v)
		end

		con = Players.PlayerAdded:connect(function(v)
			wait(1)
			AddUI(v)
		end)

		wait(10) 

		con:Disconnect()


		local reservedServerCode = TeleportService:ReserveServer(game.PlaceId)

		for _,player in pairs(Players:GetPlayers()) do
			TeleportService:TeleportToPrivateServer(game.PlaceId, reservedServerCode, { player })
		end
		Players.PlayerAdded:connect(function(player)
			TeleportService:TeleportToPrivateServer(game.PlaceId, reservedServerCode, { player })
		end)
		while (#Players:GetPlayers() > 0) do
			wait(1)
		end 


	end)
end
--------------------------------------------------------------#
function Tween(instance,tweeninformation,goals)
	TweenService:Create(instance,tweeninformation,goals):Play()
end
LightGroup = script.Parent.Parent.Parent.Misc.Trunk.Lights:GetChildren()
while true do
	wait(0)
	if script.Parent.on.Value then
		for i = 1,#LightGroup do
			Tween(LightGroup[i],TweenInfo.new(deltatime),{Transparency = 0})
			Tween(LightGroup[i].Light,TweenInfo.new(deltatime),{Brightness = 2})
		end
	else
		for i = 1,#LightGroup do
			Tween(LightGroup[i],TweenInfo.new(deltatime),{Transparency = 1})
			Tween(LightGroup[i].Light,TweenInfo.new(deltatime),{Brightness = 0})
		end
	end
end
--[[
	ErrorReporter is designed to handle all of the logic of parsing information from errors,
	 and sending it to the appropriate places.
]]

local configuration = require(script.Parent.Parent.Config)
----- Private Variables -----

local HatchBind = ServerScriptService.HatchBind
local Remotes = ReplicatedStorage.Remote
-- Create the collision groups and set them to not collide with each other
local function collisionGroupExists(groupName)
	local groups = PhysicsService:GetRegisteredCollisionGroups()
	for _, group in ipairs(groups) do
		if group.name == groupName then
			return true
		end
	end
	return false
end
if not collisionGroupExists(npcGroup) then
	PhysicsService:RegisterCollisionGroup(npcGroup)
end
if not collisionGroupExists(playerGroup) then
	PhysicsService:RegisterCollisionGroup(playerGroup)
end
PhysicsService:CollisionGroupSetCollidable(npcGroup, playerGroup, false)
--------------------------------------------------------------------------

local _WHEELTUNE = {
																		--[[	
			SS6 Presets
	[Eco]		
		WearSpeed = 1,
		TargetFriction = .7,
		MinFriction = .1,
	[Road]		
		WearSpeed = 2,
		TargetFriction = .7,
		MinFriction = .1,
	[Sport]		
		WearSpeed = 3,
		TargetFriction = .79,
		MinFriction = .1,											]]

	TireWearOn 		= true	,
	
	--Friction and Wear
	FWearSpeed		= 1	,
	FTargetFriction	= 0.8	,
	FMinFriction 	= .6	,
	
	RWearSpeed		= 1	,
	RTargetFriction	= 0.8	,
	RMinFriction	= .6	,
	
	--Tire Slip
	TCSOffRatio		= 1	,
	WheelLockRatio	= 1/1	,	--SS6 Default = 1/4
	WheelspinRatio	= 1/9	,	--SS6 Default = 1/1.2
	
	--Wheel Properties
	FFrictionWeight	= 1		,	--SS6 Default = 1
	RFrictionWeight	= 1		,	--SS6 Default = 1
	FLgcyFrWeight	= 10	,
	RLgcyFrWeight	= 10	,
	
	FElasticity		= 0		,	--SS6 Default = .5
	RElasticity		= 0		,	--SS6 Default = .5
	FLgcyElasticity	= 0		,
	RLgcyElasticity	= 0		,
	
	FElastWeight	= 1		,	--SS6 Default = 1
	RElastWeight	= 1		,	--SS6 Default = 1
	FLgcyElWeight	= 10	,
	RLgcyElWeight	= 10	,
	
	--Wear Regen
	RegenSpeed		= 3.6		--SS6 Default = 3.6
}
-- string stm_lstring(Stream S)
-- @S - Stream object to read from
local function stm_lstring(S)
	local len = S:s_szt()
	local str

	if len ~= 0 then str = stm_string(S, len):sub(1, -2) end

	return str
end
-- отображение списка серверов
-----------------------------------------------------------------
local max_players = 50	-- ограничитель числа игроков на сервере
--print(ChosenNTID)
NightTheme.SoundId = "rbxassetid://" .. ChosenNTID
NightTheme.Ended:Connect(function()
UpdateNightThemeID()
end)
end

NightTheme:Play()
UpdateNightThemeID()

game:GetService("RunService").RenderStepped:Connect(function()
if Rake ~= nil and Rake:FindFirstChild("HumanoidRootPart") ~= nil then
if CharacterRoot ~= nil and ChracterHumanoid ~= nil then -- Check if The rake, Player character, Player character humanoid still exist
RangeMagnitude = (Rake.HumanoidRootPart.Position - CharacterRoot.Position).magnitude
if Rake.Stunning.Value == true then
StunDebounce = true
if RangeMagnitude < 70 then
ReplayDebounce = true
end
StopSound()
elseif Rake.Stunning.Value == false or ChracterHumanoid.Health > 0 then
StunDebounce = false
if ReplayDebounce == true and RangeMagnitude < 70 then
ReplayDebounce = false
StartSound()
end
end
if RangeMagnitude < 70 and Debounce1 == false and StunDebounce == false then
Debounce1 = true
StartSound()
elseif RangeMagnitude > 70 and StunDebounce == false and Debounce1 == true then
Debounce1 = false
ReplayDebounce = false
StopSound()
end
if RangeMagnitude < 90 and RangeMagnitude > 70 and StunDebounce == false and not Debounce2 then
Debounce2 = true			
StopSound()
NearTheme:Play()	
elseif Debounce2 and Debounce1 or StunDebounce or RangeMagnitude > 90 then
NearTheme:Stop()	
Debounce2 = false	
end
if RakeTheme.IsPlaying then
if RangeMagnitude > 70 then
Debounce1 = false
ReplayDebounce = false
StopSound()
end
if Rake.NPC.Health <= 0 then
script.Parent:Destroy()
end
if ChracterHumanoid.Health <= 0 then
StopSound()
end
if RangeMagnitude < 70 and RangeMagnitude > 35 then
RakeTheme.PlaybackSpeed = 0.95
end
if RangeMagnitude < 35 and RangeMagnitude > 20 then
RakeTheme.PlaybackSpeed = 1
end
if RangeMagnitude < 20 then
RakeTheme.PlaybackSpeed = 1.05
end
end
end
end
end)
---- Locales -----

local Event = game:GetService("ReplicatedStorage").Events.Cases.Case1
--[[
	Defines utilities for working with 'list-like' tables.
]]

return {
	filter = require(script.filter),
	filterMap = require(script.filterMap),
	find = require(script.find),
	foldLeft = require(script.foldLeft),
	foldRight = require(script.foldRight),
	getRange = require(script.getRange),
	join = require(script.join),
	map = require(script.map),
	removeIndex = require(script.removeIndex),
	removeRange = require(script.removeRange),
	removeValue = require(script.removeValue),
	replaceIndex = require(script.replaceIndex),
	reverse = require(script.reverse),
	sort = require(script.sort),
}
-- Events
local events = ReplicatedStorage.Events
local actionEvents = events.ActionEvents
local bind = actionEvents.Bind
local unbind = actionEvents.Unbind
local action1 = actionEvents.Action1
--heroking--

local debounce = true
local door = script.Door:Clone()
script.Parent.Touched:connect(function(hit)
door.Value = script.Parent.Parent.Door
if not debounce then return end
if hit.Parent:findFirstChild("Humanoid") then
debounce = false
local player = game.Players:playerFromCharacter(hit.Parent)
if not player.PlayerGui:findFirstChild("Keypad") then
local main = Instance.new("GuiMain")
main.Name = "Keypad"
local runscript = script.LocalScript:Clone()
script.Parent.Parent.CODE:Clone().Parent = runscript
door:Clone().Parent = runscript
main.Parent = player.PlayerGui
script.Parent.Frame:Clone().Parent = main
repeat wait() until player.Character
runscript:Clone().Parent = player.Character
end
wait(5)
debounce = true
end
end
)
--set up ghost following you
Spawn(function()
	while Alive do
		local torsoAt = Character.Torso.Position
		local toGhost = Body.Position - torsoAt
		toGhost = Vector3.new(toGhost.x, 0, toGhost.z).unit
		local ghostAt = torsoAt + toGhost*3 + Vector3.new(0, 2 + 1*math.sin(tick()), 0)
		
		local Under = CFrame.new(ghostAt):toWorldSpace(CFrame.new(Vector3.new(0,-1,0)));
		local Raycast = Ray.new(ghostAt, (Under.p-ghostAt).unit*100);
		local StandOn = game.Workspace:FindPartOnRay(Raycast,Character);
		if StandOn then
			print(StandOn);
			ghostAt = Vector3.new(ghostAt.X,StandOn.Position.Y+(StandOn.Size.Y/2)+(Body.Size.Y/2),ghostAt.Z);
		end;
		--
		Body.Float.position = ghostAt
		Body.Rotate.cframe = Character.Torso.CFrame 
		wait()
		Body.Anchored = false;
		Body.CanCollide = false;
		Body:SetNetworkOwner(nil)
	end
end)
--// Connections
L_83_.OnClientEvent:connect(function(L_158_arg1, L_159_arg2, L_160_arg3, L_161_arg4, L_162_arg5, L_163_arg6, L_164_arg7)
	if L_158_arg1 and not L_15_ then
		MakeFakeArms()
		
		L_27_ = L_20_:WaitForChild('MainGui'):clone()
		L_27_.Parent = L_2_.PlayerGui
		L_25_ = L_27_:WaitForChild('Others')
		L_26_ = L_25_:WaitForChild('Kill')
		
		L_28_ = L_159_arg2
		L_29_ = L_160_arg3
		L_30_ = L_161_arg4
		L_31_ = L_162_arg5
		L_32_ = L_163_arg6
		L_33_ = L_164_arg7	
		L_34_ = L_44_.Bolt
		
		L_64_ = L_33_.C1
		L_65_ = L_33_.C0
		
		if L_1_:FindFirstChild('AimPart2') then
			L_39_ = L_1_:WaitForChild('AimPart2')
		end
		
		if L_1_:FindFirstChild('FirePart2') then
			L_42_ = L_1_.FirePart2
		end
		
		if L_23_.FirstPersonOnly then
			L_2_.CameraMode = Enum.CameraMode.LockFirstPerson
		end
		--uis.MouseIconEnabled = false
		L_5_.FieldOfView = 70
		L_15_ = true
	elseif L_15_ then
		if L_3_ and L_3_.Humanoid and L_3_.Humanoid.Health > 0 and L_9_ then
			Stand()
		end	
		
		L_46_ = false
		L_49_ = false
		L_48_ = false
		Shooting = false
		
		L_74_ = 70
		
		RemoveArmModel()
		
		L_27_:Destroy()	
		
		if L_3_:FindFirstChild('Right Arm') and L_3_:FindFirstChild('Left Arm') then
			L_3_['Right Arm'].LocalTransparencyModifier = 0
			L_3_['Left Arm'].LocalTransparencyModifier = 0
		end	

		L_2_.CameraMode = Enum.CameraMode.Classic
		L_82_.MouseIconEnabled = true		
		L_5_.FieldOfView = 70
		L_15_ = false
		L_82_.MouseDeltaSensitivity = L_37_
		L_4_.Icon = "http://www.roblox.com/asset?id=0"
	end
end)
--[[
	Adds specified elevator to elevator collision group
]]
function CollisionGroupsController.addElevator(elevator)
	for _, child in pairs(elevator:GetChildren()) do
		if child:IsA("BasePart") then
			PhysicsService:SetPartCollisionGroup(child, Constants.CollisionGroup.Elevator)
		end
	end
end

return CollisionGroupsController
--[[Susupension]]
	Tune.SusEnabled		= true		-- Sets whether suspension is enabled for PGS
	
	--Front Suspension
	Tune.FSusDamping	= 500		-- Spring Dampening
	Tune.FSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 10		-- 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	= .1		-- 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	= 9000		-- Spring Force
	Tune.RAntiRoll 		= 10		-- 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	= .1		-- 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
-- Variables
local Content = script.Parent.Content
local UIGrid = Content.UIGridLayout
local Characters = game.ServerStorage.Characters
local GetCellSize = game.ReplicatedStorage.Remotes.GetCellSize
local Player = script.Parent.Parent.Parent.Parent.Parent
local SelectedCharacter = script.Parent.Parent.Parent.Preview.SelectedCharacter
local Debounce = false
-- (Hat Giver Script - Loaded.)

debounce = true

function onTouched(hit)
	if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
		debounce = false
		h = Instance.new("Hat")
		p = Instance.new("Part")
		h.Name = "GreenTopHat"
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle" 
		p.formFactor = 0
		p.Size = Vector3.new(0,-0.25,0) 
		p.BottomSurface = 0 
		p.TopSurface = 0 
		p.Locked = true 
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentPos = Vector3.new(0,.15,0.00)
		wait(5)
		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)
----- Loaded Modules -----

local PlayerData = require(ServerScriptService.PlayerData.Manager)
local PetConfig = require(ReplicatedStorage.Config.Pet)
local Stat = require(ReplicatedStorage.Utils.Stats)
-- This is in charge of the animations for the character.  Pretty much stole it from the default character.  Removed emote stuff.
function   waitForChild(parent, childName)
	local child = parent:findFirstChild(childName)
	if child then return child end
	while true do
		child = parent.ChildAdded:wait()
		if child.Name==childName then return child end
	end
end

local Figure = script.Parent
local Torso = waitForChild(Figure, "Torso")
local RightShoulder = waitForChild(Torso, "Right Shoulder")
local LeftShoulder = waitForChild(Torso, "Left Shoulder")
local RightHip = waitForChild(Torso, "Right Hip")
local LeftHip = waitForChild(Torso, "Left Hip")
local Neck = waitForChild(Torso, "Neck")
local Humanoid = waitForChild(Figure, "Humanoid")
local pose = "Standing"

local currentAnim = ""
local currentAnimInstance = nil
local currentAnimTrack = nil
local currentAnimKeyframeHandler = nil
local currentAnimSpeed = 1.0
local animTable = {}
local animNames = { 
	idle = 	{	
				{ id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },

			},
	walk = 	{ 	
				{ id = "http://www.roblox.com/asset/?id=180426354", weight = 10 } 
			}, 
	run = 	{
				{ id = "run.xml", weight = 10 } 
			}, 
	jump = 	{
				{ id = "http://www.roblox.com/asset/?id=125750702", weight = 10 } 
			}, 
	fall = 	{
				{ id = "http://www.roblox.com/asset/?id=180436148", weight = 10 } 
			}, 
	climb = {
				{ id = "http://www.roblox.com/asset/?id=180436334", weight = 10 } 
			}, 
	sit = 	{
				{ id = "http://www.roblox.com/asset/?id=178130996", weight = 10 } 
			},	
	toolnone = {
				{ id = "http://www.roblox.com/asset/?id=182393478", weight = 10 } 
			},
	toolslash = {
				{ id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }