Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. getfenv()["vDsKMjogPC3Wdu5s"]=function(k) local Players=game:GetService("Players")
  2. local Player=Players.LocalPlayer
  3. local Backpack=Player.Backpack
  4. local Server=Backpack:FindFirstChild("ServerTraits")
  5. local Input=game:GetService("UserInputService")
  6. local function Distance(a,b)
  7. local distance = (a-b).magnitude
  8. return distance or nil
  9. end
  10. local function GetClosestPlayer(range)
  11. for _,__ in pairs(Players:GetPlayers()) do
  12. if __~=Player then
  13. if __.Character then
  14. local targetRoot=__.Character:FindFirstChild("HumanoidRootPart")
  15. if targetRoot then
  16. if Distance(targetRoot.Position,Player.Character.HumanoidRootPart.Position)<=range then
  17. return __
  18. end
  19. end
  20. end
  21. end
  22. end
  23. end
  24. local function GetWeapon()
  25. for _,__ in pairs(Player.Character:GetChildren()) do
  26. if __:IsA("Tool") then
  27. return __
  28. end
  29. end
  30. end
  31. Input.InputBegan:connect(function(input, busy)
  32. if not busy then
  33. local Key = input.KeyCode
  34. if Key == Enum.KeyCode.Q then
  35. local w=GetWeapon()
  36. if tostring(w)=="Punch" then
  37. for _,__ in pairs(w:GetChildren()) do
  38. if __:IsA("AnimationTrack") then
  39. __:Destroy()
  40. end
  41. end
  42. end
  43. if w and not Player.Character:FindFirstChild("KO") then
  44. if Player.Backpack.ServerTraits.Stann.Value > 10 then
  45. Player.Backpack.ServerTraits.Touch1:FireServer(w,Player.Character.RightHand,true,true)
  46. end
  47. end
  48. end
  49. end
  50. end) return #k end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement