Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Client = game.Players.LocalPlayer
- local Character = Client.Character
- local CharUsing = Character:FindFirstChildOfClass("Folder")
- local CharScript = CharUsing:FindFirstChildOfClass("LocalScript")
- local Token = CharScript:GetAttribute("DamageRequestID")
- local RS = game:GetService("ReplicatedStorage")
- local Remote
- for i,v in pairs(getgc()) do
- if type(v) == "function" and not is_synapse_function(v) and getfenv(v).script.Name == "LocalScript" then
- pcall(function()
- for i2,v2 in pairs(getupvalues(v)) do
- if type(v2) == type(1) and v2 > tick()/1000 then
- Token = v2
- end
- if typeof(v2) == "Instance" and v2:IsA("RemoteEvent") and tonumber(v2.Name) then
- Remote = v2
- end
- end
- end)
- end
- end
- local function roundNumber(p1, p2)
- return tonumber(string.format("%." .. (p2 and 0) .. "f", p1))
- end
- function Damage(Type,Target,ChargeIncrease,KnockbackSpeed)
- Remote:FireServer({
- direction = Target.PrimaryPart.Position,
- attackID = roundNumber(tick() - Token,5),
- charName = CharUsing.Name,
- charhit = Target,
- char = Character,
- attackType = Type, -- Basic Ultimate Special
- knockbackSpeed = KnockbackSpeed,
- chargeIncrease = ChargeIncrease,
- })
- end
- -- while wait() do
- for i,v in pairs(game.Players:GetPlayers()) do
- if v ~= Client then
- Damage("Special",v.Character)
- -- Basic : Do Damage
- -- Ultimate/Special : Instant Kill (have enough damage)
- end
- end
- -- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement