--new- Chainsaw Man- Devil-s Heart Script Gui ... -

for _, other in pairs(game.Players:GetPlayers()) do if other ~= player and other.Character and other.Character:FindFirstChild("HumanoidRootPart") then local dist = (root.Position - other.Character.HumanoidRootPart.Position).Magnitude if dist < minDist then minDist = dist nearest = other end end end

local function updateUI() heartCountLabel.Text = "❤️ Devil Hearts: " .. hearts.Value powerLabel.Text = "⚡ Power: " .. power.Value end

hearts:GetPropertyChangedSignal("Value"):Connect(updateUI) power:GetPropertyChangedSignal("Value"):Connect(updateUI) updateUI() --NEW- Chainsaw Man- Devil-s Heart Script GUI ...

bangBtn.MouseButton1Click:Connect(function() bangRemote:FireServer() end)

-- Button actions (send to server) chainsawBtn.MouseButton1Click:Connect(function() transformRemote:FireServer() end) for _, other in pairs(game

-- Remote Events (create these in ReplicatedStorage) local remotes = game:GetService("ReplicatedStorage"):WaitForChild("DevilRemotes") local transformRemote = remotes:WaitForChild("Transform") local bangRemote = remotes:WaitForChild("Bang") local controlRemote = remotes:WaitForChild("Control")

-- Optional: toggle GUI visibility (press 'G') game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == Enum.KeyCode.G then mainFrame.Visible = not mainFrame.Visible end end) -- ServerScriptService.DevilAbilities local replicatedStorage = game:GetService("ReplicatedStorage") local remotes = Instance.new("Folder", replicatedStorage) remotes.Name = "DevilRemotes" 100) end end

local result = workspace:Raycast(root.Position, direction, raycastParams) if result and result.Instance.Parent:FindFirstChild("Humanoid") then result.Instance.Parent.Humanoid:TakeDamage(40) end addPower(player, -10) end)

-- Helper: update power local function addPower(player, amount) local stats = player:FindFirstChild("leaderstats") if stats and stats:FindFirstChild("Power") then stats.Power.Value = math.clamp(stats.Power.Value + amount, 0, 100) end end