local activeBlunt = nil -- current blunt tool local canHit = true
local Players = game:GetService("Players") local Debris = game:GetService("Debris") local HighnessManager = {}
BluntData.CraftingRecipe = { Weed = 1, RollingPaper = 1, Lighter = 0, -- optional } Roblox - Advanced Weed Blunt System
updateHighness.OnClientEvent:Connect(onHighnessUpdate)
lightEvent.OnServerEvent:Connect(function(player, bluntTool) if not bluntTool or not bluntTool.Parent == player.Character then return end local blunt = getBluntData(bluntTool) if blunt:GetAttribute("IsLit") then return end blunt:SetAttribute("IsLit", true) -- optional: add fire particle effect end) local activeBlunt = nil -- current blunt tool
blunt:SetAttribute("HitsLeft", hitsLeft - 1) HighnessManager:AddHighness(player, BluntData.BluntConfig.HighPerHit)
if highness.Value >= BluntData.BluntConfig.PassOutThreshold then self:PassOut(player) end end RollingPaper = 1
function HighnessManager:PassOut(player) local char = player.Character if not char or char:FindFirstChild("PassedOut") then return end
-- Camera sway if intensity > 0.1 then RunService:BindToRenderStep("WeedSway", 100, function(dt) local swayX = math.sin(tick() * 5) * intensity * 2 local swayY = math.cos(tick() * 4.3) * intensity * 1.5 workspace.CurrentCamera.CFrame *= CFrame.Angles(0, math.rad(swayX), math.rad(swayY)) end) else RunService:UnbindFromRenderStep("WeedSway") end end
-- Passive decay while player.Parent do task.wait(1) if highness.Value > 0 then highness.Value = math.max(0, highness.Value - BluntData.BluntConfig.DecayRate) self:UpdateClient(player, highness.Value) end end end
local function onHighnessUpdate(highnessValue) local intensity = highnessValue / 100 applyScreenEffect(intensity)