- -- Gui to Lua
- -- Version: 3.2
- -- Instances:
- local Swordfighting = Instance.new("ScreenGui")
- local Main = Instance.new("Frame")
- local TextLabel = Instance.new("TextLabel")
- local UICorner = Instance.new("UICorner")
- local Killall = Instance.new("TextButton")
- local UICorner_2 = Instance.new("UICorner")
- local Aimbot = Instance.new("TextButton")
- local UICorner_3 = Instance.new("UICorner")
- local spam = Instance.new("TextButton")
- local UICorner_4 = Instance.new("UICorner")
- local Admin = Instance.new("TextButton")
- local UICorner_5 = Instance.new("UICorner")
- local Lightabuse = Instance.new("TextButton")
- local UICorner_6 = Instance.new("UICorner")
- local UICorner_7 = Instance.new("UICorner")
- local Frame = Instance.new("Frame")
- local TextButton = Instance.new("TextButton")
- local UICorner_8 = Instance.new("UICorner")
- local UICorner_9 = Instance.new("UICorner")
- --Properties:
- Swordfighting.Name = "Sword fighting"
- Swordfighting.Parent = game.CoreGui
- Swordfighting.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Main.Name = "Main"
- Main.Parent = Swordfighting
- Main.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- Main.Position = UDim2.new(0.342964828, 0, 0.244532794, 0)
- Main.Size = UDim2.new(0, 397, 0, 257)
- Main.Visible = false
- Main.Draggable = true
- Main.Active = true
- TextLabel.Parent = Main
- TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.Size = UDim2.new(0, 397, 0, 41)
- TextLabel.Font = Enum.Font.SourceSans
- TextLabel.Text = "Sword Destroying Gui"
- TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14.000
- TextLabel.TextWrapped = true
- UICorner.Parent = TextLabel
- Killall.Name = "Kill all"
- Killall.Parent = Main
- Killall.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Killall.Position = UDim2.new(0, 0, 0.210677594, 0)
- Killall.Size = UDim2.new(0, 192, 0, 50)
- Killall.Font = Enum.Font.SourceSans
- Killall.Text = "Kill all (Made by Clown and also u have to hold out sword"
- Killall.TextColor3 = Color3.fromRGB(0, 0, 0)
- Killall.TextScaled = true
- Killall.TextSize = 14.000
- Killall.TextWrapped = true
- Killall.MouseButton1Down:connect(function()
- --// Setting \\--
- local range = 1000000
- --// Variable \\--
- local player = game:GetService("Players").LocalPlayer
- --// Script \\--
- game:GetService("RunService").RenderStepped:Connect(function()
- local p = game.Players:GetPlayers()
- for i = 2, #p do local v = p[i].Character
- if v and v:FindFirstChild("Humanoid") and v.Humanoid.Health > 0 and v:FindFirstChild("HumanoidRootPart") and player:DistanceFromCharacter(v.HumanoidRootPart.Position) = RayMethod.ArgCountRequired
- end
- local function getDirection(Origin, Position)
- return (Position - Origin).Unit * 1000
- end
- local function getMousePosition()
- return Vector2.new(Mouse.X, Mouse.Y)
- end
- local function IsPlayerVisible(Player)
- local PlayerCharacter = Player.Character
- local LocalPlayerCharacter = LocalPlayer.Character
- if not (PlayerCharacter or LocalPlayerCharacter) then return end
- local PlayerRoot = FindFirstChild(PlayerCharacter, Options.TargetPart.Value) or FindFirstChild(PlayerCharacter, "HumanoidRootPart")
- if not PlayerRoot then return end
- local CastPoints, IgnoreList = {PlayerRoot.Position, LocalPlayerCharacter, PlayerCharacter}, {LocalPlayerCharacter, PlayerCharacter}
- local ObscuringObjects = #GetPartsObscuringTarget(Camera, CastPoints, IgnoreList)
- return ((ObscuringObjects == 0 and true) or (ObscuringObjects > 0 and false))
- end
- local function getClosestPlayer()
- if not Options.TargetPart.Value then return end
- local Closest
- local DistanceToMouse
- for _, Player in next, GetChildren(Players) do
- if Player == LocalPlayer then continue end
- if Toggles.TeamCheck.Value and Player.Team == LocalPlayer.Team then continue end
- local Character = Player.Character
- if not Character then continue end
- if Toggles.VisibleCheck.Value and not IsPlayerVisible(Player) then continue end
- local HumanoidRootPart = FindFirstChild(Character, "HumanoidRootPart")
- local Humanoid = FindFirstChild(Character, "Humanoid")
- if not HumanoidRootPart or not Humanoid or Humanoid and Humanoid.Health