Message (14)
Message (14)
getgenv().Rave = {
['Global'] = {
['Dead'] = true, -- Both lp and target
['Grabbed'] = true,
['Reload'] = true,
['Wall'] = true,
},
['Main'] = {
['Toggled'] = true,
['Threading'] = "RenderStepped",
['UpdateTarget'] = false,
['Prediction'] = 0.166,
['Bind'] = {
['Key'] = "C",
['Mode'] = "Toggle", -- Hold or Toggle
},
['Selected Part'] = {
['HitPart'] = "HumanoidRootPart",
['GetClosestPart'] = true,
},
['Properties'] = {
['Smoothness'] = {
['Factor'] = 1,
['Smoothness'] = 0.02,
},
},
},
['SilentAim'] = {
['Toggled'] = true,
['Prediction'] = 0.166,
['AntiFloorHit'] = true,
['Selected Part'] = {
['HitPart'] = "Head",
['GetClosestPart'] = true,
},
},
['Spin'] = {
['Enabled'] = true,
['Key'] = "V",
['Speed'] = 4900,
},
['Fov'] = {
['Threading'] = "Heartbeat",
['Shown'] = false,
['Color'] = Color3.new(255, 255, 255),
['Radius'] = 160,
},
}
if getgenv().Rave then
if getgenv().Rave.Fov.Connection then
getgenv().Rave.Fov.Connection:Disconnect()
end
if getgenv().Rave.LockConnection then
getgenv().Rave.LockConnection:Disconnect()
end
if getgenv().Rave.Circle then
getgenv().Rave.Circle:Remove()
end
end
-- // Services // --
local Players = game.Players;
local Local_Player = Players.LocalPlayer;
local Get_Mouse_Pos = Local_Player:GetMouse()
local rs = game:GetService"RunService";
local UserInputService = game:GetService"UserInputService";
local Current_Camera = workspace.CurrentCamera;
-- // Variables // --
local Rave = getgenv().Rave;
local Target = nil;
local SilTarget = nil;
local Toggle = false;
local arg = nil
-- // KO Check // --
local Death; Death = function(Plr)
local Dead = nil;
if (Plr and Plr.Character and Plr.Character:FindFirstChild("BodyEffects")) then
if (Plr.Character.BodyEffects:FindFirstChild("K.O")) then
Dead = Plr.Character.BodyEffects["K.O"].Value
elseif (Plr.Character.BodyEffects:FindFirstChild("KO")) then
Dead = Plr.Character.BodyEffects.KO.Value
end
end
return (Dead)
end
-- // KO Check // --
local SelfDeath; SelfDeath = function()
local Dead = nil;
if (Local_Player and Local_Player.Character and
Local_Player.Character:FindFirstChild("BodyEffects")) then
if (Local_Player.Character.BodyEffects:FindFirstChild("K.O")) then
Dead = Local_Player.Character.BodyEffects["K.O"].Value
elseif (Local_Player.Character.BodyEffects:FindFirstChild("KO")) then
Dead = Local_Player.Character.BodyEffects.KO.Value
end
end
return (Dead)
end
-- // Grabbed Check // --
local Grabbed; Grabbed = function(Plr)
local Grabbed = nil
if (Plr and Plr.Character) then
Grabbed = Plr.Character:FindFirstChild("GRABBING_CONSTRAINT") ~= nil
end
return (Grabbed)
end
-- // Reload Check // --
local Reloading; Reloading = function()
local Active = nil;
if (Local_Player and Local_Player.Character and
Local_Player.Character:FindFirstChild("BodyEffects")) then
if Local_Player.Character.BodyEffects:FindFirstChild("Reload") then
Active = Local_Player.Character.BodyEffects.Reload.Value
elseif Local_Player.Character.BodyEffects:FindFirstChild("Reloading") then
Active = Local_Player.Character.BodyEffects.Reloading.Value
end
end
return (Active)
end
-- // Checks // --
local Checks; Checks = function(Plr)
-- // KO Self Check // --
if (Rave.Global.Dead and SelfDeath()) then
return (false)
end
-- // KO Target Check // --
if (Rave.Global.Dead and Death(Plr)) then
return (false)
end
-- // Grabbed Check // --
if (Rave.Global.Grabbed and Grabbed(Plr)) then
return (false)
end
-- // Reloading Check // --
if (Rave.Global.Reload and Reloading()) then
return (false)
end
-- // Team Check // --
if (Rave.Global.Wall and Wall(Plr)) then
return (false)
end
print("Test 1")
-- // Keybind // --
UserInputService.InputBegan:Connect(function(input, Processed)
-- // Returns nil if it is currently processed // --
if (Processed) then
return (nil)
end
-- // Hold // --
UserInputService.InputEnded:Connect(function(input, Processed)
-- // Returns nil if it is currently processed // --
if (Processed) then
return (nil)
end
-- // Held down // --
if (input.KeyCode == Enum.KeyCode[Rave.Main.Bind.Key] and Rave.Main.Toggled and
Rave.Main.Bind.Mode == "Hold") then
Toggle = false
end
end)
local function GetClosestPart(Plr)
local MaxDistance = math.huge
local ClosestPart = nil
index.Activated:Connect(function()
if SilTarget and SilTarget.Character and Checks(SilTarget) then
local PredictedPos = nil
if Rave.SilentAim.AntiFloorHit then
PredictedPos = SilTarget.Character[Rave.SilentAim['Selected
Part'].HitPart].Position + SilTarget.Character[Rave.SilentAim['Selected
Part'].HitPart].Velocity * Vector3.new(Rave.SilentAim.Prediction,
Rave.SilentAim.Prediction / 2, Rave.SilentAim.Prediction)
else
PredictedPos = SilTarget.Character[Rave.SilentAim['Selected
Part'].HitPart].Position + SilTarget.Character[Rave.SilentAim['Selected
Part'].HitPart].Velocity * Rave.SilentAim.Prediction
end
game.ReplicatedStorage.MainEvent:FireServer(arg, PredictedPos)
end
end)
end
end
UserInputService.InputBegan:Connect(OnKeyPress)
local LastRenderTime = 0
local TotalRotation = 0
RunService.RenderStepped:Connect(RotateCamera)
end
print("Test 2")
-- // shit
local function Lock()
if Rave.Main.UpdateTarget then
if Toggle then
Target = GetClosestPlr();
SilTarget = GetClosestPlr2();
else
SilTarget = nil
Target = nil
end
end
if Target and Target.Character and Rave.Main.Toggled and Checks(Target) then
local PredictedPos = nil
if Rave.Main.AntiFloorHit then
PredictedPos = CFrame.new(Current_Camera.CFrame.Position,
Target.Character[Rave.Main['Selected Part'].HitPart].Position +
Target.Character[Rave.Main['Selected Part'].HitPart].Velocity *
Vector3.new(Rave.Main.Prediction, Rave.Main.Prediction / 2, Rave.Main.Prediction))
else
PredictedPos = CFrame.new(Current_Camera.CFrame.Position,
Target.Character[Rave.Main['Selected Part'].HitPart].Position +
Target.Character[Rave.Main['Selected Part'].HitPart].Velocity *
Rave.Main.Prediction)
end
Current_Camera.CFrame = Current_Camera.CFrame:Lerp(PredictedPos,
Rave.Main.Properties.Smoothness.Smoothness *
Rave.Main.Properties.Smoothness.Factor)
end
end
Rave.LockConnection = rs[Rave.Main.Threading]:Connect(Lock)
print("Test 3")