Roblox - Advanced Weed Blunt System -

local function onToolUnequipped() activeBlunt = nil end

task.wait(BluntData.BluntConfig.PassOutDuration)

-- Helper: Get or create blunt data from tool local function getBluntData(tool) local hitsLeft = tool:GetAttribute("HitsLeft") if not hitsLeft then tool:SetAttribute("HitsLeft", BluntData.BluntConfig.MaxHits) tool:SetAttribute("IsLit", false) end return tool end Roblox - Advanced Weed Blunt System

local activeBlunt = nil -- current blunt tool local canHit = true

-- Connect to tools via player.CharacterAdded 4.1. BluntHandler (Server Script in ServerScriptService) local Players = game:GetService("Players") local RS = game:GetService("ReplicatedStorage") local lightEvent = RS:FindFirstChild("LightBluntEvent") local hitEvent = RS:FindFirstChild("TakeHitEvent") local HighnessManager = require(script.Parent.HighnessManager) local BluntData = require(RS.Shared.BluntData) highness.Value + amount) self:UpdateClient(player

function HighnessManager:AddHighness(player, amount) local highness = player:FindFirstChild("Highness") if not highness then return end highness.Value = math.min(BluntData.BluntConfig.HighnessMax, highness.Value + amount) self:UpdateClient(player, highness.Value)

function HighnessManager:UpdateClient(player, value) local event = game:GetService("ReplicatedStorage"):FindFirstChild("UpdateHighness") if event then event:FireClient(player, value) end end Roblox - Advanced Weed Blunt System

hitEvent.OnServerEvent:Connect(function(player, bluntTool) if not bluntTool or not bluntTool.Parent == player.Character then return end local blunt = getBluntData(bluntTool) if not blunt:GetAttribute("IsLit") then return end