local v=script.Parent local U=v.Handle local L=require(206209239)local C local I local G local y=false local n=game:GetService("\068\101\098\114\105\115")function tagHumanoid(v,U)if v then local L=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")L.Value=U L.Name="\099\114\101\097\116\111\114"L.Parent=v n:AddItem(L,1)end end function UntagHumanoid(v)for v,U in pairs(v:GetChildren())do if U:IsA("\079\098\106\101\099\116\086\097\108\117\101")and U.Name=="\099\114\101\097\116\111\114"then U:Destroy()end end end function cut(U)local I local y if U and(U.Parent and G)then if U.Parent:IsA("\065\099\099\111\117\116\114\101\109\101\110\116")then I=U.Parent.Parent:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")else I=U.Parent:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")end y=game.Players:GetPlayerFromCharacter(C)if I and(I~=G and not L.IsTeammate(L.GetPlayerFromPart(v),L.GetPlayerFromPart(I)))then UntagHumanoid(I)tagHumanoid(I,y)I:TakeDamage(27)end end end function onEquipped()C=v.Parent I=C:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")G=C:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")end v.Equipped:Connect(onEquipped)U.Touched:Connect(cut)
-- Copied from Grimgold Periastron Beta

local Tool = script.Parent
local Sword = Tool.Handle
local GLib = require(206209239)

local vCharacter
local myTorso
local myHumanoid

local equipped = false

local debris = game:GetService("Debris")

function tagHumanoid(humanoid, player)
	if humanoid then
		local creatorTag = Instance.new("ObjectValue")
		creatorTag.Value = player
		creatorTag.Name = "creator"
		creatorTag.Parent = humanoid
		debris:AddItem(creatorTag, 1)
	end
end

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

function cut(hit)
	local humanoid
	local vPlayer
	if hit and hit.Parent and myHumanoid then
		if hit.Parent:IsA("Accoutrement") then
			humanoid = hit.Parent.Parent:FindFirstChildOfClass("Humanoid")
		else
			humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
		end
		vPlayer = game.Players:GetPlayerFromCharacter(vCharacter)
		if
			humanoid
			and humanoid ~= myHumanoid
			and not GLib.IsTeammate(GLib.GetPlayerFromPart(Tool), GLib.GetPlayerFromPart(humanoid))
		then
			UntagHumanoid(humanoid)
			tagHumanoid(humanoid, vPlayer)
			humanoid:TakeDamage(27)
		end
	end
end

function onEquipped()
	vCharacter = Tool.Parent
	myTorso = vCharacter:FindFirstChild("HumanoidRootPart")
	myHumanoid = vCharacter:FindFirstChildOfClass("Humanoid")
end

Tool.Equipped:Connect(onEquipped)

Sword.Touched:Connect(cut)
