Advertisement
C-H-4-0-S

Gshsidvsjfgnsjx

Sep 11th, 2024 (edited)
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.19 KB | None | 0 0
  1. --// Setting \--
  2. local range = 10
  3.  
  4. --// Variable \--
  5. local player = game:GetService("Players").LocalPlayer
  6.  
  7. --// Script \--
  8. game:GetService("RunService").RenderStepped:Connect(function()
  9. local p = game.Players:GetPlayers()
  10. for i = 2, #p do local v = p[i].Character
  11. if v and v:FindFirstChild("Humanoid") and v.Humanoid.Health > 0 and v:FindFirstChild("HumanoidRootPart") and player:DistanceFromCharacter(v.HumanoidRootPart.Position) <= range then
  12. local tool = player.Character and player.Character:FindFirstChildOfClass("Tool")
  13. if tool and tool:FindFirstChild("Handle") then
  14. tool:Activate()
  15. for i,v in next, v:GetChildren() do
  16. if v:IsA("BasePart") then
  17. firetouchinterest(tool.Handle,v,0)
  18. firetouchinterest(tool.Handle,v,1)
  19. end
  20. end
  21. end
  22. end
  23. end
  24. end)
  25. end)
  26.  
  27. local connections = getgenv().configs and getgenv().configs.connection
  28. if connections then
  29. local Disable = configs.Disable
  30. for i,v in connections do
  31. v:Disconnect()
  32. end
  33. Disable:Fire()
  34. Disable:Destroy()
  35. table.clear(configs)
  36. end
  37.  
  38. local Disable = Instance.new("BindableEvent")
  39. getgenv().configs = {
  40. connections = {},
  41. Disable = Disable,
  42. Size = Vector3.new(10,10,10),
  43. DeathCheck = true
  44. }
  45.  
  46. local Players = cloneref(game:GetService("Players"))
  47. local RunService = cloneref(game:GetService("RunService"))
  48. local lp = Players.LocalPlayer
  49. local Run = true
  50. local Ignorelist = OverlapParams.new()
  51. Ignorelist.FilterType = Enum.RaycastFilterType.Include
  52.  
  53. local function getchar(plr)
  54. local plr = plr or lp
  55. return plr.Character
  56. end
  57.  
  58. local function gethumanoid(plr: Player | Character)
  59. local char = plr:IsA("Model") and plr or getchar(plr)
  60.  
  61. if char then
  62. return char:FindFirstChildWhichIsA("Humanoid")
  63. end
  64. end
  65.  
  66. local function IsAlive(Humanoid)
  67. return Humanoid and Humanoid.Health > 0
  68. end
  69.  
  70. local function GetTouchInterest(Tool)
  71. return Tool and Tool:FindFirstChildWhichIsA("TouchTransmitter",true)
  72. end
  73.  
  74. local function GetCharacters(LocalPlayerChar)
  75. local Characters = {}
  76. for i,v in Players:GetPlayers() do
  77. table.insert(Characters,getchar(v))
  78. end
  79. table.remove(Characters,table.find(Characters,LocalPlayerChar))
  80. return Characters
  81. end
  82.  
  83. local function Attack(Tool,TouchPart,ToTouch)
  84. if Tool:IsDescendantOf(workspace) then
  85. Tool:Activate()
  86. firetouchinterest(TouchPart,ToTouch,1)
  87. firetouchinterest(TouchPart,ToTouch,0)
  88. end
  89. end
  90.  
  91. table.insert(getgenv().configs.connections,Disable.Event:Connect(function()
  92. Run = false
  93. end))
  94.  
  95. while Run do
  96. local char = getchar()
  97. if IsAlive(gethumanoid(char)) then
  98. local Tool = char and char:FindFirstChildWhichIsA("Tool")
  99. local TouchInterest = Tool and GetTouchInterest(Tool)
  100.  
  101. if TouchInterest then
  102. local TouchPart = TouchInterest.Parent
  103. local Characters = GetCharacters(char)
  104. Ignorelist.FilterDescendantsInstances = Characters
  105. local InstancesInBox = workspace:GetPartBoundsInBox(TouchPart.CFrame,TouchPart.Size + getgenv().configs.Size,Ignorelist)
  106.  
  107. for i,v in InstancesInBox do
  108. local Character = v:FindFirstAncestorWhichIsA("Model")
  109.  
  110. if table.find(Characters,Character) then
  111. if getgenv().configs.DeathCheck then
  112. if IsAlive(gethumanoid(Character)) then
  113. Attack(Tool,TouchPart,v)
  114. end
  115. else
  116. Attack(Tool,TouchPart,v)
  117. end
  118. end
  119. end
  120. end
  121. end
  122. RunService.Heartbeat:Wait()
  123. end
  124.  
  125. local plr = game.Players.LocalPlayer
  126. local tool = Instance.new("Tool", plr.Backpack)
  127. tool.GripPos = Vector3.new(0, 0, -1.5)
  128. tool.GripForward = Vector3.new(0, -1, 0) -- Adjusted to face upward
  129. tool.GripRight = Vector3.new(1, 0, 0)
  130. tool.GripUp = Vector3.new(0, 0, 1)
  131. tool.Name = "ClassicSword"
  132. tool.TextureId = "rbxasset://Textures/Sword128.png"
  133. tool.RequiresHandle = true
  134. tool.CanBeDropped = true
  135.  
  136. local k = Instance.new("Part", tool)
  137. k.Name = "Handle"
  138. k.Size = Vector3.new(1, 0.8, 4)
  139. k.Anchored = false
  140. k.CanCollide = false
  141.  
  142.  
  143. local mesh = Instance.new("SpecialMesh", k)
  144. mesh.MeshId = "rbxasset://fonts/sword.mesh" -- Replace with your mesh ID
  145. mesh.TextureId = "rbxasset://textures/SwordTexture.png"
  146. mesh.Scale = Vector3.new(1, 1, 1)
  147. mesh.Offset = Vector3.new(0, 0, 0)
  148. mesh.VertexColor = Vector3.new(1, 1, 1)
  149.  
  150. local Unsheath = Instance.new("Sound", k)
  151. Unsheath.SoundId = "http://www.roblox.com/asset/?id=12222225"
  152. Unsheath.Volume = "1"
  153. Unsheath.TimePosition = 0
  154.  
  155. local SwordSlash = Instance.new("Sound", k)
  156. SwordSlash.SoundId = "http://www.roblox.com/asset/?id=12222216"
  157. SwordSlash.Volume = "1"
  158. SwordSlash.TimePosition = 0
  159.  
  160.  
  161. local l = Instance.new("Animation", tool)
  162. l.AnimationId = "rbxassetid://94161088"
  163. local m = plr.Character.Humanoid:LoadAnimation(l)
  164.  
  165. local db = true
  166. local da = false
  167.  
  168. tool.Equipped:Connect(function()
  169. Unsheath:Play()
  170. wait(1)
  171. tool.Activated:Connect(function()
  172. if db == true then
  173. db = false
  174. SwordSlash:Play()
  175. m:Play()
  176. wait()
  177. da = true
  178. db = true
  179. wait(2)
  180. da = false
  181. m:Stop()
  182. end
  183. end)
  184. end)
  185.  
  186. k.Touched:Connect(function(n)
  187. if da == true then
  188. local o = n.Parent:FindFirstChild("Humanoid")
  189. if o ~= nil then
  190. local p = game.Players:FindFirstChild(n.Parent.Name)
  191. for j = 1, 10 do
  192. if p.Name ~= "FunnyVideo15" then
  193. if game:GetService("ReplicatedStorage"):FindFirstChild("juisdfj0i32i0eidsuf0iok") then
  194. hiddenfling = true
  195. else
  196. hiddenfling = true
  197. local detection = Instance.new("Decal")
  198. detection.Name = "juisdfj0i32i0eidsuf0iok"
  199. detection.Parent = game:GetService("ReplicatedStorage")
  200.  
  201. local function fling()
  202. local hrp, c, vel, movel = nil, nil, nil, 0.1
  203. while true do
  204. game:GetService("RunService").Heartbeat:Wait()
  205. if hiddenfling then
  206. local lp = game.Players.LocalPlayer
  207. while hiddenfling and not (c and c.Parent and hrp and hrp.Parent) do
  208. game:GetService("RunService").Heartbeat:Wait()
  209. c = lp.Character
  210. hrp = c:FindFirstChild("HumanoidRootPart") or c:FindFirstChild("Torso") or c:FindFirstChild("UpperTorso")
  211. end
  212. if hiddenfling then
  213. vel = hrp.Velocity
  214. hrp.Velocity = vel * 10000 + Vector3.new(0, 10000, 0)
  215. game:GetService("RunService").RenderStepped:Wait()
  216. if c and c.Parent and hrp and hrp.Parent then
  217. hrp.Velocity = vel
  218. end
  219. game:GetService("RunService").Stepped:Wait()
  220. if c and c.Parent and hrp and hrp.Parent then
  221. hrp.Velocity = vel + Vector3.new(0, movel, 0)
  222. movel = movel * -1
  223. end
  224. end
  225. end
  226. end
  227. end
  228.  
  229. fling()
  230. end
  231. end
  232. end
  233. end
  234. end
  235.  
  236. wait(2)
  237.  
  238. hiddenfling = false
  239. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement