Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local Character = LocalPlayer.Character local Root = Character:FindFirstChild("HumanoidRootPart") local ReplicatedStorage = game:GetService("ReplicatedStorage") local ENABLED = true local function getNearbyPlayers() local nearby = {} for _, player in ipairs(Players:GetPlayers()) do if player ~= LocalPlayer and player.Character then local proot = player.Character:FindFirstChild("HumanoidRootPart") if proot then local distance = (Root.Position - proot.Position).Magnitude if distance <= 20 then table.insert(nearby, player) end end end end return nearby end game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == Enum.KeyCode.K then ENABLED = not ENABLED end end) game:GetService("RunService").Heartbeat:Connect(function() if ENABLED then local nearbyPlayers = getNearbyPlayers() for _, player in ipairs(nearbyPlayers) do local targetChar = player.Character if targetChar then local humanoid = targetChar:FindFirstChild("Humanoid") if humanoid then local args = { humanoid, "Punch", false } ReplicatedStorage:FindFirstChild("Remote").Events.CombatUsed:FireServer(unpack(args)) end end end end end)
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)