Quick actions

cmd+k|ctrl+k

Navigation

Languages

totallynotsuscake

Snippet info

Language

Lua

Visibility

public

Author

zen

Created

2024-01-06T18:12:02.574074Z

Updated

2024-01-06T18:12:02.574074Z


local character = owner.Character or owner.CharacterAdded:Wait()

local cake = Instance.new("Part")
cake.Name = "Cake"
cake.Size = Vector3.new(2.276,1.497,2.276)

local mesh = Instance.new("SpecialMesh")
mesh.MeshId = "rbxassetid://15895439107"
mesh.TextureId = "rbxassetid://15895439209"
mesh.Scale = Vector3.new(0.06,0.06,0.06)
mesh.Parent = cake

local proximityPrompt = Instance.new("ProximityPrompt")
proximityPrompt.ActionText = "Eat"
proximityPrompt.HoldDuration = 1
proximityPrompt.Parent = cake

cake.Position = character.PrimaryPart.Position + character.PrimaryPart.CFrame.LookVector * 2
cake.Parent = workspace

NS([==[

local cake = script.Parent
local proximityPrompt = cake:WaitForChild("ProximityPrompt")

proximityPrompt.Triggered:Connect(function()
	local explosion = Instance.new("Explosion")
	explosion.Parent = workspace
	explosion.BlastRadius = 10
	explosion.BlastPressure = 1000
	explosion.DestroyJointRadiusPercent = 0.9
	explosion.Position = cake.Position
	cake:Destroy()
end)

]==],cake)
INFO