What's new
Heapleak - Scripthub

Get the most out of HeapLeak by creating a free account! Once signed in, you’ll gain full access to restricted content, be able to share your own scripts, and participate in our member-only discussions.

Slaps everyone

Version / Update: v1.0.0
Download / Script Link
--[[
WARNING: Heads up! This script has not been verified by ScriptBlox. Use at your own risk!
]]
--// Services
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local UserInputService = game:GetService("UserInputService")

local HitRemote = ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("Replication"):WaitForChild("Fighter"):WaitForChild("HitPlayer")

--// State
local attacking = false

--// GUI
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "OpenSourceHub"
ScreenGui.Parent = Players.LocalPlayer:WaitForChild("PlayerGui")

local MainFrame = Instance.new("Frame")
MainFrame.Size = UDim2.new(0, 260, 0, 150)
MainFrame.Position = UDim2.new(0.5, -130, 0.5, -75)
MainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 35)
MainFrame.BorderSizePixel = 0
MainFrame.Parent = ScreenGui

local UICorner = Instance.new("UICorner", MainFrame)
UICorner.CornerRadius = UDim.new(0, 12)

local UIGradient = Instance.new("UIGradient", MainFrame)
UIGradient.Color = ColorSequence.new{
ColorSequenceKeypoint.new(0, Color3.fromRGB(40, 40, 60)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(20, 20, 30))
}

-- Title (drag handle)
local Title = Instance.new("TextLabel")
Title.Size = UDim2.new(1, 0, 0, 40)
Title.BackgroundTransparency = 1
Title.Text = "OpenSource Hub"
Title.TextColor3 = Color3.fromRGB(255,255,255)
Title.TextScaled = true
Title.Font = Enum.Font.GothamBold
Title.Parent = MainFrame

-- Credit
local Credit = Instance.new("TextLabel")
Credit.Size = UDim2.new(1, 0, 0, 20)
Credit.Position = UDim2.new(0, 0, 1, -20)
Credit.BackgroundTransparency = 1
Credit.Text = "Made by _OpenSource_"
Credit.TextColor3 = Color3.fromRGB(180,180,180)
Credit.TextScaled = true
Credit.Font = Enum.Font.Gotham
Credit.Parent = MainFrame

-- Toggle Button
local Toggle = Instance.new("TextButton")
Toggle.Size = UDim2.new(0.8, 0, 0, 50)
Toggle.Position = UDim2.new(0.1, 0, 0.4, 0)
Toggle.BackgroundColor3 = Color3.fromRGB(60, 60, 90)
Toggle.Text = "OFF"
Toggle.TextColor3 = Color3.fromRGB(255,255,255)
Toggle.TextScaled = true
Toggle.Font = Enum.Font.GothamBold
Toggle.Parent = MainFrame

local ButtonCorner = Instance.new("UICorner", Toggle)
ButtonCorner.CornerRadius = UDim.new(0, 10)

local BtnGradient = Instance.new("UIGradient", Toggle)
BtnGradient.Color = ColorSequence.new{
ColorSequenceKeypoint.new(0, Color3.fromRGB(80, 80, 120)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(40, 40, 70))
}

-- Toggle logic
Toggle.MouseButton1Click:Connect(function()
attacking = not attacking
Toggle.Text = attacking and "ON" or "OFF"
Toggle.BackgroundColor3 = attacking and Color3.fromRGB(120, 60, 60) or Color3.fromRGB(60, 60, 90)
end)

--// DRAG SYSTEM
local dragging = false
local dragInput, dragStart, startPos

local function update(input)
local delta = input.Position - dragStart
MainFrame.Position = UDim2.new(
startPos.X.Scale,
startPos.X.Offset + delta.X,
startPos.Y.Scale,
startPos.Y.Offset + delta.Y
)
end

Title.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = true
dragStart = input.Position
startPos = MainFrame.Position

input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)

Title.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement then
dragInput = input
end
end)

UserInputService.InputChanged:Connect(function(input)
if input == dragInput and dragging then
update(input)
end
end)

-- Attack loop
task.spawn(function()
while true do
if attacking then
for _, player in pairs(Players:GetPlayers()) do
if player ~= Players.LocalPlayer and player.Character and player.Character:FindFirstChild("Humanoid") and player.Character.Humanoid.Health > 0 then
local args = {player.Character, false}
for i = 1, 5 do
HitRemote:FireServer(unpack(args))
end
end
end
end
task.wait(0.01)
end
end)
[ View More ]
822664ba-7f3c-443b-8455-441e96d5a40c.webp


HI Ill be uploading here sense ScriptBlox limited how many scripts i can upload
 
Back
Top