Roblox - Advanced Weed Blunt System -
function HighnessManager:Init(player) local highness = Instance.new("NumberValue") highness.Name = "Highness" highness.Value = 0 highness.Parent = player
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
-- 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) Roblox - Advanced Weed Blunt System
return BluntData Handles highness level and pass-out logic.
blunt:SetAttribute("HitsLeft", hitsLeft - 1) HighnessManager:AddHighness(player, BluntData.BluntConfig.HighPerHit) hitsLeft - 1) HighnessManager:AddHighness(player
local function useBlunt() if not canHit or not activeBlunt then return end canHit = false hitEvent:FireServer(activeBlunt) task.wait(BluntData.BluntConfig.HitCooldown) canHit = true 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 0.1 then RunService:BindToRenderStep("WeedSway"
local humanoid = char:FindFirstChild("Humanoid") if humanoid then humanoid.PlatformStand = true -- ragdoll effect: unanchor limbs or apply velocity end
function HighnessManager:Init(player) local highness = Instance.new("NumberValue") highness.Name = "Highness" highness.Value = 0 highness.Parent = player
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
-- 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)
return BluntData Handles highness level and pass-out logic.
blunt:SetAttribute("HitsLeft", hitsLeft - 1) HighnessManager:AddHighness(player, BluntData.BluntConfig.HighPerHit)
local function useBlunt() if not canHit or not activeBlunt then return end canHit = false hitEvent:FireServer(activeBlunt) task.wait(BluntData.BluntConfig.HitCooldown) canHit = true 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
local humanoid = char:FindFirstChild("Humanoid") if humanoid then humanoid.PlatformStand = true -- ragdoll effect: unanchor limbs or apply velocity end