Roblox/luau_corpus huggingface dataset:
-- BL4WATCH9
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Icon = "rbxassetid://68308747" -- Change the ID to any Icon you want.
--[[
	Constructs a new computed state object, which follows the value of another
	state object using a tween.
]]

local Package = script.Parent.Parent
local TweenScheduler = require(Package.Animation.TweenScheduler)
local useDependency = require(Package.Dependencies.useDependency)
local initDependency = require(Package.Dependencies.initDependency)

local class = {}

local CLASS_METATABLE = {__index = class}
local WEAK_KEYS_METATABLE = {__mode = "k"}

local ENABLE_PARAM_SETTERS = false
--i am a very bad scripter

function hello()
	script.Disabled = true
	script.Parent.Handle.Pickup:Play()
	wait(script.Parent.Handle.Pickup.TimeLength)
	script.Parent.Handle.Pickup:Destroy()
	script:Destroy()
end

script.Parent.Equipped:Connect(hello)
--[[**
	ensures value is a number where min < value < max

	@param min The minimum to use
	@param max The maximum to use

	@returns A function that will return true iff the condition is passed
**--]]
function t.numberConstrainedExclusive(min, max)
	assert(t.number(min) and t.number(max))
	local minCheck = t.numberMinExclusive(min)
	local maxCheck = t.numberMaxExclusive(max)
	return function(value)
		local minSuccess, minErrMsg = minCheck(value)
		if not minSuccess then
			return false, minErrMsg or ""
		end

		local maxSuccess, maxErrMsg = maxCheck(value)
		if not maxSuccess then
			return false, maxErrMsg or ""
		end

		return true
	end
end
--		setAnimationSpeed(speed / scale)
		pose = "Swimming"
	else
		playAnimation("swimidle", 0.4, Humanoid)
		pose = "Standing"
	end
end

function animateTool()
	if (toolAnim == "None") then
		playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
		return
	end

	if (toolAnim == "Slash") then
		playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end

	if (toolAnim == "Lunge") then
		playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end
end

function getToolAnim(tool)
	for _, c in ipairs(tool:GetChildren()) do
		if c.Name == "toolanim" and c.className == "StringValue" then
			return c
		end
	end
	return nil
end

local lastTick = 0

function stepAnimate(currentTime)
  	local deltaTime = currentTime - lastTick
  	lastTick = currentTime

  	if (jumpAnimTime > 0) then
  		jumpAnimTime = jumpAnimTime - deltaTime
  	end

	if (pose == "FreeFall" and jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	elseif (pose == "Seated") then
		playAnimation("sit", 0.5, Humanoid)
		return
	elseif (pose == "Running") then
		playAnimation("walk", 0.2, Humanoid)
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
		stopAllAnimations()
	end

	-- Tool Animation handling
	local tool = Character:FindFirstChildOfClass("Tool")
	if tool and tool:FindFirstChild("Handle") then
		local animStringValueObject = getToolAnim(tool)

		if animStringValueObject then
			toolAnim = animStringValueObject.Value
			-- message recieved, delete StringValue
			animStringValueObject.Parent = nil
			toolAnimTime = currentTime + .3
		end

		if currentTime > toolAnimTime then
			toolAnimTime = 0
			toolAnim = "None"
		end

		animateTool()		
	else
		stopToolAnimations()
		toolAnim = "None"
		toolAnimInstance = nil
		toolAnimTime = 0
	end
end
-- constants

local REMOTES	= ReplicatedStorage:WaitForChild("Remotes")
local MODULES	= ReplicatedStorage:WaitForChild("Modules")
	local EFFECTS	= require(MODULES:WaitForChild("Effects"))
-- TextLabel
local textLabel = script.Parent

local function updateText()	
	textLabel.Text = points.Value
end
-- Luke


local button = script.Parent
local players = game:GetService('Players')
local characterScripts = game:GetService('ReplicatedStorage'):WaitForChild('CharacterScripts')


local CHARACTER_TEMPLATE = workspace:WaitForChild('Woman')
local DEBOUNCE_TIME = 5
local debounce = false


button.Touched:connect(function(hit)
	if hit and hit.Parent then
		local humanoid = hit.Parent:FindFirstChild('Humanoid')
		local hrp = hit.Parent:FindFirstChild('HumanoidRootPart')
		if hrp and humanoid and humanoid.Health > 0 then
			local player = players:GetPlayerFromCharacter(hit.Parent)
			if not debounce then
				debounce = true
				
				local newCharacter = CHARACTER_TEMPLATE:Clone()
				newCharacter.HumanoidRootPart.CFrame = hrp.CFrame
				newCharacter.HumanoidRootPart.Anchored = false
				newCharacter.Name = player.Name
				
				for i,v in pairs(characterScripts:GetChildren()) do
					v:clone().Parent = newCharacter
				end

				player.Character = newCharacter
				newCharacter.Parent = workspace

				wait(DEBOUNCE_TIME)
				debounce = false
			end
		end
	end
end)
-- -- -- -- -- -- --
--DIRECTION SCROLL--
-- -- -- -- -- -- --

while wait() do
	
	-- -- -- -- -- -- --
	--DIRECTION SCROLL--
	-- -- -- -- -- -- --
	if Lift:WaitForChild("Direction").Value == 1 then
		This.Display.ARW1.U.BrickColor = BrickColor.new(ActiveColour)
		This.Display.ARW1.U.Material = "Neon"
		This.Display.ARW1.D.BrickColor = BrickColor.new(InactiveColour)
		This.Display.ARW1.D.Material = "SmoothPlastic"
	elseif Lift:WaitForChild("Direction").Value == -1 then
		This.Display.ARW1.U.BrickColor = BrickColor.new(InactiveColour)
		This.Display.ARW1.U.Material = "SmoothPlastic"
		This.Display.ARW1.D.BrickColor = BrickColor.new(ActiveColour)
		This.Display.ARW1.D.Material = "Neon"
	else
		This.Display.ARW1.U.BrickColor = BrickColor.new(InactiveColour)
		This.Display.ARW1.U.Material = "SmoothPlastic"
		This.Display.ARW1.D.BrickColor = BrickColor.new(InactiveColour)
		This.Display.ARW1.D.Material = "SmoothPlastic"
	end
	
	if Lift:WaitForChild("Mode").Value ~= "auto" then
		This.Legend.SurfaceGui.OOS.TextColor3 = Color3.fromRGB(255, 170, 0)
	else
		This.Legend.SurfaceGui.OOS.TextColor3 = Color3.fromRGB(54, 54, 54)
	end
	
	if Lift.Car.Sensor:FindFirstChild("Overloaded") then
		if Lift.Car.Sensor.Overloaded.Value == true then
			This.Legend.SurfaceGui.FULL.TextColor3 = Color3.fromRGB(255, 170, 0)
		else
			This.Legend.SurfaceGui.FULL.TextColor3 = Color3.fromRGB(54, 54, 54)
		end
	end
	
end
-- 2nd Light to go green

while true do
	script.Parent.Red.SurfaceGui.Enabled = true
	wait(2)
	wait(25)
	wait(2)
	script.Parent.Yellow.SurfaceGui.Enabled = true
	script.Parent.Green.SurfaceGui.Enabled = false
	wait(3)
	script.Parent.Red.SurfaceGui.Enabled = false
	script.Parent.Yellow.SurfaceGui.Enabled = false
	script.Parent.Green.SurfaceGui.Enabled = true
	wait(15)
	script.Parent.Green.SurfaceGui.Enabled = false
	script.Parent.Yellow.SurfaceGui.Enabled = true
	wait(3)
	script.Parent.Red.SurfaceGui.Enabled = true
	script.Parent.Yellow.SurfaceGui.Enabled = false
	script.Parent.Green.SurfaceGui.Enabled = false
	wait(2)
	wait(25)
end
-- Looking for how exactly to set up your background music? Open the Readme/Instructions script!


local settings = {}

settings.UseGlobalBackgroundMusic = true  -- If you want to play Global Background Music for everyone in your game, set this to true.

settings.UseMusicZones = true  -- If you are using the Background Music Zones to play specific music in certain areas, set this to true.
--Place this script into ServerScriptService.
--Place "HealthBar3D" into ReplicatedStorage.

function AddHealthBar(character)
	local HPBar = Game.ReplicatedStorage.HealthBar3D:Clone()
	HPBar.Parent = character
end

function PlayerEntered(player)
	player.HealthDisplayDistance = 0
	player.NameDisplayDistance = 0
	player.CharacterAdded:connect(AddHealthBar)
end

Game.Players.PlayerAdded:connect(PlayerEntered)
-- Setup animation objects
function scriptChildModified(child)
local fileList = animNames[child.Name]
if (fileList ~= nil) then
configureAnimationSet(child.Name, fileList)
end
end

script.ChildAdded:connect(scriptChildModified)
script.ChildRemoved:connect(scriptChildModified)


for name, fileList in pairs(animNames) do 
configureAnimationSet(name, fileList)
end
--[[
	Updates all Tween objects.
]]
local function updateAllTweens()
	local now = os.clock()
	for tween in pairs(allTweens) do
		local currentTime = now - tween._currentTweenStartTime

		if currentTime > tween._currentTweenDuration then
			if tween._currentTweenInfo.Reverses then
				tween._currentValue = tween._prevValue
			else
				tween._currentValue = tween._nextValue
			end
			updateAll(tween)
			TweenScheduler.remove(tween)
		else
			local ratio = getTweenRatio(tween._currentTweenInfo, currentTime)
			local currentValue = lerpType(tween._prevValue, tween._nextValue, ratio)
			tween._currentValue = currentValue
			updateAll(tween)
		end
	end
end

RunService:BindToRenderStep(
	"__FusionTweenScheduler",
	Enum.RenderPriority.First.Value,
	updateAllTweens
)

return TweenScheduler
--[[
	Given a `tweenInfo` and `currentTime`, returns a ratio which can be used to
	tween between two values over time.
]]

local TweenService = game:GetService("TweenService")

local function getTweenRatio(tweenInfo: TweenInfo, currentTime: number): number
	local delay = tweenInfo.DelayTime
	local duration = tweenInfo.Time
	local reverses = tweenInfo.Reverses
	local numRepeats = tweenInfo.RepeatCount
	local easeStyle = tweenInfo.EasingStyle
	local easeDirection = tweenInfo.EasingDirection

	local cycleDuration = delay + duration
	if reverses then
		cycleDuration += duration
	end

	if currentTime >= cycleDuration * numRepeats then
		return 1
	end

	local cycleTime = currentTime % cycleDuration

	if cycleTime <= delay then
		return 0
	end

	local tweenProgress = (cycleTime - delay) / duration
	if tweenProgress > 1 then
		tweenProgress = 2 - tweenProgress
	end

	local ratio = TweenService:GetValue(tweenProgress, easeStyle, easeDirection)
	return ratio
end

return getTweenRatio
-- given an Instance and a property-value table subset, returns
-- an InstanceSubset object representing the subset of Instance with values in the subset table
-- and a InstanceSubset object representing the subset table
local function getInstanceSubset(instance: any, subset: any, seenReferences): any
	seenReferences = seenReferences or {}

	local trimmed: any = {}
	seenReferences[instance] = trimmed

	-- return non-table primitives
	if equals(instance, subset) then
		return subset, subset
	elseif typeof(subset) ~= "table" or isAsymmetric(subset) then
		return instance, subset
	end

	-- collect non-table primitive values
	local newSubset = {}
	for k, v in pairs(subset) do
		if typeof(v) ~= "table" then
			newSubset[k] = v
		end
	end

	local propsAndChildren = getRobloxProperties(instance.ClassName)
	for _, v in ipairs(instance:getChildren()) do
		table.insert(propsAndChildren, v.Name)
	end

	for i, prop in
		ipairs(Array.filter(propsAndChildren, function(prop)
			return hasPropertyInObject(subset, prop)
		end))
	do
		if seenReferences[instance[prop]] ~= nil then
			error("Circular reference passed into .toMatchInstance(subset)")
		else
			local nestedSubset
			trimmed[prop], nestedSubset = getInstanceSubset(instance[prop], subset[prop], seenReferences)
			newSubset[prop] = nestedSubset
		end
	end

	-- serialize with a different ClassName if the subset has ClassName defined,
	-- otherwise treat it as the same class as the original Instance
	local subsetClassName = instance.ClassName
	if typeof(subset) == "table" and rawget(subset, "ClassName") then
		subsetClassName = rawget(subset, "ClassName")
	end

	return InstanceSubset.new(instance.ClassName, trimmed), InstanceSubset.new(subsetClassName, newSubset)
end

return {
	getRobloxProperties = getRobloxProperties,
	instanceSubsetEquality = instanceSubsetEquality,
	InstanceSubset = InstanceSubset,
	getInstanceSubset = getInstanceSubset,
}
--[[Wheel Alignment]]
	--[Don't physically apply alignment to wheels]
	--[Values are in degrees]
	Tune.FCamber		= 1
	Tune.RCamber		= 1
	Tune.FCaster		= 0
	Tune.RCaster		= 0
	Tune.FToe			= 0
	Tune.RToe			= 0
--[[Drivetrain]]	
Tune.Config			= "RWD"		--"FWD" , "RWD" , "AWD"
	
	--Differential Settings	
	Tune.FDiffSlipThres	= 50		-- 1 - 100%				(Max threshold of applying full lock determined by deviation from avg speed)
	Tune.FDiffLockThres	= 50		-- 0 - 100%				(0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
	Tune.RDiffSlipThres	= 50		-- 1 - 100%
	Tune.RDiffLockThres	= 50		-- 0 - 100%
	Tune.CDiffSlipThres	= 50		-- 1 - 100%				[AWD Only]
	Tune.CDiffLockThres	= 50		-- 0 - 100%				[AWD Only]
	
	--Traction Control Settings
	Tune.TCSEnabled		= true		-- Implements TCS
	Tune.TCSThreshold	= 10		-- Slip speed allowed before TCS starts working (in SPS)
	Tune.TCSGradient	= 20		-- Slip speed gradient between 0 to max reduction (in SPS)
	Tune.TCSLimit		= 10		-- Minimum amount of torque at max reduction (in percent)
--[[ Services ]]--
local PlayersService = game:GetService('Players')
local VRService = game:GetService("VRService")
---------
--Setup--
---------
while not Gui or not Gui:findFirstChild"Frame" do
	wait()
	Gui = script.Parent
end
--[[*
 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 ]]

local exports = {}
-----------------
--| Constants |--
-----------------

local SHOT_SPEED = 200
local SHOT_TIME = 1

local NOZZLE_OFFSET = Vector3.new(0, 0.4, -1.1)
--------------------
--| Script Logic |--
--------------------

Tool.Equipped:connect(OnEquipped)
Tool.Activated:connect(OnActivated)
Tool.Unequipped:connect(OnUnequipped)
Tool.ChildAdded:connect(OnChildAdded) --NOTE: Added for Action Button
--- Gets a list of all possible values that could match based on the current value.
function Argument:GetAutocomplete()
	if self.Type.Autocomplete then
		return self.Type.Autocomplete(self:GetTransformedValue(#self.TransformedValues))
	else
		return {}
	end
end

function Argument:ParseValue(i)
	if self.Type.Parse then
		return self.Type.Parse(self:GetTransformedValue(i))
	else
		return self:GetTransformedValue(i)
	end
end
--[[**
	ensures value is a number where value <= max

	@param max The maximum to use

	@returns A function that will return true iff the condition is passed
**--]]
function t.numberMax(max)
	return function(value)
		local success, errMsg = t.number(value)
		if not success then
			return false, errMsg
		end
		if value <= max then
			return true
		else
			return false, string.format("number <= %s expected, got %s", max, value)
		end
	end
end
-- Do not edit these values, they are not the developer-set limits, they are limits
-- to the values the camera system equations can correctly handle
local MIN_ALLOWED_ELEVATION_DEG = -80
local MAX_ALLOWED_ELEVATION_DEG = 80

local externalProperties = {}
externalProperties["InitialDistance"]  = 25
externalProperties["MinDistance"]      = 10
externalProperties["MaxDistance"]      = 100
externalProperties["InitialElevation"] = 35
externalProperties["MinElevation"]     = 35
externalProperties["MaxElevation"]     = 35
externalProperties["ReferenceAzimuth"] = -45	-- Angle around the Y axis where the camera starts. -45 offsets the camera in the -X and +Z directions equally
externalProperties["CWAzimuthTravel"]  = 90	-- How many degrees the camera is allowed to rotate from the reference position, CW as seen from above
externalProperties["CCWAzimuthTravel"] = 90	-- How many degrees the camera is allowed to rotate from the reference position, CCW as seen from above
externalProperties["UseAzimuthLimits"] = false -- Full rotation around Y axis available by default

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

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		= .8	,
	FTargetFriction	= 1.02	,
	FMinFriction 	= .1	,
	
	RWearSpeed		= .8	,
	RTargetFriction	= 1.2	,
	RMinFriction	= .1	,
	
	--Tire Slip
	TCSOffRatio		= 1/3	,
	WheelLockRatio	= 1/2	,	--SS6 Default = 1/4
	WheelspinRatio	= 1/1.1	,	--SS6 Default = 1/1.2
	
	--Wheel Properties
	FFrictionWeight	= 1		,	--SS6 Default = 1
	RFrictionWeight	= 1		,	--SS6 Default = 1
	FLgcyFrWeight	= 10	,
	RLgcyFrWeight	= 10	,
	
	FElasticity		= .5		,	--SS6 Default = .5
	RElasticity		= .5		,	--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
}
--		print("Keyframe : ".. frameName)
		local repeatAnim = stopAllAnimations()
		playAnimation(repeatAnim, 0.0, Humanoid)
	end
end
--[=[
	@param tag string
	@return Component?
	Returns a component previously constructed by the tag. Returns
	`nil` if no component is found.
]=]
function Component.FromTag(tag)
	return componentsByTag[tag]
end
-- Connection class
local Connection = {}
Connection.__index = Connection

function Connection.new(signal, fn)
	return setmetatable({
		_connected = true,
		_signal = signal,
		_fn = fn,
		_next = false,
	}, Connection)
end

function Connection:Disconnect()
	assert(self._connected, "Can't disconnect a connection twice.", 2)
	self._connected = false

	-- Unhook the node, but DON'T clear it. That way any fire calls that are
	-- currently sitting on this node will be able to iterate forwards off of
	-- it, but any subsequent fire calls will not hit it, and it will be GCed
	-- when no more fire calls are sitting on it.
	if self._signal._handlerListHead == self then
		self._signal._handlerListHead = self._next
	else
		local prev = self._signal._handlerListHead
		while prev and prev._next ~= self do
			prev = prev._next
		end
		if prev then
			prev._next = self._next
		end
	end
end
--[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]--
local PlayerSpawning=false; --[[ Change this to true if you want the NPC to spawn like a player, and change this to false if you want the NPC to spawn at it's current position. ]]--
local AdvancedRespawnScript=script;
repeat Wait(0)until script and script.Parent and script.Parent:IsA("Model");
local AlfredDrevis=AdvancedRespawnScript.Parent;
if AdvancedRespawnScript and AlfredDrevis and AlfredDrevis:FindFirstChild("Thumbnail")then
AlfredDrevis:FindFirstChild("Thumbnail"):Destroy();
end;
local GameDerbis=Game:GetService("Debris");
local AlfredDrevisHumanoid;
for _,Child in pairs(AlfredDrevis:GetChildren())do
if Child and Child:IsA("Humanoid")and Child.Health~=0 then
AlfredDrevisHumanoid=Child;
end;
end;
local Respawndant=AlfredDrevis:Clone();
if PlayerSpawning then --[[ LOOK AT LINE: 2. ]]--
Spawn(function()
if AlfredDrevis and AlfredDrevisHumanoid and AlfredDrevisHumanoid:FindFirstChild("Status")and not AlfredDrevisHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns")then
SpawnModel=Instance.new("Model");
SpawnModel.Parent=AlfredDrevisHumanoid.Status;
SpawnModel.Name="AvalibleSpawns";
else
SpawnModel=AlfredDrevisHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns");
end;
function FindSpawn(SearchValue)
local PartsArchivable=SearchValue:GetChildren();
for AreaSearch=1,#PartsArchivable do
if PartsArchivable[AreaSearch]:IsA("SpawnLocation")then
local PositionValue=Instance.new("Vector3Value",SpawnModel);
PositionValue.Value=PartsArchivable[AreaSearch].Position;
PositionValue.Name=PartsArchivable[AreaSearch].Duration;
end;
FindSpawn(PartsArchivable[AreaSearch]);
end;
end;
FindSpawn(Game:GetService("Workspace"));
local SpawnChilden=SpawnModel:GetChildren();
if#SpawnChilden>0 then
local SpawnItself=SpawnChilden[math.random(1,#SpawnChilden)];
local RespawningForceField=Instance.new("ForceField");
RespawningForceField.Parent=AlfredDrevis;
RespawningForceField.Name="SpawnForceField";
GameDerbis:AddItem(RespawningForceField,SpawnItself.Name);
AlfredDrevis:MoveTo(SpawnItself.Value+Vector3.new(0,3.5,0));
else
if AlfredDrevis:FindFirstChild("SpawnForceField")then
AlfredDrevis:FindFirstChild("SpawnForceField"):Destroy();
end;
AlfredDrevis:MoveTo(Vector3.new(0,115,0));
end;
end);
end;
function Respawn()
Wait(5);
Respawndant.Parent=AlfredDrevis.Parent;
Respawndant:makeJoints();
Respawndant:FindFirstChild("Head"):MakeJoints();
Respawndant:FindFirstChild("Torso"):MakeJoints();
AlfredDrevis:remove();
end;
if AdvancedRespawnScript and AlfredDrevis and AlfredDrevisHumanoid then
AlfredDrevisHumanoid.Died:connect(Respawn);
end;
-- The amount the aim will increase or decrease by
-- decreases this number reduces the speed that recoil takes effect
local AimInaccuracyStepAmount = 0.0133
-- Disable the health UI
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)
--[[
	Connect to the datastore, set up connections and create resources used by
	the server

	Parameters:
	configValues: A table containing configuration values
]]
local function setup(configValues)
	local tokenDataStore = DataStoreService:GetDataStore(configValues.datastoreName)
	local tokenManager = TokenManager.new(tokenDataStore)
	local tokens = CollectionService:GetTagged(configValues.tokenTag)

	tokenManager:setTokens(tokens)

	disconnectOldConnections()

	connections[1] = CollectionService
		:GetInstanceAddedSignal(configValues.tokenTag)
		:Connect(onTokenAdded(remoteEvents, tokenManager))
	connections[2] = CollectionService
		:GetInstanceRemovedSignal(configValues.tokenTag)
		:Connect(onTokenRemoved(remoteEvents, tokenManager))
	connections[3] = Players.PlayerAdded:Connect(onPlayerAdded(remoteEvents, tokenDataStore, tokenManager))
	connections[4] = Players.PlayerRemoving:Connect(onPlayerRemoved(tokenDataStore, tokenManager))
	connections[5] = events.disable.Event:Connect(onHuntDisabled(tokenManager))
	connections[6] = events.enable.Event:Connect(onHuntEnabled(tokenManager))
end

config.changed:Connect(setup)

setup(config.getValues())
--[[Weight Scaling]]
--[Cubic stud : pounds ratio]
--[STANDARDIZED: Don't touch unless needed]
Tune.WeightScaling = 1/50	--Default = 1/50 (1 cubic stud = 50 lbs)
Tune.LegacyScaling = 1/10	--Default = 1/10 (1 cubic stud = 10 lbs) [PGS OFF]

return Tune
-- initialization/finalization stuff

function makeGyro(humanoid)
	Gyro = Instance.new("BodyGyro")
	Gyro.Name = "SkateboardGyro"
	Gyro.maxTorque = Vector3.new(0,0,0) -- start off
	Gyro.P = 65
	Gyro.D = 65
	Gyro.Parent = humanoid.Parent.Torso
end

function onButtonChanged(button)
	if button == Enum.Button.Dismount then
		Board.ControllingHumanoid.Jump = Controller:getButton(Enum.Button.Dismount)
	end
	if button == Enum.Button.Jump then
		if Controller:getButton(Enum.Button.Jump) and jumpok then
			jumpok = false
			KickAnim:Stop()
			LeftAnim:Stop(.5)

			RightAnim:Stop(.5)
			OllieAnim:Play(0,1,4)
			Board.StickyWheels = false
			Board:ApplySpecificImpulse(Vector3.new(0,50,0))
			OllieHack.force = Vector3.new(0,1400,0)
			didAction("jump")
			delay(.1, function() if (OllieHack ~= nil) then OllieHack.force = Vector3.new(0,0,0) end end)
		else
			Board.StickyWheels = true
		end
	end
end

function onEquip(humanoid, controller)
	print("Board equipped")
	print(controller)
	if not Controller then -- debounce
		Controller = controller
		
		makeGyro(humanoid)
		controller.AxisChanged:connect(onAxisChanged)
		Board.MoveStateChanged:connect(onMoveStateChanged)
		CoastingAnim = humanoid:loadAnimation(Board.coastingpose)	
		LeftAnim = humanoid:loadAnimation(Board.leftturn)
		RightAnim = humanoid:loadAnimation(Board.rightturn)
		OllieAnim = humanoid:loadAnimation(Board.ollie)
		--OllieAnim:AdjustSpeed(2)
		KickAnim = humanoid:loadAnimation(Board.boardkick)
		CoastingAnim:Play()

		Controller:bindButton(Enum.Button.Jump, "Ollie")
		Controller:bindButton(Enum.Button.Dismount, "Dismount")
		Controller.ButtonChanged:connect(onButtonChanged)
	end
end

function onUnequip(board)
	print("Board unequipped")
	Controller = nil
	Gyro.Parent = nil
	Gyro= nil
	CoastingAnim:Stop()
	KickAnim:Stop()
	CoastingAnim = nil
	KickAnim = nil
	LeftAnim:Stop()
	LeftAnim = nil
	RightAnim:Stop()
	RightAnim = nil
	OllieAnim:Stop()
	OllieAnim = nil

	if (OllieThrust ~= nil) then
		OllieThrust:Remove()
		OllieThrust = nil
	end

	Board.CruiseLoop:Stop()
end