local g=game:GetService("\068\101\098\114\105\115")local G=game:GetService("\080\108\097\121\101\114\115")local F=Random.new()local C=script.Parent local a=(C:WaitForChild("\079\119\110\101\114")).Value local N=C.Hit local u=a.Name local o=23 local f=10 local R local function l(G)local F=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")F.Name="\099\114\101\097\116\111\114"F.Value=a F.Parent=G g:AddItem(F,2)end local function n(g)return g and(a and(not g.Neutral and(not a.Neutral and g.TeamColor==a.TeamColor)))end local function s(g,G)local F=Instance.new("\087\101\108\100")F.Part0=g F.Part1=G local C=CFrame.new(g.Position)F.C0=g.CFrame:ToObjectSpace(C)F.C1=G.CFrame:ToObjectSpace(C)F.Parent=g end C.Touched:Connect(function(g)if not R then s(C,g)R=true N:Play()local F=g.Parent:FindFirstChildWhichIsA("\072\117\109\097\110\111\105\100")or g.Parent.Parent:FindFirstChildWhichIsA("\072\117\109\097\110\111\105\100")if F and F.Health>0 then local g=F.Parent if g then if g.Name~=u then local C=G:GetPlayerFromCharacter(g)if C and n(C)then return end l(F)F:TakeDamage(o*(g:FindFirstChild("\078\105\110\106\097\077\097\115\107\079\102\083\104\097\100\111\119\115")and 2 or 1))end end end end end)g:AddItem(C,f)
--

local ds = game:GetService("Debris")
local ps = game:GetService("Players")

local rng = Random.new()

local star = script.Parent
local starOwner = star:WaitForChild("Owner").Value
local hitSound = star.Hit

local ownerName = starOwner.Name
local dmg = 23
local lifetime = 10

local stuck


local function tagHum(hum)
	local tag = Instance.new("ObjectValue")
	tag.Name = "creator"
	tag.Value = starOwner
	tag.Parent = hum
	ds:AddItem(tag, 2)
end

local function isTeamMate(hitPlr)
	return (hitPlr and starOwner and not hitPlr.Neutral and not starOwner.Neutral and hitPlr.TeamColor == starOwner.TeamColor)
end

local function weld(obj, hit)
	local Weld = Instance.new("Weld")
	Weld.Part0 = obj
	Weld.Part1 = hit
	local HitCFrame = CFrame.new(obj.Position)
	Weld.C0 = obj.CFrame:ToObjectSpace(HitCFrame)
	Weld.C1 = hit.CFrame:ToObjectSpace(HitCFrame)
	Weld.Parent = obj
end


star.Touched:Connect(function(hit)
	if not stuck then
		weld(star, hit)
		stuck = true
		hitSound:Play()
		
		local hitHum = hit.Parent:FindFirstChildWhichIsA("Humanoid") or hit.Parent.Parent:FindFirstChildWhichIsA("Humanoid")
		if hitHum and hitHum.Health > 0 then
			local hitChr = hitHum.Parent
			if hitChr then
				if hitChr.Name ~= ownerName then
					local hitPlr = ps:GetPlayerFromCharacter(hitChr)
					if hitPlr and isTeamMate(hitPlr) then
						return
					end
					tagHum(hitHum)
					hitHum:TakeDamage(dmg * ((hitChr:FindFirstChild("NinjaMaskOfShadows") and 2) or 1))
				end
			end
		end
	end
end)

ds:AddItem(star, lifetime)
