Not a member of GistPad yet?
Sign Up,
it unlocks many cool features!
- local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local UIS = game:GetService("UserInputService")
- local Workspace = game:GetService("Workspace")
- local player = Players.LocalPlayer
- local Camera = Workspace.CurrentCamera
- --------------------------------------------------
- -- SETTINGS
- --------------------------------------------------
- local espEnabled = false
- local aimEnabled = false
- local autoShootEnabled = false
- local rainbowESP = false
- local clickAim = false
- local triggerBot = false
- local espColor = Color3.fromRGB(255, 0, 0)
- local rainbowSpeed = 0.02
- local smoothness = 0.15
- local maxDistance = 150
- local aimPart = "Head"
- local shootDelay = 0.1
- local espObjects = {}
- local lastShotTime = 0
- --------------------------------------------------
- -- UI WINDOW
- --------------------------------------------------
- local Window = Rayfield:CreateWindow({
- Name = "Cool Studios",
- Icon = 11767039004,
- LoadingTitle = "Cool Studios",
- LoadingSubtitle = "System Loading...",
- Theme = "Amber",
- ToggleUIKeybind = "K",
- })
- local ESPTab = Window:CreateTab("ESP", 11767039004)
- local AimTab = Window:CreateTab("Aim Assist", 11767039004)
- --------------------------------------------------
- -- RAINBOW
- --------------------------------------------------
- local function getRainbowColor()
- return Color3.fromHSV(tick() * rainbowSpeed % 1, 1, 1)
- end
- --------------------------------------------------
- -- VISIBILITY CHECK (🔥 WALL CHECK)
- --------------------------------------------------
- local function isVisible(targetPart)
- local origin = Camera.CFrame.Position
- local direction = (targetPart.Position - origin)
- local params = RaycastParams.new()
- params.FilterType = Enum.RaycastFilterType.Blacklist
- params.FilterDescendantsInstances = {player.Character}
- local result = Workspace:Raycast(origin, direction, params)
- if result and result.Instance then
- return result.Instance:IsDescendantOf(targetPart.Parent)
- end
- return true
- end
- --------------------------------------------------
- -- ESP UI
- --------------------------------------------------
- ESPTab:CreateToggle({
- Name = "Enable ESP",
- Callback = function(Value)
- espEnabled = Value
- if not Value then
- for _, obj in pairs(espObjects) do
- if obj then obj:Destroy() end
- end
- espObjects = {}
- end
- end,
- })
- ESPTab:CreateToggle({
- Name = "Rainbow ESP",
- Callback = function(Value)
- rainbowESP = Value
- end,
- })
- ESPTab:CreateColorPicker({
- Name = "ESP Color",
- Color = espColor,
- Callback = function(Value)
- espColor = Value
- end,
- })
- --------------------------------------------------
- -- AIM UI
- --------------------------------------------------
- AimTab:CreateToggle({
- Name = "Enable Aim Assist",
- Callback = function(Value)
- aimEnabled = Value
- end,
- })
- AimTab:CreateToggle({
- Name = "Only While Clicking",
- Callback = function(Value)
- clickAim = Value
- end,
- })
- AimTab:CreateToggle({
- Name = "Auto Shoot",
- Callback = function(Value)
- autoShootEnabled = Value
- end,
- })
- AimTab:CreateToggle({
- Name = "Trigger Bot",
- Callback = function(Value)
- triggerBot = Value
- end,
- })
- AimTab:CreateSlider({
- Name = "Smoothness",
- Range = {0.05, 1},
- Increment = 0.05,
- CurrentValue = smoothness,
- Callback = function(Value)
- smoothness = Value
- end,
- })
- AimTab:CreateSlider({
- Name = "Max Distance",
- Range = {50, 300},
- Increment = 10,
- CurrentValue = maxDistance,
- Callback = function(Value)
- maxDistance = Value
- end,
- })
- AimTab:CreateSlider({
- Name = "Shoot Delay",
- Range = {0.05, 0.5},
- Increment = 0.05,
- CurrentValue = shootDelay,
- Callback = function(Value)
- shootDelay = Value
- end,
- })
- AimTab:CreateDropdown({
- Name = "Aim Part",
- Options = {"Head", "Torso", "HumanoidRootPart", "UpperTorso", "LowerTorso"},
- CurrentOption = aimPart,
- Callback = function(Value)
- aimPart = Value
- end,
- })
- --------------------------------------------------
- -- ESP SYSTEM
- --------------------------------------------------
- local function applyESP(plr)
- if plr == player then return end
- if not plr.Character then return end
- if espObjects[plr] then
- espObjects[plr]:Destroy()
- end
- local h = Instance.new("Highlight")
- if rainbowESP then
- local c = getRainbowColor()
- h.FillColor = c
- h.OutlineColor = c
- else
- h.FillColor = espColor
- h.OutlineColor = espColor
- end
- h.FillTransparency = 0.5
- h.OutlineTransparency = 0
- h.Adornee = plr.Character
- h.Parent = plr.Character
- espObjects[plr] = h
- end
- --------------------------------------------------
- -- AIM SYSTEM (🔥 WITH WALL CHECK)
- --------------------------------------------------
- local function getClosestTarget()
- if not player.Character then return nil end
- local root = player.Character:FindFirstChild("HumanoidRootPart")
- if not root then return nil end
- local closestPlayer = nil
- local closestPart = nil
- local shortest = math.huge
- for _, p in ipairs(Players:GetPlayers()) do
- if p ~= player and p.Character then
- local targetRoot = p.Character:FindFirstChild("HumanoidRootPart")
- local targetAimPart = p.Character:FindFirstChild(aimPart)
- if targetRoot and targetAimPart then
- local dist = (root.Position - targetRoot.Position).Magnitude
- -- DISTANCE + WALL CHECK
- if dist <= maxDistance and isVisible(targetAimPart) then
- if dist < shortest then
- shortest = dist
- closestPlayer = p
- closestPart = targetAimPart
- end
- end
- end
- end
- end
- return closestPlayer, closestPart
- end
- --------------------------------------------------
- -- AUTO SHOOT SYSTEM
- --------------------------------------------------
- local function autoShoot(targetPlayer, targetPart)
- if not autoShootEnabled or not targetPlayer or not targetPart then return end
- local currentTime = tick()
- if currentTime - lastShotTime < shootDelay then return end
- -- Schießen mit Mausklick-Simulation
- mouse1press()
- task.wait(0.05)
- mouse1release()
- lastShotTime = currentTime
- -- Versuche verschiedene Attack-Methoden für Rivals
- local character = player.Character
- if character and character:FindFirstChildOfClass("Tool") then
- local Tool = character:FindFirstChildOfClass("Tool")
- -- RemoteEvent-basierte Waffen
- local remoteEvent = Tool:FindFirstChild("RemoteEvent")
- if remoteEvent then
- remoteEvent:FireServer("Fire", targetPart.Position)
- return
- end
- -- RemoteFunction-basierte Waffen
- local remoteFunction = Tool:FindFirstChild("RemoteFunction")
- if remoteFunction then
- remoteFunction:InvokeServer("Fire", targetPart.Position)
- return
- end
- -- Standard Attack (Tool Activate)
- Tool:Activate()
- end
- -- Fallback: Direkter Damage auf Humanoid
- if targetPlayer.Character and targetPlayer.Character:FindFirstChild("Humanoid") then
- local humanoid = targetPlayer.Character.Humanoid
- humanoid:TakeDamage(25)
- end
- end
- --------------------------------------------------
- -- TRIGGER BOT SYSTEM
- --------------------------------------------------
- local function triggerBotCheck()
- if not triggerBot then return end
- local currentTime = tick()
- if currentTime - lastShotTime < shootDelay then return end
- -- Raycast für TriggerBot
- local rayOrigin = Camera.CFrame.Position
- local rayDirection = Camera.CFrame.LookVector * maxDistance
- local raycastParams = RaycastParams.new()
- raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
- raycastParams.FilterDescendantsInstances = {player.Character}
- local rayResult = Workspace:Raycast(rayOrigin, rayDirection, raycastParams)
- if rayResult and rayResult.Instance then
- local hitPart = rayResult.Instance
- local hitPlayer = Players:GetPlayerFromCharacter(hitPart.Parent)
- if hitPlayer and hitPlayer ~= player then
- -- Auto-Shoot wenn auf Gegner gezielt wird
- mouse1press()
- task.wait(0.05)
- mouse1release()
- lastShotTime = currentTime
- -- Attack-Methoden wie oben
- if player.Character and player.Character:FindFirstChildOfClass("Tool") then
- local Tool = player.Character:FindFirstChildOfClass("Tool")
- Tool:Activate()
- end
- end
- end
- end
- --------------------------------------------------
- -- AIM LOOP
- --------------------------------------------------
- RunService.RenderStepped:Connect(function()
- -- TriggerBot Check
- triggerBotCheck()
- if not aimEnabled then return end
- -- CLICK CHECK
- if clickAim and not UIS:IsMouseButtonPressed(Enum.UserInputType.MouseButton2) then
- return
- end
- local targetPlayer, targetPart = getClosestTarget()
- if not targetPart then return end
- local camPos = Camera.CFrame.Position
- local goal = CFrame.new(camPos, targetPart.Position)
- Camera.CFrame = Camera.CFrame:Lerp(goal, smoothness)
- -- Auto-Shoot nach Aiming
- autoShoot(targetPlayer, targetPart)
- end)
- --------------------------------------------------
- -- ESP LOOP
- --------------------------------------------------
- task.spawn(function()
- while true do
- task.wait(0.1)
- if espEnabled then
- for _, plr in ipairs(Players:GetPlayers()) do
- if plr ~= player then
- applyESP(plr)
- end
- end
- end
- end
- end)
- print("Rivals Combat Script mit Rayfield UI geladen!")
- print("Auto-Shoot, TriggerBot, Aim Assist und ESP aktiviert")
RAW Paste Data
Copied
