local Players = game:GetService("Players") local Player = Players.LocalPlayer local Backpack = Player:WaitForChild("Backpack") local Plushies = { { Name = "Ambush Plush", Mesh = "rbxassetid://135163934318128", Texture = "rbxassetid://77023829602836", Size = Vector3.new(0.637, 0.6, 0.5), Sound = "rbxassetid://119086988722761", ExtraSound = "rbxassetid://0", Rotation = Vector3.new(90, 0, 0), Offset = Vector3.new(0, 0, 0), }, { Name = "Rush Plush", Mesh = "rbxassetid://11966564502", Texture = "rbxassetid://11966583831", Size = Vector3.new(1.438, 1.95, 1.475), Sound = "rbxassetid://119086988722761", ExtraSound = "rbxassetid://0", Rotation = Vector3.new(90, 0, 0), Offset = Vector3.new(0, 0, 0), } } local NormalGrip = { Forward = Vector3.new(-1, 0, 0), Position = Vector3.new(0, 0, -0.4), Right = Vector3.new(0, 1, 0), Up = Vector3.new(0, 0, 1) } local HugGrip = { Forward = Vector3.new(1, 0, 0), Position = Vector3.new(0.5, -1.5, -1.56), Right = Vector3.new(0, -0.707, -0.707), Up = Vector3.new(0, -0.707, 0.707) } local function ApplyGrip(Tool, Grip) Tool.GripForward = Grip.Forward Tool.GripPos = Grip.Position Tool.GripRight = Grip.Right Tool.GripUp = Grip.Up end local function CreateSound(Name, SoundId, Parent) local Sound = Instance.new("Sound") Sound.Name = Name Sound.SoundId = SoundId Sound.Volume = 1 Sound.Parent = Parent return Sound end local function CreatePlush(Data) local Prefix = Data.Name:gsub("%s+", "") local ActivatedName = Prefix .. "ActivatedConnection" local EquippedName = Prefix .. "EquippedConnection" local UnequippedName = Prefix .. "UnequippedConnection" local ConnectionNames = { ActivatedName, EquippedName, UnequippedName } for _, Name in ipairs(ConnectionNames) do if _G[Name] then _G[Name]:Disconnect() _G[Name] = nil end end local OldTool = Backpack:FindFirstChild(Data.Name) or (Player.Character and Player.Character:FindFirstChild(Data.Name)) if OldTool then OldTool:Destroy() end local Tool = Instance.new("Tool") Tool.Name = Data.Name Tool.RequiresHandle = true Tool.CanBeDropped = false Tool.TextureId = Data.Texture Tool.ToolTip = "Click to hug" local Handle = Instance.new("Part") Handle.Name = "Handle" Handle.Size = Vector3.new(0.2, 0.2, 0.2) Handle.Transparency = 1 Handle.CanCollide = false Handle.CanTouch = false Handle.CanQuery = false Handle.Massless = true Handle.Parent = Tool local Visual = Instance.new("Part") Visual.Name = "PlushVisual" Visual.Size = Vector3.new(1, 1, 1) Visual.Transparency = 0 Visual.Color = Color3.fromRGB(255, 255, 255) Visual.CanCollide = false Visual.CanTouch = false Visual.CanQuery = false Visual.Massless = true Visual.CastShadow = true Visual.Parent = Tool local Mesh = Instance.new("SpecialMesh") Mesh.Name = "PlushMesh" Mesh.MeshType = Enum.MeshType.FileMesh Mesh.MeshId = Data.Mesh Mesh.TextureId = Data.Texture Mesh.Scale = Data.Size Mesh.Offset = Vector3.zero Mesh.Parent = Visual local Weld = Instance.new("Weld") Weld.Name = "PlushWeld" Weld.Part0 = Handle Weld.Part1 = Visual Weld.C0 = CFrame.new(Data.Offset or Vector3.zero) * CFrame.Angles( math.rad(Data.Rotation.X), math.rad(Data.Rotation.Y), math.rad(Data.Rotation.Z) ) Weld.Parent = Handle Tool.Parent = Backpack ApplyGrip(Tool, NormalGrip) local Equipped = false local Hugging = false local HugSound local ExtraSound local function StopHug() Hugging = false ApplyGrip(Tool, NormalGrip) if HugSound then HugSound:Stop() HugSound:Destroy() HugSound = nil end if ExtraSound then ExtraSound:Stop() ExtraSound:Destroy() ExtraSound = nil end end _G[EquippedName] = Tool.Equipped:Connect(function() Equipped = true StopHug() end) _G[UnequippedName] = Tool.Unequipped:Connect(function() Equipped = false StopHug() end) _G[ActivatedName] = Tool.Activated:Connect(function() if not Equipped then return end if Hugging then StopHug() return end Hugging = true ApplyGrip(Tool, Data.HugGrip or HugGrip) HugSound = CreateSound("PlushHugSound", Data.Sound, Handle) HugSound:Play() if Data.ExtraSound then ExtraSound = CreateSound("PlushExtraSound", Data.ExtraSound, Handle) ExtraSound:Play() end end) Tool.Destroying:Connect(function() Equipped = false StopHug() for _, Name in ipairs(ConnectionNames) do if _G[Name] then _G[Name]:Disconnect() _G[Name] = nil end end end) end for _, Data in ipairs(Plushies) do CreatePlush(Data) end