Advertisement
DonnaWanTell

pvp sword fighting reach

Aug 29th, 2021
561
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.01 KB | None | 0 0
  1. Info ----➤ This Script Was Pasted by GodFatherRain on Roblox
  2. Discord ----➤ DM Me On Cord If It Doesn't Work z?#0367
  3. Discord ----➤ https://discord.gg/aXpADFS434 My Discord Server For DH/DaHood
  4. Script ----➤ Yes This Is A HitBox Expander
  5.  
  6. Supported Games:
  7. https://www.roblox.com/games/6522246133/pvp-sword-fighting
  8.  
  9.  
  10. local active = true
  11. local trueActive = true
  12. local reachType = "Sphere"
  13. local dmgEnabled = true
  14. local visualizerEnabled = false
  15.  
  16. local visualizer = Instance.new("Part")
  17. visualizer.BrickColor = BrickColor.Blue()
  18. visualizer.Transparency = 0.6
  19. visualizer.Anchored = true
  20. visualizer.CanCollide = false
  21. visualizer.Size = Vector3.new(0.5,0.5,0.5)
  22. visualizer.BottomSurface = Enum.SurfaceType.Smooth
  23. visualizer.TopSurface = Enum.SurfaceType.Smooth
  24.  
  25. local ScreenGui = Instance.new("ScreenGui")
  26. local Frame = Instance.new("Frame")
  27. local TextLabel = Instance.new("TextLabel")
  28. local TextBox = Instance.new("TextBox")
  29. local TextLabel_2 = Instance.new("TextLabel")
  30. local TextLabel_3 = Instance.new("TextLabel")
  31. local TextLabel_4 = Instance.new("TextLabel")
  32. local TextButton = Instance.new("TextButton")
  33. local Frame_2 = Instance.new("Frame")
  34. local Frame_3 = Instance.new("Frame")
  35. local Frame_4 = Instance.new("Frame")
  36. local Frame_5 = Instance.new("Frame")
  37. local TextButton_2 = Instance.new("TextButton")
  38.  
  39. --Properties:
  40.  
  41. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  42. ScreenGui.DisplayOrder = 999999999
  43. ScreenGui.ResetOnSpawn = false
  44.  
  45. Frame.Parent = ScreenGui
  46. Frame.AnchorPoint = Vector2.new(0, 0.5)
  47. Frame.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  48. Frame.BackgroundTransparency = 0.300
  49. Frame.BorderColor3 = Color3.fromRGB(0, 0, 0)
  50. Frame.BorderSizePixel = 4
  51. Frame.Position = UDim2.new(0, 0, 0.600000024, 0)
  52. Frame.Size = UDim2.new(0.150000006, 0, 0.300000012, 0)
  53.  
  54. TextLabel.Parent = Frame
  55. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  56. TextLabel.BackgroundTransparency = 1.000
  57. TextLabel.Size = UDim2.new(0.600000024, 0, 0.200000003, 0)
  58. TextLabel.Font = Enum.Font.SourceSans
  59. TextLabel.Text = "Reach:"
  60. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  61. TextLabel.TextScaled = true
  62. TextLabel.TextSize = 14.000
  63. TextLabel.TextWrapped = true
  64.  
  65. TextBox.Parent = Frame
  66. TextBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  67. TextBox.BackgroundTransparency = 1.000
  68. TextBox.Position = UDim2.new(0.600000024, 0, 0, 0)
  69. TextBox.Size = UDim2.new(0.400000006, 0, 0.200000003, 0)
  70. TextBox.Font = Enum.Font.SourceSans
  71. TextBox.Text = "3.5"
  72. TextBox.TextColor3 = Color3.fromRGB(255, 76, 76)
  73. TextBox.TextScaled = true
  74. TextBox.TextSize = 14.000
  75. TextBox.TextWrapped = true
  76.  
  77. TextLabel_2.Parent = Frame
  78. TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  79. TextLabel_2.BackgroundTransparency = 1.000
  80. TextLabel_2.Position = UDim2.new(0, 0, 0.200000003, 0)
  81. TextLabel_2.Size = UDim2.new(0.600000024, 0, 0.200000003, 0)
  82. TextLabel_2.Font = Enum.Font.SourceSans
  83. TextLabel_2.Text = "Shape:"
  84. TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  85. TextLabel_2.TextScaled = true
  86. TextLabel_2.TextSize = 14.000
  87. TextLabel_2.TextWrapped = true
  88.  
  89. TextLabel_3.Parent = Frame
  90. TextLabel_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  91. TextLabel_3.BackgroundTransparency = 1.000
  92. TextLabel_3.Position = UDim2.new(0, 0, 0.400000006, 0)
  93. TextLabel_3.Size = UDim2.new(0.600000024, 0, 0.200000003, 0)
  94. TextLabel_3.Font = Enum.Font.SourceSans
  95. TextLabel_3.Text = "Damage:"
  96. TextLabel_3.TextColor3 = Color3.fromRGB(255, 255, 255)
  97. TextLabel_3.TextScaled = true
  98. TextLabel_3.TextSize = 14.000
  99. TextLabel_3.TextWrapped = true
  100.  
  101. TextLabel_4.Parent = Frame
  102. TextLabel_4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  103. TextLabel_4.BackgroundTransparency = 1.000
  104. TextLabel_4.Position = UDim2.new(0, 0, 0.600000024, 0)
  105. TextLabel_4.Size = UDim2.new(0.600000024, 0, 0.200000003, 0)
  106. TextLabel_4.Font = Enum.Font.SourceSans
  107. TextLabel_4.Text = "Visualizer:"
  108. TextLabel_4.TextColor3 = Color3.fromRGB(255, 255, 255)
  109. TextLabel_4.TextScaled = true
  110. TextLabel_4.TextSize = 14.000
  111. TextLabel_4.TextWrapped = true
  112.  
  113. TextButton.Parent = Frame
  114. TextButton.AnchorPoint = Vector2.new(0, 1)
  115. TextButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  116. TextButton.BackgroundTransparency = 1.000
  117. TextButton.Position = UDim2.new(0, 0, 1, 0)
  118. TextButton.Size = UDim2.new(1, 0, 0.150000006, 0)
  119. TextButton.Font = Enum.Font.SourceSansBold
  120. TextButton.Text = "Kill Script"
  121. TextButton.TextColor3 = Color3.fromRGB(222, 0, 0)
  122. TextButton.TextScaled = true
  123. TextButton.TextSize = 14.000
  124. TextButton.TextWrapped = true
  125.  
  126. Frame_2.Parent = Frame
  127. Frame_2.Active = true
  128. Frame_2.AnchorPoint = Vector2.new(0, 0.5)
  129. Frame_2.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  130. Frame_2.BorderSizePixel = 0
  131. Frame_2.Position = UDim2.new(0.725000024, 0, 0.699999988, 0)
  132. Frame_2.Size = UDim2.new(0, 25, 0, 25)
  133. Frame_2.ZIndex = 5
  134.  
  135. Frame_3.Parent = Frame_2
  136. Frame_3.AnchorPoint = Vector2.new(0.5, 0.5)
  137. Frame_3.BackgroundColor3 = Color3.fromRGB(255, 76, 76)
  138. Frame_3.BorderSizePixel = 0
  139. Frame_3.LayoutOrder = 1
  140. Frame_3.Position = UDim2.new(0.5, 0, 0.5, 0)
  141.  
  142. Frame_4.Parent = Frame
  143. Frame_4.Active = true
  144. Frame_4.AnchorPoint = Vector2.new(0, 0.5)
  145. Frame_4.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  146. Frame_4.BorderSizePixel = 0
  147. Frame_4.Position = UDim2.new(0.725000024, 0, 0.5, 0)
  148. Frame_4.Size = UDim2.new(0, 25, 0, 25)
  149. Frame_4.ZIndex = 5
  150.  
  151. Frame_5.Parent = Frame_4
  152. Frame_5.AnchorPoint = Vector2.new(0.5, 0.5)
  153. Frame_5.BackgroundColor3 = Color3.fromRGB(255, 76, 76)
  154. Frame_5.BorderSizePixel = 0
  155. Frame_5.LayoutOrder = 1
  156. Frame_5.Position = UDim2.new(0.5, 0, 0.5, 0)
  157. Frame_5.Size = UDim2.new(1, 0, 1, 0)
  158.  
  159. TextButton_2.Parent = Frame
  160. TextButton_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  161. TextButton_2.BackgroundTransparency = 1.000
  162. TextButton_2.Position = UDim2.new(0.600000024, 0, 0.200000003, 0)
  163. TextButton_2.Size = UDim2.new(0.400000006, 0, 0.200000003, 0)
  164. TextButton_2.Font = Enum.Font.SourceSans
  165. TextButton_2.Text = "Sphere"
  166. TextButton_2.TextColor3 = Color3.fromRGB(255, 76, 76)
  167. TextButton_2.TextScaled = true
  168. TextButton_2.TextSize = 14.000
  169. TextButton_2.TextWrapped = true
  170.  
  171. repeat wait() until game.Players.LocalPlayer
  172. ScreenGui.Parent = game:GetService("CoreGui")
  173.  
  174.  
  175.  
  176. Frame_4.InputBegan:connect(function(inp)
  177. if inp.UserInputType == Enum.UserInputType.MouseButton1 then
  178. dmgEnabled = not dmgEnabled
  179. local goal = {Size = UDim2.new(0,0,0,0)}
  180. if dmgEnabled then
  181. goal = {Size = UDim2.new(1,0,1,0)}
  182. end
  183. game:GetService("TweenService"):Create(Frame_5,TweenInfo.new(0.12,Enum.EasingStyle.Quad),goal):Play()
  184. end
  185. end)
  186. Frame_2.InputBegan:connect(function(inp)
  187. if inp.UserInputType == Enum.UserInputType.MouseButton1 then
  188. visualizerEnabled = not visualizerEnabled
  189. local goal = {Size = UDim2.new(0,0,0,0)}
  190. if visualizerEnabled then
  191. goal = {Size = UDim2.new(1,0,1,0)}
  192. end
  193. game:GetService("TweenService"):Create(Frame_3,TweenInfo.new(0.12,Enum.EasingStyle.Linear),goal):Play()
  194. end
  195. end)
  196. TextButton_2.MouseButton1Click:connect(function()
  197. if reachType == "Sphere" then
  198. reachType = "Line"
  199. else
  200. reachType = "Sphere"
  201. end
  202. TextButton_2.Text = reachType
  203. end)
  204. TextButton.MouseButton1Click:connect(function()
  205. trueActive = false
  206. ScreenGui:Destroy()
  207. end)
  208. game:GetService("UserInputService").InputBegan:connect(function(inp,gpe)
  209. if gpe then return end
  210. if inp.KeyCode == Enum.KeyCode.H then
  211. ScreenGui.Enabled = not ScreenGui.Enabled
  212. end
  213. end)
  214.  
  215. local plr = game.Players.LocalPlayer
  216.  
  217. local function onHit(hit,handle)
  218. local victim = hit.Parent:FindFirstChildOfClass("Humanoid")
  219. if victim and victim.Parent.Name ~= game.Players.LocalPlayer.Name then
  220. if dmgEnabled then
  221. for _,v in pairs(hit.Parent:GetChildren()) do
  222. if v:IsA("Part") then
  223. firetouchinterest(v,handle,0)
  224. firetouchinterest(v,handle,1)
  225. end
  226. end
  227. else
  228. firetouchinterest(hit,handle,0)
  229. firetouchinterest(hit,handle,1)
  230. end
  231. end
  232. end
  233.  
  234. local function getWhiteList()
  235. local wl = {}
  236. for _,v in pairs(game.Players:GetPlayers()) do
  237. if v ~= plr then
  238. local char = v.Character
  239. if char then
  240. for _,q in pairs(char:GetChildren()) do
  241. if q:IsA("Part") then
  242. table.insert(wl,q)
  243. end
  244. end
  245. end
  246. end
  247. end
  248. return wl
  249. end
  250.  
  251. game:GetService("RunService").RenderStepped:connect(function()
  252. if not active or not trueActive then return end
  253. local s = plr.Character and plr.Character:FindFirstChildOfClass("Tool")
  254. if not s then visualizer.Parent = nil end
  255. if s then
  256. local handle = s:FindFirstChild("Handle") or s:FindFirstChildOfClass("Part")
  257. if handle then
  258. if visualizerEnabled then
  259. visualizer.Parent = workspace
  260. else
  261. visualizer.Parent = nil
  262. end
  263. local reach = tonumber(TextBox.Text)
  264. if reach then
  265. if reachType == "Sphere" then
  266. visualizer.Shape = Enum.PartType.Ball
  267. visualizer.Size = Vector3.new(reach,reach,reach)
  268. visualizer.CFrame = handle.CFrame
  269. for _,v in pairs(game.Players:GetPlayers()) do
  270. local hrp = v.Character and v.Character:FindFirstChild("HumanoidRootPart")
  271. if hrp and handle then
  272. local mag = (hrp.Position-handle.Position).magnitude
  273. if mag <= reach then
  274. onHit(hrp,handle)
  275. end
  276. end
  277. end
  278. elseif reachType == "Line" then
  279. local origin = (handle.CFrame*CFrame.new(0,0,-2)).p
  280. local ray = Ray.new(origin,handle.CFrame.lookVector*-reach)
  281. local p,pos = workspace:FindPartOnRayWithWhitelist(ray,getWhiteList())
  282. visualizer.Shape = Enum.PartType.Block
  283. visualizer.Size = Vector3.new(1,0.8,reach)
  284. visualizer.CFrame = handle.CFrame*CFrame.new(0,0,(reach/2)+2)
  285. if p then
  286. onHit(p,handle)
  287. else
  288. for _,v in pairs(handle:GetTouchingParts()) do
  289. onHit(v,handle)
  290. end
  291. end
  292. end
  293. end
  294. end
  295. end
  296. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement