local C=game:GetService("\080\108\097\121\101\114\115")local J=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local E=require(J.Shared.components)local l=require(J.Lib.Matter)local function f(J)for J,E,f in J:query(E.Roomba,E.Model)do for J,E in l.useEvent(f.model.PrimaryPart,"\084\111\117\099\104\101\100")do local l=E:FindFirstAncestorWhichIsA("\077\111\100\101\108")if not l then continue end local f=C:GetPlayerFromCharacter(l)if not f then continue end if f~=C.LocalPlayer then continue end local T=l:FindFirstChildWhichIsA("\072\117\109\097\110\111\105\100")if not T then continue end T:TakeDamage(5)end end end return f
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Components = require(ReplicatedStorage.Shared.components)
local Matter = require(ReplicatedStorage.Lib.Matter)

local function roombasHurt(world)
	for _, _, model in world:query(Components.Roomba, Components.Model) do
		for _, part in Matter.useEvent(model.model.PrimaryPart, "Touched") do
			local touchedModel = part:FindFirstAncestorWhichIsA("Model")
			if not touchedModel then
				continue
			end

			local player = Players:GetPlayerFromCharacter(touchedModel)

			if not player then
				continue
			end

			if player ~= Players.LocalPlayer then
				continue
			end

			local humanoid = touchedModel:FindFirstChildWhichIsA("Humanoid")

			if not humanoid then
				continue
			end

			humanoid:TakeDamage(5)
		end
	end
end

return roombasHurt
