Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- local gui = Instance.new('ScreenGui')
- gui.Parent = plr.PlayerGui
- gui.ResetOnSpawn = false
- local frame = Instance.new('Frame')
- frame.Parent = gui
- frame.Style = Enum.FrameStyle.DropShadow
- frame.Size = UDim2.new(1, 0, 0.125, 0)
- frame.Position = UDim2.new(0, 0, 0.675, 0)
- local close_button = Instance.new('TextButton')
- close_button.Parent = frame
- close_button.Style = Enum.ButtonStyle.RobloxButtonDefault
- close_button.TextColor3 = Color3.new(255, 0, 0)
- close_button.TextScaled = true
- close_button.Text = '<'
- close_button.Size = UDim2.new(0.02, 0, 1, 0)
- close_button.Position = UDim2.new(0.98, 0, 0, 0)
- local current = 0
- close_button.MouseButton1Click:Connect(function()
- if current == 0 then
- frame.Position = UDim2.new(-0.97, 0, 0.675, 0)
- close_button.Text = '>'
- current = 1
- else
- frame.Position = UDim2.new(0, 0, 0.675, 0)
- close_button.Text = '<'
- current = 0
- end
- end)
- function check_for_tools()
- local to_return = {}
- for _, v in pairs(game.Workspace:GetChildren()) do
- if v.ClassName == 'Tool' and v:FindFirstChild('Handle') then
- to_return[#to_return + 1] = v
- end
- end
- return to_return
- end
- local cfr_button = Instance.new('TextButton')
- cfr_button.Parent = frame
- cfr_button.Style = Enum.ButtonStyle.RobloxButtonDefault
- cfr_button.Size = UDim2.new(0.125, 0, 0.45, 0)
- cfr_button.TextColor3 = Color3.new(255, 0, 0)
- cfr_button.Text = 'Check for tools.'
- local whitelist = {cfr_button}
- function check_if_in(item, tablee)
- for _, v in pairs(tablee) do
- if v == item then
- return true
- end
- end
- return false
- end
- cfr_button.MouseButton1Click:Connect(function()
- for _, v in pairs(frame:GetChildren()) do
- if not check_if_in(v, whitelist) then
- v:Remove()
- end
- end
- local current_tools = check_for_tools()
- local current_shift = 0
- for k, v in pairs(current_tools) do
- local button = cfr_button:Clone()
- button.Parent = frame
- button.Position = UDim2.new(current_shift, 0, -0.5, 0)
- button.Text = current_tools[k].Name
- button.MouseButton1Click:Connect(function()
- current_tools[k].Handle.Position = plr.Character.Head.Position
- button:Remove()
- end)
- current_shift = current_shift + 0.125
- end
- end)
- local limit = 500
- function linear_move(where, amount)
- local char = plr.Character
- local root = char.HumanoidRootPart.Position
- if where == 'X' then
- char:MoveTo(Vector3.new(amount, root.Y, root.Z))
- end
- if where == 'Y' then
- char:MoveTo(Vector3.new(root.X, amount, root.Z))
- end
- if where == 'Z' then
- char:MoveTo(Vector3.new(root.X, root.Y, amount))
- end
- local diff = math.abs(math.abs(root[where]) - math.abs(amount))
- end
- function safe_move(where, amount)
- local char = plr.Character
- local root = char.HumanoidRootPart
- local temp_pos = root.Position
- local mult = 1
- if amount <= 0 then
- mult = -1
- end
- local diff = math.abs(math.abs(temp_pos[where]) - math.abs(amount))
- if diff <= limit then
- linear_move(where, amount)
- else
- local count = 1
- while diff > limit do
- temp_pos = root.Position
- local group = Instance.new('Model')
- group.Parent = game.Workspace
- local part_one = Instance.new('Part')
- part_one.Size = Vector3.new(4, 1, 4)
- part_one.Position = temp_pos + Vector3.new(0, -2, 0)
- part_one.Anchored = true
- part_one.Parent = group
- local part_two = part_one:Clone()
- part_two.BrickColor = BrickColor.Green()
- part_two.Position = part_two.Position + Vector3.new(0, 0, -4)
- part_two.Parent = group
- local working = true
- part_two.Touched:Connect(function(hit)
- if hit.Parent:FindFirstChild('Humanoid') then
- working = false
- end
- end)
- while working do
- wait()
- end
- group:Remove()
- linear_move(where, limit * mult * count)
- diff = math.abs(math.abs(temp_pos[where]) - math.abs(amount))
- count = count + 1
- end
- linear_move(where, amount)
- end
- end
- function move_to(location)
- local char = plr.Character
- local root = char.HumanoidRootPart
- safe_move('X', location.X)
- safe_move('Y', location.Y)
- safe_move('Z', location.Z)
- end
- local teleports = {
- ['starter island'] = Vector3.new(39, 5, 494),
- ['orange town'] = Vector3.new(-4216, 6, 1331)
- }
- local teleports_frame = Instance.new('Frame')
- teleports_frame.Parent = frame
- teleports_frame.Size = UDim2.new(0.5, 0, 1, 0)
- teleports_frame.Style = Enum.FrameStyle.DropShadow
- teleports_frame.Position = UDim2.new(0.48, 0, 0, 0)
- whitelist[#whitelist + 1] = teleports_frame
- local current = UDim2.new(0, 0, 0, 0)
- for k, v in pairs(teleports) do
- local button = Instance.new('TextButton')
- button.Parent = teleports_frame
- button.Size = UDim2.new(0.125, 0, 0.45, 0)
- button.Position = current
- button.Style = Enum.ButtonStyle.RobloxButtonDefault
- button.Text = k
- button.TextScaled = true
- button.TextColor3 = Color3.new(255, 0, 0)
- button.MouseButton1Click:Connect(function()
- move_to(v)
- end)
- current = UDim2.new(current.X.Scale + 0.125, 0, 0, 0)
- if current.X.Scale >= 1 then
- current = UDim2.new(0, 0, current.Y.Scale + 0.5, 0)
- end
- end
- local teleport_input = Instance.new('TextBox')
- teleport_input.BackgroundColor3 = Color3.new(0, 0, 0)
- teleport_input.TextScaled = true
- teleport_input.Size = UDim2.new(0.125, 0, 0.25, 0)
- teleport_input.TextColor3 = Color3.new(255, 0, 0)
- teleport_input.Position = UDim2.new(0.35, 0, 0, 0)
- teleport_input.Parent = frame
- teleport_input.Text = ''
- whitelist[#whitelist + 1] = teleport_input
- whitelist[#whitelist + 1] = close_button
- local teleport_confirm = Instance.new('TextButton')
- teleport_confirm.Style = Enum.ButtonStyle.RobloxButtonDefault
- teleport_confirm.TextScaled = true
- teleport_confirm.Size = UDim2.new(0.125, 0, 0.25, 0)
- teleport_confirm.TextColor3 = Color3.new(255, 0, 0)
- teleport_confirm.Position = UDim2.new(0.35, 0, 0.3, 0)
- teleport_confirm.Parent = frame
- teleport_confirm.Text = 'TP'
- whitelist[#whitelist + 1] = teleport_confirm
- teleport_confirm.MouseButton1Click:Connect(function()
- local raw = teleport_input.Text
- local cord_x = string.sub(raw, 1, string.find(raw, ';') - 1)
- local wth_x = string.sub(raw, string.find(raw, ';') + 1)
- local cord_y = string.sub(wth_x, 1, string.find(wth_x, ';') - 1)
- local cord_z = string.sub(wth_x, string.find(wth_x, ';') + 1)
- local cords = Vector3.new(cord_x, cord_y, cord_z)
- move_to(cords)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement