Roblox/luau_corpus huggingface dataset:
--^^^ Made by Anaminus ^^^---

function module.getSide(p,s)
	local cf = p.CFrame
	if s.x > 0 then
		return (cf*CFrame.fromAxisAngle(Vector3.new(0,-1,0),math.pi/2)).lookVector
	elseif s.x < 0 then
		return (cf*CFrame.fromAxisAngle(Vector3.new(0,1,0),math.pi/2)).lookVector
	end
	
	if s.y < 0 then
		return (cf*CFrame.fromAxisAngle(Vector3.new(-1,0,0),math.pi/2)).lookVector
	elseif s.y > 0 then
		return (cf*CFrame.fromAxisAngle(Vector3.new(1,0,0),math.pi/2)).lookVector
	end
	
	if s.z < 0 then
		return cf.lookVector
	elseif s.z > 0 then
		return -cf.lookVector
	end
end

function module.debounce(func)
	local debounce = false
	return function(...)
		if not debounce then
			debounce = true
			func(...)
			debounce = false
		end
	end
end

function module.part(p)
	local parts = {}
	local function getParts(m)
		for _,v in pairs(m:GetChildren()) do
			if v:IsA("Part") and v ~= p then
				table.insert(parts,#parts+1,v)
			elseif v:IsA("Model") then
				getParts(v)
			end
		end
	end
	getParts(game.Workspace)
	local winner = {}
	for _,q in pairs(parts) do
		local mag = (q.Position-p.Position).magnitude
		if mag < winner[1] then
			winner[1] = mag
			winner[2] = q
		end
	end
	return winner[2]
end

function module.weld(p1,p2)
	local w = Instance.new("Weld")
	w.Part0 = p1
	w.Part1 = p2
	w.C0 = p1.CFrame:inverse() * p2.CFrame
	w.Parent = p1
	return w
end

function module.gpos(part,pos,ignore,dist)
	if dist == 0 then dist = 999 end
	local r = Ray.new(part.Position,(pos-part.Position).unit*dist)
	return workspace:FindPartOnRayWithIgnoreList(r,ignore)
end

function module.volume(m)
	return m.Size.x * m.Size.y * m.Size.z
end

function module.visualizeRay(origin,pos,laser)
	laser.Size = Vector3.new(laser.Size.x,laser.Size.y,(pos - origin).magnitude)
	laser.CFrame = CFrame.new((origin + pos)/Vector3.new(2,2,2),pos)
end

function module.getModelVolume(model)
	if model == nil then return 0 end
	local mass = 0
	local function getModelMass(m)
		for i,v in pairs(m:GetChildren()) do
			if v:IsA("BasePart") then
				mass = mass + module.volume(v)
			elseif v:IsA("Model") then
				getModelMass(v)
			end
		end
	end
	getModelMass(model)
	return mass
end

return module
-- Ritter's loose bounding sphere algorithm
function CameraUtils.getLooseBoundingSphere(parts)
	local points = table.create(#parts)
	for idx, part in pairs(parts) do
		points[idx] = part.Position
	end
	
	-- pick an arbitrary starting point
	local x = points[1]

	-- get y, the point furthest from x
	local y = x
	local yDist = 0

	for _, p in ipairs(points) do
		local pDist = (p - x).Magnitude

		if pDist > yDist then
			y = p
			yDist = pDist
		end
	end

	-- get z, the point furthest from y
	local z = y
	local zDist = 0

	for _, p in ipairs(points) do
		local pDist = (p - y).Magnitude

		if pDist > zDist then
			z = p
			zDist = pDist
		end
	end

	-- use (y, z) as the initial bounding sphere
	local sc = (y + z)*0.5
	local sr = (y - z).Magnitude*0.5

	-- expand sphere to fit any outlying points
	for _, p in ipairs(points) do
		local pDist = (p - sc).Magnitude

		if pDist > sr then
			-- shift to midpoint
			sc = sc + (pDist - sr)*0.5*(p - sc).Unit

			-- expand
			sr = (pDist + sr)*0.5
		end
	end

	return sc, sr
end
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take

Cooldown = 5 -- cooldown for use of the tool again

ZoneModelName = "Math" -- name the zone model

MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
--loopanim
function module.loopanim(anim, hum, bool)
	local animationTrack = hum.Animator:LoadAnimation(animFold[anim])
	animationTrack.Looped = bool
end
---- setup emote chat hook
game:GetService("Players").LocalPlayer.Chatted:Connect(function(msg)
	local emote = ""
	if msg == "/e dance" then
		emote = dances[Rand:NextInteger(1, #dances)]
	elseif string.sub(msg, 1, 3) == "/e " then
		emote = string.sub(msg, 4)
	elseif string.sub(msg, 1, 7) == "/emote " then
		emote = string.sub(msg, 8)
	end

	if pose == "Standing" and emoteNames[emote] ~= nil then
		playAnimation(emote, 0.1, Humanoid)
	end
end)
--Show Avatar
script.Parent.ChildRemoved:connect(function(child)
if child:IsA("Weld") then
if child.Part1.Name == "HumanoidRootPart" then
player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
for i,v in pairs(child.Part1.Parent:GetChildren())do
if v:IsA("Part") then
v.Transparency=0
if v.Name=="HumanoidRootPart"then
v.Transparency=1
v.CanCollide=true
end
end
end
end
end
end)
-- Sevices
local debris = game:GetService("Debris")
local players = game:GetService("Players")
--			print("Script "..i.Name.." detected in "..getAncestry(i).." ("..i.className..")")
		end
	end
	for x = 1, #maliciousobjects do
		if i.Name == maliciousobjects[x] then
-- Feed the Humanoid this script is attached to, then remove their food and attach poisonScript
if hungryHumanoid and hungryHumanoid:IsA("Humanoid") and hungryHumanoid.Parent then
	local food = hungryHumanoid.Parent:FindFirstChild("Food")
	local eatAnimTrack = hungryHumanoid:LoadAnimation(eatAnimation)
	if eatAnimTrack then eatAnimTrack:Play() end
	
	wait(2.2) -- Nom nom nom
	if food then food:Destroy() end
end
wait(20)
script:Destroy()
--> LOCAL VARIABLES
local FlareBullet = script.Parent
local Force = FlareBullet:WaitForChild("BodyVelocity")
local FireSound = FlareBullet:WaitForChild("Fire")
local BulletVelocity = FlareBullet:WaitForChild("BulletVelocity").Value
local LookVector = FlareBullet.CFrame.lookVector
local Flames = FlareBullet:WaitForChild("Flames")
--[[
	
	CameraShakePresets.Bump
	CameraShakePresets.Explosion
	CameraShakePresets.Earthquake
	CameraShakePresets.BadTrip
	CameraShakePresets.HandheldCamera
	CameraShakePresets.Vibration
	CameraShakePresets.RoughDriving
	
--]]



local CameraShakeInstance = require(script.Parent.CameraShakeInstance)

local CameraShakePresets = {
	
	
	-- A high-magnitude, short, yet smooth shake.
	-- Should happen once.
	Bump = function()
		local c = CameraShakeInstance.new(2.5, 4, 0.1, 0.75)
		c.PositionInfluence = Vector3.new(0.15, 0.15, 0.15)
		c.RotationInfluence = Vector3.new(1, 1, 1)
		return c
	end;
	
	
	-- An intense and rough shake.
	-- Should happen once.
	Explosion = function()
		local c = CameraShakeInstance.new(3, 10, 0, 1.2)
		c.PositionInfluence = Vector3.new(0.25, 0.25, 0.25)
		c.RotationInfluence = Vector3.new(4, 1, 1)
		return c
	end;
	
	
	-- A continuous, rough shake
	-- Sustained.
	Earthquake = function()
		local c = CameraShakeInstance.new(0.6, 3.5, 2, 10)
		c.PositionInfluence = Vector3.new(0.25, 0.25, 0.25)
		c.RotationInfluence = Vector3.new(1, 1, 4)
		return c
	end;
	
	
	-- A bizarre shake with a very high magnitude and low roughness.
	-- Sustained.
	BadTrip = function()
		local c = CameraShakeInstance.new(10, 0.15, 5, 10)
		c.PositionInfluence = Vector3.new(0, 0, 0.15)
		c.RotationInfluence = Vector3.new(2, 1, 4)
		return c
	end;
	
	
	-- A subtle, slow shake.
	-- Sustained.
	HandheldCamera = function()
		local c = CameraShakeInstance.new(1, 0.25, 5, 10)
		c.PositionInfluence = Vector3.new(0, 0, 0)
		c.RotationInfluence = Vector3.new(1, 0.5, 0.5)
		return c
	end;
	
	
	-- A very rough, yet low magnitude shake.
	-- Sustained.
	Vibration = function()
		local c = CameraShakeInstance.new(0.4, 20, 2, 2)
		c.PositionInfluence = Vector3.new(0, 0.15, 0)
		c.RotationInfluence = Vector3.new(1.25, 0, 4)
		return c
	end;
	
	
	-- A slightly rough, medium magnitude shake.
	-- Sustained.
	RoughDriving = function()
		local c = CameraShakeInstance.new(1, 2, 1, 1)
		c.PositionInfluence = Vector3.new(0, 0, 0)
		c.RotationInfluence = Vector3.new(1, 1, 1)
		return c
	end;
	
	
}


return setmetatable({}, {
	__index = function(t, i)
		local f = CameraShakePresets[i]
		if (type(f) == "function") then
			return f()
		end
		error("No preset found with index \"" .. i .. "\"")
	end;
})
--]]

local RaycastHitbox = { 
	Version = "3.3",
	AttachmentName = "DmgPoint",
	DebugMode = false,
	WarningMessage = false
}
-- you can mess with these settings
local easingtime = 0.1 --0~1
local walkspeeds = {
	enabled =		  true;
	walkingspeed =		16;
	backwardsspeed =	10;
	sidewaysspeed =		15;
	diagonalspeed =		16;
	runningspeed =		25;
	runningFOV=			100;
}
-- Modules
local ModuleScripts = ReplicatedStorage.ModuleScripts
local WaypointController = require(script.WaypointController)
local GameSettings = require(ModuleScripts.GameSettings)
--// Handling Settings		
	Firerate = 60 / 80; -- 60 = 1 Minute, 700 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!
	
	FireMode = 1; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive
-- script to kill the teleport delay if they step off the teleporter (checked by taking the point distance from torso center to teleport pad center)

local teleDelay = script.Parent
if teleDelay ~= nil then
	local telePos = teleDelay.Value
	teleDelay.Value = Vector3.new(math.huge, math.huge, math.huge) -- signals that we've retrieved this value (acts as a lock: super-gross hack; a little part of me died when I coded this D': )
	local vChar = teleDelay.Parent
	if vChar ~= nil and telePos ~= nil then
		local vTorso = vChar:FindFirstChild("Torso")
		
		if vTorso ~= nil then
			while (vTorso.Position - telePos):Dot(vTorso.Position - telePos) < 25 do -- currently hard-coded to the right distance
				wait(.1)
			end
			teleDelay:remove()
		end
	end
end
-- Useful functions

local function vertShape(cf, size2, array)
	local output = {}
	for i = 1, #array do
		output[i] = cf:PointToWorldSpace(array[i] * size2)
	end
	return output
end

local function getCentroidFromSet(set)
	local sum = set[1]
	for i = 2, #set do
		sum = sum + set[2]
	end
	return sum / #set
end

local function classify(part)
	if (part.ClassName == "Part") then
		if (part.Shape == Enum.PartType.Block) then
			return "Block"
		elseif (part.Shape == Enum.PartType.Cylinder) then
			return "Cylinder"
		elseif (part.Shape == Enum.PartType.Ball) then
			return "Ball"
		end;
	elseif (part.ClassName == "WedgePart") then
		return "Wedge"
	elseif (part.ClassName == "CornerWedgePart") then
		return "CornerWedge"
	elseif (part:IsA("BasePart")) then -- mesh, CSG, truss, etc... just use block
		return "Block"
	end
end
--[[
	(Yields) Animates the camera to pan into a specific art spot on the wall.

	Target position: Center of the SurfaceSpot that we want to animate to (in studs)

	Parameters:
	- spot (Instance) - Frame of the target SurfaceSpot to animate to
]]
function CameraModule:animateToSpotAsync(spot)
	self.camera.CameraType = Enum.CameraType.Scriptable

	local adornee = self.surfaceGui.Adornee
	local face = self.surfaceGui.Face

	-- Calculate the actual position of the center of spot (in studs)
	local spotPosition = self:getSpotPosition(self.surfaceGui, spot)

	-- Make sure we're facing the surface at an offset
	local offset = adornee.CFrame:VectorToWorldSpace(Vector3.FromNormalId(face))

	local function getDistanceToSpot(fov, size, viewportSize)
		local angle = math.rad(fov / 2)
		local opp = (size / 2) / self.surfaceGui.PixelsPerStud
		local distance = opp / math.tan(angle)

		-- Move camera back based on ratio of viewport size
		distance *= (viewportSize / constants.SurfaceArtSelectorItemSize)

		return distance
	end

	local aspectRatio = self.camera.ViewportSize.X / self.camera.ViewportSize.Y
	local vertical = getDistanceToSpot(self.camera.FieldOfView, spot.AbsoluteSize.Y, self.camera.ViewportSize.Y)
	local horizontal = getDistanceToSpot(
		self.camera.FieldOfView * aspectRatio,
		spot.AbsoluteSize.X,
		self.camera.ViewportSize.X
	)
	local distance = math.max(horizontal, vertical)
	distance = math.clamp(distance, MIN_STUDS_OFFSET, MAX_STUDS_OFFSET)

	offset *= distance

	local upVector = self:_getUpVectorByFace(adornee.CFrame, face)
	local target = CFrame.lookAt(spotPosition + offset, spotPosition, upVector)

	-- Top view has a weird bug that turns things upside down
	if face == Enum.NormalId.Top then
		target *= CFrame.Angles(0, 0, math.pi)
	end

	self:_tweenCamera(target)
end
--		body.FB.BrickColor = bool and BrickColor.new("Pearl") or BrickColor.new("Black")
		body.FB.Material = bool and "Neon" or "SmoothPlastic"
		body.RB.BrickColor = bool and BrickColor.new("Really red") or BrickColor.new("Really red")
		body.RB.Material = bool and "Neon" or "SmoothPlastic"
		tk.Rb.BrickColor = bool and BrickColor.new("Really red") or BrickColor.new("Really red")
		tk.Rb.Material = bool and "Neon" or "SmoothPlastic"
		
		body.L.Light.Enabled = bool
		car.DriveSeat.Lights.Value = bool
	end
end

local b = ''

function Toggle(dir, tog)
	if dir == 'Left' then
		body.RLeft.Material = tog and "Neon" or "SmoothPlastic"
		body.RLeft.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		
		body.LeftIn.Transparency = tog and 0 or 1
		
		car.Misc.FL.Door.Ind.Material = tog and "Neon" or "SmoothPlastic"
		car.Misc.FL.Door.Ind.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		car.DriveSeat.LI.Value = tog
	elseif dir == 'Right' then
		body.RRight.Material = tog and "Neon" or "SmoothPlastic"
		body.RRight.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		
		body.RightIn.Transparency = tog and 0 or 1
		
		car.Misc.FR.Door.Ind.Material = tog and "Neon" or "SmoothPlastic"
		car.Misc.FR.Door.Ind.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		car.DriveSeat.RI.Value = tog
	elseif dir == 'Hazards' then
		body.RLeft.Material = tog and "Neon" or "SmoothPlastic"
		body.RRight.Material = tog and "Neon" or "SmoothPlastic"
		
		body.RLeft.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		body.RRight.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		
		body.LeftIn.Transparency = tog and 0 or 1
		body.RightIn.Transparency = tog and 0 or 1
		
		car.Misc.FL.Door.Ind.Material = tog and "Neon" or "SmoothPlastic"
		car.Misc.FL.Door.Ind.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		
		car.Misc.FR.Door.Ind.Material = tog and "Neon" or "SmoothPlastic"
		car.Misc.FR.Door.Ind.BrickColor = tog and BrickColor.new("Deep orange") or BrickColor.new("Pearl")
		car.DriveSeat.LI.Value = tog
		car.DriveSeat.RI.Value = tog
	end
end

function blink(typ)
	b = typ
	if blinking == true then
		blinking = false
	else
		blinking = true
		while blinking do
			Toggle(typ, true)
			script.Parent:FireClient(player, 'blink', .9, true)
			wait(1/3)
			Toggle(typ, false)
			script.Parent:FireClient(player, 'blink', 0.8, true)
			wait(1/3)
		end
		Toggle('Hazards', false)
		script.Parent:FireClient(player, 'blink', .9, false)
	end
end

script.Parent.Parent.ChildRemoved:connect(function(child)
	if child:IsA("Weld") and BlinkersEnabled then
		if blinking == true and b == 'Hazards' then
			return
		else
			blinking = false
		end
	end
end)

F.blinkers = function(dir)
	blink(dir)
end

script.Parent.OnServerEvent:connect(function(pl,Fnc,...)
	player = pl
	F[Fnc](...)
end)
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take

Cooldown = 10 -- cooldown for use of the tool again

ZoneModelName = "Spin stars and bone" -- name the zone model

MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
--//Custom Functions\\--
function TagHumanoid(humanoid, player)
	local Creator_Tag = Instance.new("ObjectValue")
	Creator_Tag.Name = "Creator"
	Creator_Tag.Value = player
	debris:AddItem(Creator_Tag, 0.3)
	Creator_Tag.Parent = humanoid
end

function UntagHumanoid(humanoid)
	for i, v in pairs(humanoid:GetChildren()) do
		if v:IsA("ObjectValue") and v.Name == "creator" then
			v:Destroy()
		end
	end
end

function TextEffects(element, floatAmount, direction, style, duration)
	element:TweenPosition(UDim2.new(0, math.random(-40, 40), 0, -floatAmount), direction, style, duration)
	wait(0.5)

	for i = 1, 60 do
		element.TextTransparency = element.TextTransparency + 1/60
		element.TextStrokeTransparency = element.TextStrokeTransparency + 1/60
		wait(1/60)
	end

	element.TextTransparency = element.TextTransparency + 1
	element.TextStrokeTransparency = element.TextStrokeTransparency + 1
	element.Parent:Destroy()
end

function DynamicText(damage, criticalPoint, humanoid)
	local bill = Instance.new("BillboardGui", humanoid.Parent.Head)
	bill.Size = UDim2.new(0, 50, 0, 100) 
	local part = Instance.new("TextLabel", bill) 
	bill.AlwaysOnTop = true
	part.TextColor3 = Color3.fromRGB(255, 0, 0)
	part.Text = damage
	part.Font = Enum.Font.SourceSans
	part.TextStrokeTransparency = 0
	part.Size = UDim2.new(1, 0, 1, 0) 
	part.Position = UDim2.new(0, 0, 0, 0) 
	part.BackgroundTransparency = 1
	bill.Adornee = bill.Parent
			
	if damage < criticalPoint then
		part.TextSize = 28
		part.TextColor3 = Color3.new(1, 0, 0)
	elseif damage >= criticalPoint then
		part.TextSize = 32
		part.TextColor3 = Color3.new(1, 1, 0)
	end 
	
	spawn(function()
		TextEffects(part, 85, Enum.EasingDirection.Out, Enum.EasingStyle.Quint, 0.75)
	end)
end

function DamageAndTagHumanoid(player, humanoid, damage)
	hit:FireClient(player)
	UntagHumanoid(handle)
	humanoid:TakeDamage(damage) TagHumanoid(humanoid, player)
end
--[[
	// Name:   Extended GroupService
	// Author: Sebastian Erik Bauer (SimplyData)
	// Date:   25/04/2019
--]]
local GroupService = {}
local RbxGroupService = game:GetService("GroupService")

local DEFAULT_ROLE = "Guest"

local function PagesToArray(Pages)
	local Array = {}
	local Length = 0

	while true do
		for _, Value in ipairs(Pages:GetCurrentPage()) do
			Length = Length + 1
			Array[Length] = Value
		end

		if Pages.IsFinished then
			break
		else
			Pages:AdvanceToNextPageAsync()
		end
	end

	return Array
end
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------

function onSwimming(speed)
	if speed > 1.00 then
		local scale = 10.0
		playAnimation("swim", 0.4, Humanoid)
		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 amplitude = 1
	local frequency = 1
  	local deltaTime = currentTime - lastTick
  	lastTick = currentTime

	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
		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()
		amplitude = 0.1
		frequency = 1
		setAngles = true
	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
-- FUNCTIONS --
return function(Character)
task.delay(5, function()
		for i, v in pairs(Character:GetDescendants()) do
			if v:IsA("MeshPart") or v:IsA("Part") or v:IsA("Decal") then
				-- Transparency Tween --
				local tweenTime = 2
				
				local ImpTween = TS:Create(v, TweenInfo.new(tweenTime, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {Transparency = 1})
				ImpTween:Play()

				task.delay(tweenTime, function()
					--print("Tween Completed - NPCDeathFX")
				end)
			end
		end
	end)	
end
--[[
	SERVER PLUGINS' NAMES MUST START WITH "Server:" OR "Server-"
	CLIENT PLUGINS' NAMES MUST START WITH "Client:" OR "Client-"

	Plugins have full access to the server/client tables and most variables.

	You can use the MakePluginEvent to use the script instead of setting up an event.
	PlayerChatted will get chats from the custom chat and nil players.
	PlayerJoined will fire after the player finishes initial loading
	CharacterAdded will also fire after the player is loaded, it does not use the CharacterAdded event.

	service.Events.PlayerChatted(function(plr, msg)
		print(msg..' from '..plr.Name..' Example Plugin')
	end)

	service.Events.PlayerAdded(function(p)
		print(p.Name..' Joined! Example Plugin')
	end)

	service.Events.CharacterAdded(function(p)
		server.RunCommand('name',plr.Name,'BobTest Example Plugin')
	end)

--]]

return function(Vargs)
	local server, service = Vargs.Server, Vargs.Service

	server.Commands.ExampleCommand = {
		Prefix = server.Settings.Prefix;	-- Prefix to use for command
		Commands = {"example"};	-- Commands
		Args = {"arg1"};	-- Command arguments
		Description = "Example command";	-- Command Description
		Hidden = true; -- Is it hidden from the command list?
		Fun = false;	-- Is it fun?
		AdminLevel = "Players";	    -- Admin level; If using settings.CustomRanks set this to the custom rank name (eg. "Baristas")
		Function = function(plr,args)    -- Function to run for command
			print("HELLO WORLD FROM AN EXAMPLE COMMAND :)")
			print("Player supplied args[1] "..tostring(args[1]))
		end
	}
end
-- ANimation
local Sound = script:WaitForChild("Haoshoku Sound")

UIS.InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.X and Debounce == 1 and Tool.Equip.Value == true and Tool.Active.Value == "None" and script.Parent.DargonOn.Value == false then
		Debounce = 2
		Track1 = plr.Character.Humanoid:LoadAnimation(script.AnimationCharge)
		Track1:Play()
		for i = 1,math.huge do
			if Debounce == 2 then
				
				plr.Character.HumanoidRootPart.CFrame = CFrame.new(plr.Character.HumanoidRootPart.Position, Mouse.Hit.p)
				plr.Character.HumanoidRootPart.Anchored = true
			else
				
				break
				end
	     wait()
	  end
	end
end)

UIS.InputEnded:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.X and Debounce == 2 and Tool.Equip.Value == true and Tool.Active.Value == "None" and script.Parent.DargonOn.Value == false then
		Debounce = 3
		plr.Character.HumanoidRootPart.Anchored = false
		local Track2 = plr.Character.Humanoid:LoadAnimation(script.AnimationRelease)
		Track2:Play()
		Track1:Stop()
		Sound:Play()
		for i = 1,10 do
			wait(0.1)
		local mousepos = Mouse.Hit
		script.RemoteEvent:FireServer(mousepos,Mouse.Hit.p)
		end
		wait(0.3)
		Track2:Stop()
		wait(.5)
		Tool.Active.Value = "None"
		wait(3)
		Debounce = 1
	end
end)
--[[Engine]]

local fFD = _Tune.FinalDrive*_Tune.FDMult
local fFDr = fFD*30/math.pi
local cGrav = workspace.Gravity*_Tune.InclineComp/32.2
local wDRatio = wDia*math.pi/60
local cfWRot = CFrame.Angles(math.pi/2,-math.pi/2,0)
local cfYRot = CFrame.Angles(0,math.pi,0)

if _Tune.Aspiration == "Single" or _Tune.Aspiration == "Super" then
	_TCount = 1
	_TPsi = _Tune.Boost
elseif _Tune.Aspiration == "Double" then
	_TCount = 2
	_TPsi = _Tune.Boost*2
end