-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTWR.lua
More file actions
159 lines (142 loc) · 7.04 KB
/
TWR.lua
File metadata and controls
159 lines (142 loc) · 7.04 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local PlayerService = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local Camera = Workspace.CurrentCamera
local LocalPlayer = PlayerService.LocalPlayer
--local FXModule = nil
--local Functions = nil
--[[for Index, Value in pairs(getgc(true)) do
if type(Value) == "table" then
if rawget(Value, "ViewArmor") then
FXModule = Value
--elseif rawget(Value, "DisableUpperVisuals") then
--Functions = Value
end
end
end]]
--local XRay = getupvalue(FXModule.xray, 2)
--local proceedArmor = getupvalue(FXModule.ViewArmor, 7)
local Window = Parvus.Utilities.UI:Window({
Name = ("Parvus Hub %s %s"):format(utf8.char(8212), Parvus.Game.Name),
Position = UDim2.new(0.5, -173 * 3, 0.5, -173), Size = UDim2.new(0, 346, 0, 346)
}) do
local VisualsSection = Parvus.Utilities:ESPSection(Window, "Visuals", "ESP/Player", true, true, false, false, true, false) do
VisualsSection:Colorpicker({Name = "Ally Color", Flag = "ESP/Player/Ally", Value = {0.3333333432674408, 0.6666666269302368, 1, 0, false}})
VisualsSection:Colorpicker({Name = "Enemy Color", Flag = "ESP/Player/Enemy", Value = {1, 0.6666666269302368, 1, 0, false}})
VisualsSection:Toggle({Name = "Team Check", Flag = "ESP/Player/TeamCheck", Value = true})
VisualsSection:Toggle({Name = "Use Team Color", Flag = "ESP/Player/TeamColor", Value = false})
VisualsSection:Toggle({Name = "Distance Check", Flag = "ESP/Player/DistanceCheck", Value = false})
VisualsSection:Slider({Name = "Distance", Flag = "ESP/Player/Distance", Min = 25, Max = 1000, Value = 250, Unit = "studs"})
end
--[[local MiscTab = Window:Tab({Name = "Miscellaneous"}) do
local FlySection = MiscTab:Section({Name = "Fly", Side = "Left"}) do
FlySection:Toggle({Name = "Enabled", Flag = "ST/Fly/Enabled", Value = false}):Keybind()
FlySection:Toggle({Name = "Attach To Camera", Flag = "ST/Fly/Camera", Value = true})
FlySection:Slider({Name = "Speed", Flag = "ST/Fly/Speed", Min = 100, Max = 500, Value = 100})
end
local MiscSection = MiscTab:Section({Name = "Other", Side = "Right"}) do
MiscSection:Toggle({Name = "XRay", Flag = "ST/XRay", Value = false, Callback = function(Bool)
local NumBool = Bool and 1 or 0
for Index, Child in pairs(Workspace:GetChildren()) do
if Child:FindFirstChild("Owner") and
Child.Owner.Value ~= LocalPlayer.Name
and Child.Alive.Value then
proceedArmor(Child, NumBool, 0)
--FXModule.ViewArmor(Child, NumBool, 0)
--XRay(Child.Main.Hitboxes, Bool, 1)
--Functions.DisableUpperVisuals(Child)
end
end
end}):Keybind()
end
end]] Parvus.Utilities:SettingsSection(Window, "RightShift", false)
end Parvus.Utilities.InitAutoLoad(Window)
Parvus.Utilities:SetupWatermark(Window)
Parvus.Utilities.Drawing.SetupCursor(Window)
Parvus.Utilities.Drawing.SetupCrosshair(Window.Flags)
-- Fly Logic
--[[local XZ, YPlus, YMinus = Vector3.new(1, 0, 1), Vector3.new(0, 1, 0), Vector3.new(0, -1, 0)
local function FixUnit(Vector) if Vector.Magnitude == 0 then return Vector3.zero end return Vector.Unit end
local function FlatCameraVector(CameraCF) return CameraCF.LookVector * XZ, CameraCF.RightVector * XZ end
local function InputToVelocity() local LookVector, RightVector = FlatCameraVector(Camera.CFrame)
local Forward = UserInputService:IsKeyDown(Enum.KeyCode.W) and LookVector or Vector3.zero
local Backward = UserInputService:IsKeyDown(Enum.KeyCode.S) and -LookVector or Vector3.zero
local Left = UserInputService:IsKeyDown(Enum.KeyCode.A) and -RightVector or Vector3.zero
local Right = UserInputService:IsKeyDown(Enum.KeyCode.D) and RightVector or Vector3.zero
local Up = UserInputService:IsKeyDown(Enum.KeyCode.Space) and YPlus or Vector3.zero
local Down = UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) and YMinus or Vector3.zero
return FixUnit(Forward + Backward + Left + Right + Up + Down)
end]]
--[[local function GetPlayerTank(Player)
local Char = Player:WaitForChild("Char")
if not Char then return end
if not Char.Value then return end
return Char.Value.Parent.Parent.Parent
end
local function PlayerFly(Enabled, Speed, EnableCamera)
if not Enabled then return end
local LPTank = GetPlayerTank(LocalPlayer)
if LPTank and LPTank.PrimaryPart then
LPTank.PrimaryPart.AssemblyLinearVelocity = Parvus.Utilities.MovementToDirection() * Speed
if not EnableCamera then return end
LPTank.PrimaryPart.CFrame = LPTank.PrimaryPart.CFrame * Camera.CFrame.Rotation
--LPTank:PivotTo(CFrame.new(LPTank:GetPivot().Position) * Camera.CFrame.Rotation)
end
end]]
--[[local OldNamecall = nil
OldNamecall = hookmetamethod(game, "__namecall", function(Self, ...)
local Method, Args = getnamecallmethod(), {...}
if Method == "FireServer" then
if Self.Name == "XEvent" then
return
end
elseif Method == "addItem" then
if Args[1] == BodyVelocity
or Args[1] == BodyGyro then
return
end
end
return OldNamecall(Self, ...)
end)]]
--[[Parvus.Utilities.NewThreadLoop(0, function()
PlayerFly(
Window.Flags["ST/Fly/Enabled"],
Window.Flags["ST/Fly/Speed"],
Window.Flags["ST/Fly/Camera"]
)
end)]]
--[[for Index, Child in pairs(Workspace:GetChildren()) do
if not Window.Flags["ST/XRay"] then continue end
if Child:FindFirstChild("Owner") and
Child.Owner.Value ~= LocalPlayer.Name
and Child.Alive.Value then
proceedArmor(Child, 1, 0)
--FXModule.ViewArmor(Child, 1, 0)
--XRay(Child.Main.Hitboxes, true, 1)
--Functions.DisableUpperVisuals(Child)
end
end
Workspace.ChildAdded:Connect(function(Child)
if not Window.Flags["ST/XRay"] then return end
task.wait(0.5) if Child:FindFirstChild("Owner") and
Child.Owner.Value ~= LocalPlayer.Name then
proceedArmor(Child, 1, 0)
--FXModule.ViewArmor(Child, 1, 0)
--XRay(Child.Main.Hitboxes, true, 1)
--Functions.DisableUpperVisuals(Child)
end
end)]]
Workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function()
Camera = Workspace.CurrentCamera
end)
for Index, Player in pairs(PlayerService:GetPlayers()) do
if Player == LocalPlayer then continue end
Parvus.Utilities.Drawing:AddESP(Player, "Player", "ESP/Player", Window.Flags)
end
PlayerService.PlayerAdded:Connect(function(Player)
Parvus.Utilities.Drawing:AddESP(Player, "Player", "ESP/Player", Window.Flags)
end)
PlayerService.PlayerRemoving:Connect(function(Player)
Parvus.Utilities.Drawing:RemoveESP(Player)
end)