-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.lua
More file actions
111 lines (109 loc) · 3.18 KB
/
Copy pathmain.lua
File metadata and controls
111 lines (109 loc) · 3.18 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
workspace[game.Players.LocalPlayer.Name].Archivable = true
local clonedchar = workspace[game.Players.LocalPlayer.Name]:Clone()
local orig = game.Players.LocalPlayer.Character
local root = orig.HumanoidRootPart
local invis = false
local mouse = game.Players.LocalPlayer:GetMouse()
clonedchar.Parent = workspace
game.Players.LocalPlayer.Character = orig
workspace.CurrentCamera.CameraSubject = clonedchar.Humanoid
local follow = true
local down = false
local descendants = clonedchar:GetDescendants()
game:GetService("RunService").Heartbeat:Connect(function()
clonedchar.Humanoid:Move(orig.Humanoid.MoveDirection)
clonedchar.Humanoid.Jump = orig.Humanoid.Jump
if invis then
clonedchar.HumanoidRootPart.CFrame += orig.Humanoid.MoveDirection
if orig.Humanoid.MoveDirection ~= Vector3.new(0,0,0) then
clonedchar.HumanoidRootPart.CFrame = CFrame.new(clonedchar.HumanoidRootPart.Position, clonedchar.HumanoidRootPart.Position + orig.Humanoid.MoveDirection)
end
if orig.Humanoid.Jump then
clonedchar.HumanoidRootPart.CFrame += Vector3.new(0,0.1,0)
end
if down then
clonedchar.HumanoidRootPart.CFrame += Vector3.new(0,-0.1,0)
end
end
end)
mouse.KeyDown:Connect(function(key)
if key == "2" then
down = true
end
end)
mouse.KeyUp:Connect(function(key)
if key == "2" then
down = false
end
end)
mouse.KeyDown:Connect(function(key)
if key == "x" then
if not invis then
invis = true
follow = false
spawn(function()
while true do
task.wait()
root.Velocity = Vector3.new(math.random(-50000,50000),math.random(0,500000),math.random(-950000,950000))
root.AssemblyAngularVelocity = Vector3.new(math.random(-950000,950000),math.random(0,950000),math.random(-950000,1000000))
root.CFrame = CFrame.new(Vector3.new(math.random(-500,500),5000,math.random(4900,5000)))
if not invis then
break
end
end
end)
else
invis = false
follow = true
end
end
end)
for i,v in pairs(descendants) do
if v:IsA("BasePart") then
v.Transparency = 0.7
v.Material = Enum.Material.Neon
end
end
game:GetService("RunService").Heartbeat:Connect(function()
clonedchar.Humanoid:ChangeState(Enum.HumanoidStateType.StrafingNoPhysics)
if clonedchar.Humanoid.Jump then
clonedchar.HumanoidRootPart.CFrame = clonedchar.HumanoidRootPart.CFrame + Vector3.new(0,1,0)
end
for i,v in pairs(descendants) do
if v:IsA("BasePart") then
v.CanCollide = false
end
end
end)
task.spawn(function() -- Swap pos
while true do
if not invis then
if follow then
root.CFrame = clonedchar.HumanoidRootPart.CFrame
end
root.Velocity = clonedchar.HumanoidRootPart.Velocity
root.AssemblyAngularVelocity = clonedchar.HumanoidRootPart.AssemblyAngularVelocity
root.AssemblyLinearVelocity = clonedchar.HumanoidRootPart.AssemblyLinearVelocity
orig.Humanoid:ChangeState(Enum.HumanoidStateType.StrafingNoPhysics)
for i,v in pairs(orig:GetDescendants()) do
if v:IsA("BasePart") then
v.CanCollide = false
end
end
end
task.wait()
end
end)
task.spawn(function() -- fake lag
while true do
if not invis then
root.Anchored = true
follow = false
task.wait(math.random(60,180)/130)
root.Anchored = false
follow = true
task.wait(.05)
end
task.wait()
end
end)