Universal Script 📌
847 Views
308 Executions

Eating script

Universal Script 📌
ramadanopeyemi2boys
ramadanopeyemi2boys100K executions
7 months ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

Hh

View Raw
local suckPart = script.Parent
local EAT_DISTANCE = 5 -- How close they need to be to disappear
local SUCK_FORCE = 0.5 -- How fast they get pulled in

suckPart.Touched:Connect(function(hit)
	local character = hit.Parent
	local humanoid = character:FindFirstChild("Humanoid")
	local rootPart = character:FindFirstChild("HumanoidRootPart")

	-- Ensure we found a player and they aren't already being eaten
	if humanoid and rootPart and not character:FindFirstChild("BeingEaten") then
		
		-- Tag the player so they don't trigger the script multiple times
		local tag = Instance.new("BoolValue")
		tag.Name = "BeingEaten"
		tag.Parent = character

		-- 1. Disable their movement
		humanoid.WalkSpeed = 0
		humanoid.JumpPower = 0
		
		-- 2. Visual "Suck In" Effect
		-- We use a loop to shrink them and pull them toward the mouth
		task.spawn(function()
			for i = 1, 10 do
				rootPart.CFrame = rootPart.CFrame:Lerp(suckPart.CFrame, SUCK_FORCE)
				-- Optional: Shrink parts (only works if parts aren't MeshParts with fixed scales)
				for _, part in pairs(character:GetChildren()) do
					if part:IsA("BasePart") then
						part.Transparency = i / 10
						part.CanCollide = false
					end
				end
				task.wait(0.05)
			end
			
			-- 3. Finalize the "Eat"
			humanoid.Health = 0 -- Kill the player
			print(character.Name .. " was devoured!")
			


Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!