Roblox/luau_corpus huggingface dataset:
--Editable--
local ID = 10862419793  --Your animation ID!--
local RunningSpeed = 25 --Running speed--
local NormalSpeed = 16  --Normal speed/walkspeed--
local FieldOfView = 100  --Field of view when running--
local key = "LeftShift"  --Sprint/Run key--
-- Contructors

function ViewportWindow.new(surfaceGUI)
	local self = setmetatable({}, ViewportWindow)
	
	self.SurfaceGUI = surfaceGUI
	self.Camera = Instance.new("Camera", surfaceGUI)
	self.ViewportFrame = VPF:Clone()
	self.ViewportFrame.Name = "WorldFrame"
	self.ViewportFrame.ZIndex = 2
	self.ViewportFrame.LightDirection = -game.Lighting:GetSunDirection()
	self.ViewportFrame.CurrentCamera = self.Camera
	self.ViewportFrame.Parent = surfaceGUI
	
	self.SkyboxFrame = VPF:Clone()
	self.SkyboxFrame.Name = "SkyboxFrame"
	self.SkyboxFrame.ZIndex = 1
	self.SkyboxFrame.Ambient = Color3.new(1, 1, 1)
	self.SkyboxFrame.LightColor = Color3.new(0, 0, 0)
	self.SkyboxFrame.CurrentCamera = self.Camera
	self.SkyboxFrame.Parent = surfaceGUI
	
	return self
end

function ViewportWindow.fromPart(part, normalId, parent)
	local surfaceGUI = Instance.new("SurfaceGui")
	surfaceGUI.Face = normalId
	surfaceGUI.CanvasSize = Vector2.new(1024, 1024)
	surfaceGUI.SizingMode = Enum.SurfaceGuiSizingMode.FixedSize
	surfaceGUI.Adornee = part
	surfaceGUI.ClipsDescendants = true
	surfaceGUI.Parent = parent
	
	return ViewportWindow.new(surfaceGUI)
end
--[[

INSTRUCTIONS

Every node has a priority value. It is the number that is displayed on the top right corner of the node. This is what is used to select which node the condition unlocks.

To select a node with a condition, you must return a number equal to the target node's priority. For example:

Let's say I had two prompt nodes both with different priorities. One has a priority of 1, and the other a priority of 2. Now let's say I wanted the condition to unlock one or the other randomly.
In that case, I would simply return math.random(1,2) inside the Module.Run() function.

Note: Condition nodes connect from the primary output to inputs.

]]

function Condition.Run()
	return 1 --Selects a node with a priority of 1
end

return Condition
-------------------true/false finders-------------------
if(vParts.Values.Light.Value == false) then
PS.Light.Text = "  Lights: Off"
end
if(vParts.Values.Light.Value == true) then
PS.Light.Text = "  Lights: On"
end
--[[Standardized Values: Don't touch unless needed]]
	
	--[WEIGHT // Cubic stud : pounds ratio]
	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
-- networking : (table) our http handler for making POST requests
-- trackingId : (string)
-- clientId : (string)
-- userId : (string)
-- eventArgs : (table) event specific arguments
local function sendReport(networking, trackingId, clientId, userId, eventArgs)
	local url = "https://www.google-analytics.com/collect"
	--local url = "https://www.google-analytics.com/debug/collect"

	-- sanitize some input
	local function exists(variableName, value)
		local wasFound = (value ~= nil)
		if not wasFound then
			warn("Google Analytics cannot send reports without a " .. variableName)
		end
		return wasFound
	end
	if not (exists("tracking ID", trackingId) and
		exists("userId", userId) and
		exists("clientId", clientId) and
		exists("event arguments", eventArgs)) then
		return
	end

	local params = {}
	for k,v in pairs(eventArgs) do
		table.insert(params, string.format("%s=%s",k,v))
	end

	-- add some required arguments
	table.insert(params, string.format("v=%d", VERSION))		-- version
	table.insert(params, string.format("tid=%s", trackingId))	-- property Id
	table.insert(params, string.format("ds=%s", PLACE_ID))		-- data source
	table.insert(params, string.format("cid=%s", clientId))		-- guid to identify this specific client
	table.insert(params, string.format("uid=%s", userId))		-- unique, anonymous user id. This should be last


	-- construct the post body data
	local paramString = table.concat(params, "&")

	-- report the event to GA
	return networking:POST(url, paramString)
end
-- When the player gets closer than WAVE_THRESHOLD, NPC will wave.
-- Will not wave again until the player goes outside of WAVE_THRESHOLD again.
local WAVE_THRESHOLD = 20 -- studs
local WAVE_DEBOUNCE_TIME = 3 -- seconds
--Jamie







debounce = true
function onTouched(hit)
	if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
		script.Parent.Refill:Play()
		hit.Parent.Saude.Kit.Parent.Kit.Aspirina.Value = hit.Parent.Saude.Kit.Parent.Kit.Aspirina.MaxValue --Painkillers
		hit.Parent.Saude.Kit.Parent.Kit.Bandagem.Value = hit.Parent.Saude.Kit.Parent.Kit.Bandagem.MaxValue --Field Dressing/Bandages
		hit.Parent.Saude.Kit.Parent.Kit.Energetico.Value = hit.Parent.Saude.Kit.Parent.Kit.Energetico.MaxValue --Energy Drink
		hit.Parent.Saude.Kit.Parent.Kit.Epinefrina.Value = hit.Parent.Saude.Kit.Parent.Kit.Epinefrina.MaxValue --Epinephrine
		hit.Parent.Saude.Kit.Parent.Kit.Morfina.Value = hit.Parent.Saude.Kit.Parent.Kit.Morfina.MaxValue --Morphine
		hit.Parent.Saude.Kit.Parent.Kit.SacoDeSangue.Value = 15 --Blood Bag
		hit.Parent.Saude.Kit.Parent.Kit.Splint.Value = hit.Parent.Saude.Kit.Parent.Kit.Splint.MaxValue --Splint (fixes injured status)
		hit.Parent.Saude.Kit.Parent.Kit.skit.Value = 20
		hit.Parent.Saude.Kit.Parent.Kit.bvm.Value = 1
		hit.Parent.Saude.Kit.Parent.Kit.etube.Value =  2
		hit.Parent.Saude.Kit.Parent.Kit.nrb.Value = 2
		hit.Parent.Saude.Kit.Parent.Kit.Tourniquet.Value =  5
		debounce = false
		print("Refill Cooling Down")
		wait(5)
        debounce = true
        print("Refill Cooldown Over")
	end
end
script.Parent.Touched:connect(onTouched)
-- ROBLOX deviation: forward declarations
local formatStackTrace, getStackTraceLines --, separateMessageFromStack
--local Sprinting =false
local L_131_ = L_107_.new(Vector3.new())
L_131_.s = 15
L_131_.d = 0.5

game:GetService("UserInputService").InputChanged:connect(function(L_254_arg1) --Get the mouse delta for the gun sway
	if L_254_arg1.UserInputType == Enum.UserInputType.MouseMovement then
		L_126_ = math.min(math.max(L_254_arg1.Delta.x, -L_128_), L_128_)
		L_127_ = math.min(math.max(L_254_arg1.Delta.y, -L_128_), L_128_)
	end
end)

L_4_.Idle:connect(function() --Reset the sway to 0 when the mouse is still
	L_126_ = 0
	L_127_ = 0
end)

local L_132_ = false
local L_133_ = CFrame.new()
local L_134_ = CFrame.new()

local L_135_ = 0
local L_136_ = CFrame.new()
local L_137_ = 0.1
local L_138_ = 2

local L_139_ = 0
local L_140_ = .2
local L_141_	= 17

local L_142_ = 0
local L_143_ = 5
local L_144_ = .3



local L_145_, L_146_ = 0, 0

local L_147_ = nil
local L_148_ = nil
local L_149_ = nil

L_3_.Humanoid.Running:connect(function(L_255_arg1)
	if L_255_arg1 > 1 then
		L_132_ = true
	else
		L_132_ = false
	end
end)
--place in StarterCharacterScripts

local human = script.Parent:WaitForChild("Humanoid") --waits for character's Humanoid
local PE = script.PE
-- Bind the placePart function to a user input (e.g. clicking the mouse button)
game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		placePart(game:GetService("Players").LocalPlayer:GetMouse())
	end
end)
--If you wish to publish the MainModule to Roblox, replace this with the asset ID of the MainModule that was published.
require(10489480421).Load(script.Parent:FindFirstChild("RomodSettings"))
--// Connections
L_100_.OnClientEvent:connect(function(L_178_arg1, L_179_arg2, L_180_arg3, L_181_arg4, L_182_arg5, L_183_arg6, L_184_arg7)
	if L_178_arg1 and not L_15_ then
		MakeFakeArms()
		
		L_41_ = L_21_:WaitForChild('MainGui'):clone()
		L_41_.Parent = L_2_.PlayerGui
		L_26_ = L_41_:WaitForChild('Others')
		L_27_ = L_26_:WaitForChild('Kill')
		L_28_ = L_41_:WaitForChild('GameGui'):WaitForChild('AmmoFrame')
		L_29_ = L_28_:WaitForChild('Ammo')
		L_30_ = L_28_:WaitForChild('AmmoBackground')
		L_31_ = L_28_:WaitForChild('MagCount')
		L_32_ = L_28_:WaitForChild('MagCountBackground')
		L_33_ = L_28_:WaitForChild('DistDisp')
		L_34_ = L_28_:WaitForChild('Title')
		L_35_ = L_28_:WaitForChild('Mode1')
		L_36_ = L_28_:WaitForChild('Mode2')
		L_37_ = L_28_:WaitForChild('Mode3')
		L_38_ = L_28_:WaitForChild('Mode4')
		L_39_ = L_28_:WaitForChild('Mode5')
		L_40_ = L_28_:WaitForChild('Stances')
		
		L_34_.Text = L_1_.Name
		UpdateAmmo()
		
		L_42_ = L_179_arg2
		L_43_ = L_180_arg3
		L_44_ = L_181_arg4
		L_45_ = L_182_arg5
		L_46_ = L_183_arg6
		L_47_ = L_184_arg7	
		L_48_ = L_58_.Bolt
		
		L_81_ = L_47_.C1
		L_82_ = L_47_.C0
		
		if L_1_:FindFirstChild('AimPart2') then
			L_53_ = L_1_:WaitForChild('AimPart2')
		end
		
		if L_1_:FindFirstChild('FirePart2') then
			L_56_ = L_1_.FirePart2
		end
		
		if L_24_.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()
			Unlean()
		end	
		
		L_87_ = 0
		L_74_ = false
		L_75_ = false
		L_76_ = false
		L_60_ = false
		L_63_ = false
		L_62_ = false
		Shooting = false
		
		L_91_ = 70
		
		RemoveArmModel()
		
		L_41_: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_99_.MouseIconEnabled = true		
		L_5_.FieldOfView = 70
		L_15_ = false
		L_99_.MouseDeltaSensitivity = L_51_
		L_4_.Icon = "http://www.roblox.com/asset?id=0"
		L_15_ = false
	end
end)
-- Repeat every 3 seconds
while wait(3) do
	-- Create a new explosion object with the 'Example' template
	local NewExplosion = Explosion.new("Example")
	
	-- Set the explosion lifetime to 3 seconds so that the sound (3.75s long) can finish playing.
	NewExplosion.Lifetime = 4
	
	-- Set the EffectFunction to the one defined above
	NewExplosion:SetEffectFunction(CustomEffectFunction)
	
	-- Set the explosion's position
	NewExplosion:SetPosition(Vector3.new(25, 5, 0))
	
	-- EffectFunction will be called after this.
	NewExplosion:SetParent(workspace)
end
--[[
Put admin names in the table above, 
make sure to add a comma if you're adding another one!
]]--
--- Exp
   Exp.Value = Exp1:GetAsync(Plr.UserId) or Exp.Value
	   Exp1:SetAsync(Plr.UserId, Exp.Value)
      Exp.Changed:connect(function()
	   Exp1:SetAsync(Plr.UserId, Exp.Value)
   end)
-- Libraries
local Libraries = Tool:WaitForChild 'Libraries'
local Signal = require(Libraries:WaitForChild 'Signal')
local Maid = require(Libraries:WaitForChild 'Maid')
--// Handling Settings		
	Firerate = 60 / 720; -- 60 = 1 Minute, 700 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!
	
	FireMode = 2; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive
-- declarations

local Figure = script.Parent
local Head = waitForChild(Figure, "Head")
local Humanoid = waitForChild(Figure, "Humanoid")
Humanoid.Health=100
---------------------------------------------------

This = script.Parent
Lift = This.Parent.Parent.Parent.Parent
Floor = Lift:WaitForChild("Floor")
Direction = Lift:WaitForChild("Direction")
Motor = Lift:WaitForChild("MotorMode")

CustomLabel = require(Lift.CustomLabel)
Characters = require(script.Characters)

CustomText = CustomLabel["CUSTOMFLOORLABEL"]

Lift:WaitForChild("Floor").Changed:connect(function(floor)
  --custom indicator code--
  ChangeFloor(tostring(floor))
end)

function ChangeFloor(SF)
	if CustomText[tonumber(SF)] then
		SF = CustomText[tonumber(SF)]
	end
	This.Floor.Text = SF
end
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


local autoscaling	= false					--Estimates top speed

local UNITS	= {								--Click on speed to change units
											--First unit is default	
	{
		units			= "MPH"				,
		scaling			= (10/12) * (60/88)	, -- 1 stud : 10 inches | ft/s to MPH
		maxSpeed		= 230				,
		spInc			= 20				, -- Increment between labelled notches
	},
	
	{
		units			= "KM/H"			,
		scaling			= (10/12) * 1.09728	, -- 1 stud : 10 inches | ft/s to KP/H
		maxSpeed		= 370				,
		spInc			= 40				, -- Increment between labelled notches
	},
	
	{
		units			= "SPS"				,
		scaling			= 1					, -- Roblox standard
		maxSpeed		= 400				,
		spInc			= 40				, -- Increment between labelled notches
	}
}
-- Decompiled with the Synapse X Luau decompiler.

return {
	Name = "var=", 
	Aliases = {}, 
	Description = "Sets a stored value.", 
	Group = "DefaultUtil", 
	Args = { {
			Type = "storedKey", 
			Name = "Key", 
			Description = "The key to set, saved in your user data store. Keys prefixed with . are not saved. Keys prefixed with $ are game-wide. Keys prefixed with $. are game-wide and non-saved."
		}, {
			Type = "string", 
			Name = "Value", 
			Description = "Value or values to set.", 
			Default = ""
		} }, 
	ClientRun = function(p1, p2)
		p1:GetStore("vars_used")[p2] = true;
	end
};
--Enable Event Outputs like "DMR Startup Sequence Activated" etc
module.Debug = true; -- n o
-- declarations
local jumpAnimTime = 0
local jumpAnimDuration = 0.3

local fallTransitionTime = 0.3
local jumpMaxLimbVelocity = 0.75
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------


function onRunning(speed)
	if speed>0.01 then
		playAnimation("walk", 0.1, Humanoid)
		pose = "Running"
	else
		playAnimation("idle", 0.1, Humanoid)
		pose = "Standing"
	end
end

function onDied()
	pose = "Dead"
end

function onJumping()
	playAnimation("jump", 0.1, Humanoid)
	jumpAnimTime = jumpAnimDuration
	pose = "Jumping"
end

function onClimbing(speed)
	playAnimation("climb", 0.1, Humanoid)
	setAnimationSpeed(speed / 12.0)
	pose = "Climbing"
end

function onGettingUp()
	pose = "GettingUp"
end

function onFreeFall()
	if (jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	end
	pose = "FreeFall"
end

function onFallingDown()
	pose = "FallingDown"
end

function onSeated()
	pose = "Seated"
end

function onPlatformStanding()
	pose = "PlatformStanding"
end

function onSwimming(speed)
	if speed>0 then
		pose = "Running"
	else
		pose = "Standing"
	end
end

function getTool()	
	for _, kid in ipairs(Figure:GetChildren()) do
		if kid.className == "Tool" then return kid end
	end
	return nil
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

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

	if (toolAnim == "Slash") then
		playToolAnimation("toolslash", 0, Humanoid)
		return
	end

	if (toolAnim == "Lunge") then
		playToolAnimation("toollunge", 0, Humanoid)
		return
	end
end

function moveSit()
	RightShoulder.MaxVelocity = 0.15
	LeftShoulder.MaxVelocity = 0.15
	RightShoulder:SetDesiredAngle(3.14 /2)
	LeftShoulder:SetDesiredAngle(-3.14 /2)
	RightHip:SetDesiredAngle(3.14 /2)
	LeftHip:SetDesiredAngle(-3.14 /2)
end

local lastTick = 0

function move(time)
	local amplitude = 1
	local frequency = 1
  	local deltaTime = time - lastTick
  	lastTick = time

	local climbFudge = 0
	local setAngles = false

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

	if (pose == "FreeFall" and jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	elseif (pose == "Seated") then
		stopAllAnimations()
		moveSit()
		return
	elseif (pose == "Running") then
		playAnimation("walk", 0.1, Humanoid)
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
if guntype == 1 then
local torso = model.Parent:FindFirstChild("Torso")
if torso ~= nil then
if weldmode == 1 then--barrel pointing upper-right
local w = Instance.new("Weld")
w.Part0 = torso
w.Parent = w.Part0
w.Part1 = handle
w.C1 = CFrame.new(distance *-1, 0.25 +y, -0.75 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation *-1), (math.pi / 2), 0)
elseif weldmode == 2 then--barrel pointing upper-left
local w = Instance.new("Weld")
w.Part0 = torso
w.Parent = w.Part0
w.Part1 = handle
w.C1 = CFrame.new(distance, 0.25 +y, -0.75 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation *-1), (math.pi / 2 ) *-1, 0)
elseif weldmode == 3 then--barrel pointing upside-right
local w = Instance.new("Weld")
w.Part0 = torso
w.Parent = w.Part0
w.Part1 = handle
w.C1 = CFrame.new(distance *-1, 0.25+y, -0.75 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation), (math.pi / 2), 0)
elseif weldmode == 4 then--barrel pointing upside-left
local w = Instance.new("Weld")
w.Part0 = torso
w.Parent = w.Part0
w.Part1 = handle
w.C1 = CFrame.new(distance, 0.25+y, -0.75 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation), (math.pi / 2 +rotation) *-1, 0)
end
end
--[[
	Retries a Promise-returning callback N times until it succeeds.
]]
function Promise.retry(callback, times, ...)
	assert(type(callback) == "function", "Parameter #1 to Promise.retry must be a function")
	assert(type(times) == "number", "Parameter #2 to Promise.retry must be a number")

	local args, length = {...}, select("#", ...)

	return Promise.resolve(callback(...)):catch(function(...)
		if times > 0 then
			return Promise.retry(callback, times - 1, unpack(args, 1, length))
		else
			return Promise.reject(...)
		end
	end)
end
-- RANK, RANK NAMES & SPECIFIC USERS
Ranks = {
	{5,	"Game Creator",		};
	{4,	"Tester",	{"",0},	};
	{3,	"Best Friends",		{"",0},	};
	{2,	"Friends",			{"",0},	};
	{1,	"VIP",			{"",0},	};
	{0,	"NonAdmin",		};
};
--Rescripted by Luckymaxer

Part = script.Parent

Debris = game:GetService("Debris")

Sounds = {
	GlassBreak = Part:WaitForChild("GlassBreak")
}

function Touched(Part)
	local PartTouched
	PartTouched = Part.Touched:connect(function(Hit)
		if not Hit or not Hit.Parent then
			return
		end
		Sounds.GlassBreak:Play()
		if PartTouched then
			PartTouched:disconnect()
		end
	end)
end

Touched(Part)

Debris:AddItem(Part, 30)
--Compares two tables, and produces a new table containing the differences
function module:MakeDeltaTable(oldTable, newTable)
    
    if (oldTable == nil) then
        return self:DeepCopy(newTable)
    end
    
    local deltaTable = {}
    local changes = 0
    for var, data in pairs(newTable) do
        if oldTable[var] == nil then
            deltaTable[var] = data
        else
            if type(newTable[var]) == "table" then
                --its a table, recurse
                local newtable, num = module:MakeDeltaTable(oldTable[var], newTable[var])
                if num > 0 then
                    changes = changes + 1
                    deltaTable[var] = newtable
                end
            else
                local a = newTable[var]
                local b = oldTable[var]
                if a ~= b then
                    changes = changes + 1
                    deltaTable[var] = a
                end
            end
        end
    end
    --Check for deletions
    for var, _ in pairs(oldTable) do
        if newTable[var] == nil then
            if deltaTable.__deletions == nil then
                deltaTable.__deletions = {}
            end
            table.insert(deltaTable.__deletions, var)
        end
    end

    return deltaTable, changes
end
--// Events
local L_108_ = L_20_:WaitForChild('Equipped')
local L_109_ = L_20_:WaitForChild('ShootEvent')
local L_110_ = L_20_:WaitForChild('DamageEvent')
local L_111_ = L_20_:WaitForChild('CreateOwner')
local L_112_ = L_20_:WaitForChild('Stance')
local L_113_ = L_20_:WaitForChild('HitEvent')
local L_114_ = L_20_:WaitForChild('KillEvent')
local L_115_ = L_20_:WaitForChild('AimEvent')
local L_116_ = L_20_:WaitForChild('ExploEvent')
local L_117_ = L_20_:WaitForChild('AttachEvent')
local L_118_ = L_20_:WaitForChild('ServerFXEvent')
local L_119_ = L_20_:WaitForChild('ChangeIDEvent')
--
if(vParts.Values.On.Value== false) then 
PS.EngineOff:TweenPosition(UDim2.new(1.70000005, 100, -1, 0),"Out","Quad",1,true)
elseif(vParts.Values.On.Value == true) then
PS.EngineOff:TweenPosition(UDim2.new(1.70000005, 100, -2, 0),"Out","Quad",1,true)
end
----- Initialize -----

if IsStudio == true then
	IsLiveCheckActive = true
	coroutine.wrap(function()
		local status, message = pcall(function()
			-- This will error if current instance has no Studio API access:
			DataStoreService:GetDataStore("____PS"):SetAsync("____PS", os.time())
		end)
		local no_internet_access = status == false and string.find(message, "ConnectFail", 1, true) ~= nil
		if no_internet_access == true then
			warn("[ProfileService]: No internet access - check your network connection")
		end
		if status == false and
			(string.find(message, "403", 1, true) ~= nil or -- Cannot write to DataStore from studio if API access is not enabled
				string.find(message, "must publish", 1, true) ~= nil or -- Game must be published to access live keys
				no_internet_access == true) then -- No internet access

			UseMockDataStore = true
			ProfileService._use_mock_data_store = true
		else
		end
		IsLiveCheckActive = false
	end)()
end
--Sphere to box collision
function collision_module.SqDistPointAABB(point, box)
	local sq_dist = 0

	--X axis check
	local v = point.X
	if v < box.min.X then
		sq_dist += (box.min.X - v) * (box.min.X - v)
	end
	if v > box.max.X then
		sq_dist += (v - box.max.X) * (v - box.max.X)
	end

	--Y axis check
	local v = point.Y
	if v < box.min.Y then
		sq_dist += (box.min.Y - v) * (box.min.Y - v)
	end
	if v > box.max.Y then
		sq_dist += (v - box.max.Y) * (v - box.max.Y)
	end

	--Z axis check
	local v = point.Z
	if v < box.min.Z then
		sq_dist += (box.min.Z - v) * (box.min.Z - v)
	end
	if v > box.max.Z then
		sq_dist += (v - box.max.Z) * (v - box.max.Z)
	end

	return sq_dist
end

function collision_module.TestSphereAABB(sphere, box)
	local sq_dist = collision_module.SqDistPointAABB(sphere.center, box)
	return sq_dist <= (sphere.radius ^ 2)
end

function collision_module.TestSphereRotatedBox(sphere, rotated_box)
	local sq_dist = collision_module.SqDistPointAABB(rotated_box.cframe:inverse() * sphere.center, {min = rotated_box.size / -2, max = rotated_box.size / 2})
	return sq_dist <= (sphere.radius ^ 2)
end

return collision_module
-- Create smoke for specified part (being destroyed)	
local function createSmoke(targetPart)
	local pos = Vector3.new(0, 0, 0)
	local size = 3
	if targetPart:IsA("Model") and targetPart.PrimaryPart then
		--local plate = targetPart:FindFirstChild("Plate", true)
		local plate = targetPart.PrimaryPart
		pos = plate.Position
		size = 1*plate.Size.X
	else
		pos = targetPart.Position
		size = 1*targetPart.Size.X
	end	
	
	local smokePart = Instance.new("Part")
	smokePart.Name = "SmokePart"
	smokePart.Transparency = 1
	smokePart.CanCollide = false
	smokePart.Anchored = true
	--smokePart.Position = getPositionRelativetoBase(smokePart, pos) + Vector3.new(0, 1, 0)
	smokePart.Position = pos + Vector3.new(0, 1, 0)
	smokePart.Size = Vector3.new(1, 1, 1)
	smokePart.Parent = mapManager.getMap()
	
	local smoke = Instance.new("Smoke")
	smoke.Parent = smokePart
	smoke.RiseVelocity = 0
	smoke.Size = size
	
	DebrisService:AddItem(smokePart, 0.75)
end
--- Window handles the command bar GUI
local Window = {
	Valid = true,
	AutoComplete = nil,
	ProcessEntry = nil,
	OnTextChanged = nil,
	Cmdr = nil,
	HistoryState = nil,
}

local Gui = Player:WaitForChild("PlayerGui"):WaitForChild("Cmdr"):WaitForChild("Frame")
local Line = Gui:WaitForChild("Line")
local Entry = Gui:WaitForChild("Entry")

Line.Parent = nil
--[[
-- << MODIFY DATA IN GAME >>

local player = game.Players.ForeverHD
local main = _G.HDAdminMain
main:GetModule("DataStore"):ChangeStat(player, "Donor", true)
	
--]]



return module