-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbitch.lua
More file actions
95 lines (77 loc) · 1.75 KB
/
Copy pathbitch.lua
File metadata and controls
95 lines (77 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
-- UI LIB
local library = loadstring(game:HttpGet("https://raw.githubusercontent.com/bloodball/-back-ups-for-libs/main/0x"))()
local w1 = library:Window("Candy / Gift TP")
-- SERVICES
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local root = char:WaitForChild("HumanoidRootPart")
-- SETTINGS
local offset = Vector3.new(0, 3, 0)
local nudge = Vector3.new(1.5, 0, 0)
local teleportDelay = 0.5
local enabled = false
print("[DEBUG] Teleporter loaded")
-- UTIL
local function getModelPart(model)
if model.PrimaryPart then
return model.PrimaryPart
end
for _, v in ipairs(model:GetDescendants()) do
if v:IsA("BasePart") then
return v
end
end
return nil
end
local function teleportToModel(model)
if not model or not model:IsA("Model") then return end
local part = getModelPart(model)
if not part then
print("[DEBUG] No BasePart in model:", model.Name)
return
end
print("[DEBUG] TP ->", model.Name)
-- teleport
root.CFrame = CFrame.new(part.Position + offset)
task.wait(0.1)
-- anti-stick nudge
root.CFrame = root.CFrame + nudge
task.wait(teleportDelay)
end
-- LOOP
task.spawn(function()
while true do
if enabled then
local candy = workspace:FindFirstChild("Candy")
if candy then
teleportToModel(candy)
end
local gift = workspace:FindFirstChild("Gift")
if gift then
teleportToModel(gift)
end
end
task.wait(0.5)
end
end)
-- UI TOGGLE
w1:Toggle(
"Enable Candy/Gift TP",
"cgtp",
false,
function(t)
enabled = t
print("[DEBUG] Teleporter enabled:", t)
end
)
w1:Button(
"Destroy GUI",
function()
for _, v in pairs(game.CoreGui:GetChildren()) do
if v:FindFirstChild("Top") then
v:Destroy()
end
end
end
)