Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Gui to Lua
- -- Version: 3.2
- -- Instances:
- local AutoSwordByZaya = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local UICorner = Instance.new("UICorner")
- local TopBar = Instance.new("Frame")
- local Exit = Instance.new("TextButton")
- local SearchDistance = Instance.new("TextBox")
- local InfoText = Instance.new("TextLabel")
- local WanderDistance = Instance.new("TextBox")
- local SelectTool = Instance.new("TextButton")
- local StartStopButton = Instance.new("TextButton")
- --Properties:
- AutoSwordByZaya.Name = "AutoSwordByZaya"
- if game:GetService("CoreGui"):FindFirstChild("AutoSwordByZaya") then
- game:GetService("CoreGui"):FindFirstChild("AutoSwordByZaya"):Destroy()
- end
- AutoSwordByZaya.Parent = game:GetService("CoreGui")
- Frame.Parent = AutoSwordByZaya
- Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Frame.BorderColor3 = Color3.fromRGB(0, 0, 0)
- Frame.BorderSizePixel = 0
- Frame.Position = UDim2.new(0, 0, 0.406398118, 0)
- Frame.Size = UDim2.new(0, 137, 0, 176)
- UICorner.Parent = Frame
- TopBar.Name = "TopBar"
- TopBar.Parent = Frame
- TopBar.BackgroundColor3 = Color3.fromRGB(71, 135, 255)
- TopBar.BorderColor3 = Color3.fromRGB(0, 0, 0)
- TopBar.BorderSizePixel = 0
- TopBar.Position = UDim2.new(0, 0, -0.0340909101, 0)
- TopBar.Size = UDim2.new(0, 137, 0, 20)
- Exit.Name = "Exit"
- Exit.Parent = TopBar
- Exit.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- Exit.BorderColor3 = Color3.fromRGB(0, 0, 0)
- Exit.BorderSizePixel = 0
- Exit.Position = UDim2.new(0.963503659, -15, 0, 0)
- Exit.Size = UDim2.new(0, 20, 0, 20)
- Exit.Font = Enum.Font.SourceSans
- Exit.Text = "X"
- Exit.TextColor3 = Color3.fromRGB(0, 0, 0)
- Exit.TextScaled = true
- Exit.TextSize = 14.000
- Exit.TextWrapped = true
- SearchDistance.Name = "SearchDistance"
- SearchDistance.Parent = Frame
- SearchDistance.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- SearchDistance.BackgroundTransparency = 0.950
- SearchDistance.BorderColor3 = Color3.fromRGB(0, 0, 0)
- SearchDistance.BorderSizePixel = 0
- SearchDistance.Position = UDim2.new(0, 0, 0.331618905, 0)
- SearchDistance.Size = UDim2.new(0, 137, 0, 19)
- SearchDistance.Font = Enum.Font.SourceSans
- SearchDistance.PlaceholderText = "Search Distance"
- SearchDistance.Text = "100"
- SearchDistance.TextColor3 = Color3.fromRGB(0, 0, 0)
- SearchDistance.TextScaled = true
- SearchDistance.TextSize = 14.000
- SearchDistance.TextWrapped = true
- InfoText.Name = "InfoText"
- InfoText.Parent = Frame
- InfoText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- InfoText.BorderColor3 = Color3.fromRGB(0, 0, 0)
- InfoText.BorderSizePixel = 0
- InfoText.Position = UDim2.new(0, 0, 0.0795454532, 0)
- InfoText.Size = UDim2.new(0, 137, 0, 36)
- InfoText.Font = Enum.Font.Gotham
- InfoText.TextColor3 = Color3.fromRGB(0, 0, 0)
- InfoText.TextScaled = true
- InfoText.TextSize = 14.000
- InfoText.TextWrapped = true
- InfoText.Text = "Start by holding a tool and pressing 'SelectTool'"
- WanderDistance.Name = "WanderDistance"
- WanderDistance.Parent = Frame
- WanderDistance.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- WanderDistance.BackgroundTransparency = 0.950
- WanderDistance.BorderColor3 = Color3.fromRGB(0, 0, 0)
- WanderDistance.BorderSizePixel = 0
- WanderDistance.Position = UDim2.new(0, 0, 0.439573467, 0)
- WanderDistance.Size = UDim2.new(0, 137, 0, 19)
- WanderDistance.Font = Enum.Font.SourceSans
- WanderDistance.PlaceholderText = "Wander Distance"
- WanderDistance.Text = "15"
- WanderDistance.TextColor3 = Color3.fromRGB(0, 0, 0)
- WanderDistance.TextScaled = true
- WanderDistance.TextSize = 14.000
- WanderDistance.TextWrapped = true
- SelectTool.Name = "SelectTool"
- SelectTool.Parent = Frame
- SelectTool.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- SelectTool.BorderColor3 = Color3.fromRGB(0, 0, 0)
- SelectTool.BorderSizePixel = 0
- SelectTool.Position = UDim2.new(0, 0, 0.835065663, 0)
- SelectTool.Size = UDim2.new(0.5, 0, 0.0456161499, 21)
- SelectTool.Style = Enum.ButtonStyle.RobloxRoundDefaultButton
- SelectTool.Font = Enum.Font.Gotham
- SelectTool.Text = "SelectTool"
- SelectTool.TextColor3 = Color3.fromRGB(0, 0, 0)
- SelectTool.TextSize = 13.000
- StartStopButton.Name = "StartStopButton"
- StartStopButton.Parent = Frame
- StartStopButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- StartStopButton.BorderColor3 = Color3.fromRGB(0, 0, 0)
- StartStopButton.BorderSizePixel = 0
- StartStopButton.Position = UDim2.new(0.496350378, 0, 0.835065663, 0)
- StartStopButton.Size = UDim2.new(0.5, 0, 0.0456161499, 21)
- StartStopButton.Style = Enum.ButtonStyle.RobloxRoundDefaultButton
- StartStopButton.Font = Enum.Font.Gotham
- StartStopButton.Text = "Start"
- StartStopButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- StartStopButton.TextSize = 25.000
- -- Scripts:
- local function REVV_fake_script() -- Frame.Functions
- local script = Instance.new('LocalScript', Frame)
- local plr = game.Players.LocalPlayer
- local char = plr.Character or plr.CharacterAdded:Wait()
- local hum = char:FindFirstChildWhichIsA("Humanoid")
- local rootpart:BasePart = char.PrimaryPart or char:FindFirstChild("HumanoidRootPart") or hum.RootPart
- local SearchDist = script.Parent:WaitForChild("SearchDistance")
- local WanderDist = script.Parent:WaitForChild("WanderDistance")
- local SelectTool = script.Parent:WaitForChild("SelectTool")
- local startstop = script.Parent:WaitForChild("StartStopButton")
- local label = script.Parent:WaitForChild("InfoText")
- local on = false
- local tool:Tool = nil
- local target = nil
- local targethum = nil
- local wandercooldown = false
- local teleport = false
- local off = {0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,2,3}
- local function GetNearestRoot()
- local nearestRoot = nil
- local nearestDistance = nil
- for i,v in pairs(game.Players:GetPlayers()) do
- if v.Character and v.Character:FindFirstChild("HumanoidRootPart") and v.Character.Humanoid.Health > 1 and v.Name ~= plr.Name then
- local distance = (v.Character.HumanoidRootPart.Position - rootpart.Position).Magnitude
- local numm = tonumber(SearchDist.Text or 15)
- if distance <= numm then
- nearestDistance = distance
- nearestRoot = v.Character.HumanoidRootPart
- targethum = v.Character:FindFirstChildWhichIsA("Humanoid")
- target = v.Character
- end
- end
- end
- return nearestRoot
- end
- local function EquipTool()
- if tool then
- hum:EquipTool(tool)
- end
- end
- local function UnequipTool()
- if char:FindFirstChildWhichIsA("Tool") then
- if char:FindFirstChildWhichIsA("Tool").Name == tool.Name then
- hum:UnequipTools()
- end
- end
- end
- local function CheckIfTargetIsDead()
- if not target then return end
- if target and targethum.Health <= 0 then
- return true
- end
- return false
- end
- local function Jump()
- hum.Jump = true
- end
- local alignOrientation1 = nil
- if not rootpart:FindFirstChild("ZALign") then
- local alignOrientation = Instance.new("AlignOrientation")
- alignOrientation.Parent = rootpart
- alignOrientation.Name = "ZALign"
- alignOrientation.MaxAngularVelocity = math.rad(2000)
- alignOrientation1 = alignOrientation
- local attachment = Instance.new("Attachment")
- attachment.Parent = rootpart
- attachment.Name = "AlignRotationRootPart"
- alignOrientation.Attachment0 = attachment
- else
- local alignOrientation = rootpart:FindFirstChild("ZALign")
- alignOrientation1 = alignOrientation
- alignOrientation.MaxAngularVelocity = math.rad(2000)
- if not rootpart:FindFirstChild("AlignRotationRootPart") then
- local attachment = Instance.new("Attachment")
- attachment.Parent = rootpart
- attachment.Name = "AlignRotationRootPart"
- alignOrientation.Attachment0 = attachment
- else
- local attachment = rootpart:FindFirstChild("AlignRotationRootPart")
- alignOrientation.Attachment0 = attachment
- end
- end
- local function updateOrientation()
- if target then
- alignOrientation1.Enabled = true
- local lookAtCFrame = CFrame.lookAt(rootpart.Position, target.PrimaryPart.Position+Vector3.new(0,off[math.random(1,#off)],0))
- alignOrientation1.CFrame = lookAtCFrame
- else
- alignOrientation1.Enabled = false
- end
- end
- function MoveToTarget(char, targetPart)
- local PathfindingService = game:GetService("PathfindingService")
- local humanoid = char:WaitForChild("Humanoid")
- local humanRootPart = char.PrimaryPart or char:FindFirstChild("HumanoidRootPart") or humanoid.RootPart or char:FindFirstChild("Head")
- local path = PathfindingService:CreatePath({
- AgentRadius = 2,
- AgentHeight = 5,
- AgentCanJump = true,
- AgentJumpHeight = 10,
- AgentMaxSlope = 45,
- })
- -- Compute the path to the target
- path:ComputeAsync(humanRootPart.Position, targetPart.CFrame.Position + targetPart.CFrame.LookVector +Vector3.new(off[math.random(1,#off)],-10,off[math.random(1,#off)])
- )
- local waypoints = path:GetWaypoints()
- -- Function to handle reaching waypoints
- local function onWaypointReached(waypointIndex)
- if waypointIndex < #waypoints then
- if waypoints[waypointIndex + 1].Action == Enum.PathWaypointAction.Jump then
- humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
- end
- humanoid:MoveTo(waypoints[waypointIndex + 1].Position)
- end
- end
- path.Blocked:Connect(Jump)
- if math.random(1,10) > 9 then
- hum.Jump = true
- end
- -- Connect an event to Humanoid's MoveToFinished event
- humanoid.MoveToFinished:Connect(function(reached)
- if reached then
- onWaypointReached(#waypoints)
- end
- end)
- -- Start moving to the first waypoint
- if #waypoints > 0 then
- humanoid:MoveTo(waypoints[1].Position)
- for i = 1, #waypoints - 1 do
- onWaypointReached(i)
- end
- end
- end
- local function KeepClickingUntilNoTool()
- coroutine.resume(coroutine.create(function()
- repeat
- if char:FindFirstChildWhichIsA("Tool") then
- if char:FindFirstChildWhichIsA("Tool").Name == tool.Name then
- tool:Activate()
- --mouse1click()
- end
- end
- task.wait(0.75)
- until
- not tool or tool == nil or hum.Health <= 0 or targethum == nil or target == nil
- end))
- end
- local function EquipToolIfTargetIsNear()
- if CheckIfTargetIsDead() == true then return end
- if (target.PrimaryPart.Position - rootpart.Position).Magnitude <= 5 then
- if not char:FindFirstChildWhichIsA("Tool") then
- EquipTool()
- end
- KeepClickingUntilNoTool()
- end
- end
- local function Wander()
- if wandercooldown ~= false then return end
- wandercooldown = true
- task.wait(math.random(1,7))
- wandercooldown = false
- end
- local function Teleport(targetroot)
- char:MoveTo(targetroot.Position)
- end
- local function Main()
- if GetNearestRoot() ~= nil then
- hum.Sit = false
- EquipToolIfTargetIsNear()
- updateOrientation()
- if teleport then
- Teleport(GetNearestRoot())
- else
- MoveToTarget(char, GetNearestRoot())
- end
- else
- Wander()
- end
- end
- local function SetLabel()
- if tool ~= nil then
- if on ~= false then
- label.Text = "Tool: "..tool.Name.." \n".."Enabled: true"
- else
- label.Text = "Tool: "..tool.Name.." \n".."Enabled: false"
- end
- else
- if on ~= false then
- label.Text = "Tool: nil \n".."Enabled: true"
- else
- label.Text = "Tool: nil \n".."Enabled: false"
- end
- end
- end
- SelectTool.Activated:Connect(function()
- if char:FindFirstChildWhichIsA("Tool") then
- tool = char:FindFirstChildWhichIsA("Tool")
- end
- end)
- startstop.Activated:Connect(function()
- on = not on
- end)
- hum.Died:Connect(function()
- plr.CharacterAdded:Connect(function()
- loadstring(game:HttpGet(('https://pastebin.com/raw/kXnhWMwc'),true))()
- end)
- end)
- while true do
- task.wait()
- SetLabel()
- if on ~= false then
- Main()
- end
- end
- end
- coroutine.wrap(REVV_fake_script)()
- local function WDEWP_fake_script() -- Frame.UIDrag
- local script = Instance.new('LocalScript', Frame)
- -- Made by Real_IceyDev (@lceyDex) --
- -- Simple UI dragger (PC Only/Any device that has a mouse) --
- local UIS = game:GetService('UserInputService')
- local frame = script.Parent
- local dragToggle = nil
- local dragSpeed = 0.25
- local dragStart = nil
- local startPos = nil
- local function updateInput(input)
- local delta = input.Position - dragStart
- local position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X,
- startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- game:GetService('TweenService'):Create(frame, TweenInfo.new(dragSpeed), {Position = position}):Play()
- end
- frame.InputBegan:Connect(function(input)
- if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then
- dragToggle = true
- dragStart = input.Position
- startPos = frame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragToggle = false
- end
- end)
- end
- end)
- UIS.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
- if dragToggle then
- updateInput(input)
- end
- end
- end)
- end
- coroutine.wrap(WDEWP_fake_script)()
Add Comment
Please, Sign In to add comment