Advertisement
Guest User

Untitled

a guest
Dec 10th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.02 KB | None | 0 0
  1. -- Pointless but
  2. -- A lot of trash kids like to give themselves slight reach
  3. -- and then call others trash
  4. -- REACH detector for pretty much any game
  5. -- But ATM only works with fencing
  6. Potential_Reacher = "CelesteAquarius"
  7. Generated_Name = math.random(123456789, 987654321)
  8. for i,v in pairs(game:GetService("Players"):GetChildren()) do
  9. for i,v in pairs(v.Character:GetChildren()) do
  10. if v:IsA("Tool") then
  11. Tools = v
  12. end
  13. end
  14. end
  15. for i,v in pairs(game:GetService("Players"):GetChildren()) do
  16. Tools.Parent = v.Backpack
  17. end
  18. -- Method
  19. -- Method 1 compares their foil to your foil
  20. -- Method 2 uses the value in this script to compare
  21. method1 = true
  22. method2 = false
  23. -- Yeah you're not slick buddy
  24. if method1 and method2 then
  25. a = math.random(1,2)
  26. if a == 1 then
  27. method1 = true
  28. method2 = false
  29. else
  30. method2 = true
  31. method1 = false
  32. end
  33. end
  34. if not method1 and not method2 then
  35. a = math.random(1,2)
  36. if a == 1 then
  37. method1 = true
  38. else
  39. method2 = true
  40. end
  41. end
  42. function msg(Header, Text)
  43. Header = Header or "Sample Header"
  44. Text = Text or "Sample Text"
  45. game.StarterGui:SetCore("SendNotification", {Title = Header; Text = Text})
  46. end
  47. if method1 then
  48. chose = "Method 1"
  49. elseif method2 then
  50. chose = "Method 2"
  51. Part = Instance.new("Part")
  52. Part.Parent = game:GetService("Workspace")
  53. Part.Transparency = 1
  54. Part.CanCollide = false
  55. Part.Anchored = true
  56. Part.Size = Vector3.new(1, 0.400000006, 5)
  57. Part.Name = Generated_Name
  58. Part.Position = game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position
  59. method2_n = game:GetService("Workspace")[Generated_Name].Size
  60. end
  61. msg("Reach Detector", "You've chosen "..chose)
  62. wait(1)
  63. Players = game:GetService("Players")
  64. You = Players.LocalPlayer.Backpack
  65. Reacher = Players[Potential_Reacher].Backpack
  66. -- Confirming both players have a foil to reduce errors
  67. msg("Reach Detector", "Confirming that both players have a foil")
  68. for i,v in pairs(You:GetChildren()) do
  69. if v:IsA("Tool") and v.Name == "Foil" then
  70. c1 = true
  71. else
  72. c1 = false
  73. end
  74. end
  75. for i,v in pairs(Reacher:GetChildren()) do
  76. if v:IsA("Tool") and v.Name == "Foil" then
  77. c2 = true
  78. else
  79. c2 = false
  80. end
  81. end
  82. wait(1)
  83. if c1 and c2 then
  84. foil = true
  85. msg("Reach Detector", "Both players have a foil!")
  86. YourFoil = You.Foil.Handle
  87. ReacherFoil = Reacher.Foil.Handle
  88. else
  89. foil = false
  90. msg("Reach Detector", "Both players do not have a foil. DENIED!")
  91. end
  92. wait(1)
  93. if foil then
  94. if method1 then
  95. if YourFoil.Size == ReacherFoil.Size then
  96. msg("Reach Detector", ""..Potential_Reacher.." is not reaching! It's probably lag!")
  97. else
  98. msg("Reach Detector", ""..Potential_Reacher.." is indeed reaching! >:(")
  99. end
  100. end
  101. if method2 then
  102. if ReacherFoil.Size == method2_n then
  103. msg("Reach Detector", ""..Potential_Reacher.." is not reaching! It's probably lag!")
  104. else
  105. msg("Reach Detector", ""..Potential_Reacher.." is indeed reaching! >:(")
  106. game:GetService("Workspace")[Generated_Name]:Destroy()
  107. end
  108. end
  109. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement