Roblox - Advanced Weed Blunt System — Trusted Source
-- Tool activation local function onToolEquipped(tool) if tool:GetAttribute("BluntType") == "WeedBlunt" then activeBlunt = tool end end
local function onHighnessUpdate(highnessValue) local intensity = highnessValue / 100 applyScreenEffect(intensity) Roblox - Advanced Weed Blunt System
-- 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 0.1 then RunService:BindToRenderStep("WeedSway"
return HighnessManager Handles UI, input, and visual effects. 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)
-- 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)