Advertisement
Bugxie_

Untitled

Nov 18th, 2021
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. local Client = game.Players.LocalPlayer
  2. local Character = Client.Character
  3. local CharUsing = Character:FindFirstChildOfClass("Folder")
  4. local CharScript = CharUsing:FindFirstChildOfClass("LocalScript")
  5. local Token = CharScript:GetAttribute("DamageRequestID")
  6. local RS = game:GetService("ReplicatedStorage")
  7. local Remote
  8.  
  9. for i,v in pairs(getgc()) do
  10. if type(v) == "function" and not is_synapse_function(v) and getfenv(v).script.Name == "LocalScript" then
  11. pcall(function()
  12. for i2,v2 in pairs(getupvalues(v)) do
  13. if type(v2) == type(1) and v2 > tick()/1000 then
  14. Token = v2
  15. end
  16. if typeof(v2) == "Instance" and v2:IsA("RemoteEvent") and tonumber(v2.Name) then
  17. Remote = v2
  18. end
  19. end
  20. end)
  21. end
  22. end
  23.  
  24. local function roundNumber(p1, p2)
  25. return tonumber(string.format("%." .. (p2 and 0) .. "f", p1))
  26. end
  27.  
  28. function Damage(Type,Target,ChargeIncrease,KnockbackSpeed)
  29. Remote:FireServer({
  30. direction = Target.PrimaryPart.Position,
  31. attackID = roundNumber(tick() - Token,5),
  32. charName = CharUsing.Name,
  33. charhit = Target,
  34. char = Character,
  35. attackType = Type, -- Basic Ultimate Special
  36. knockbackSpeed = KnockbackSpeed,
  37. chargeIncrease = ChargeIncrease,
  38. })
  39. end
  40.  
  41. -- while wait() do
  42. for i,v in pairs(game.Players:GetPlayers()) do
  43. if v ~= Client then
  44. Damage("Special",v.Character)
  45. -- Basic : Do Damage
  46. -- Ultimate/Special : Instant Kill (have enough damage)
  47. end
  48. end
  49. -- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement