Загрузка данных


repeat wait() until game:IsLoaded()
local R = loadstring(game:HttpGet("https://raw.githubusercontent.com/SiriusSoftwareLtd/Rayfield/main/source.lua"))()
local W = R:CreateWindow({
    Name = "WScripts",
    KeySystem = true,
    KeySettings = {Key = {"KeyScript"}},
    ConfigurationSaving = {Enabled = false}
})
local T = W:CreateTab("MAIN", 0)
local S = W:CreateTab("Settings", 1)
local P = game.Players.LocalPlayer
local C, H, J, CN, CH, ESP, CON, OBJ, FLY, BV, BG
C = P.Character or P.CharacterAdded:Wait()
H = C:WaitForChild("Humanoid")
CON = {}
OBJ = {}
FLY = false

local function AC(c)
    if not CH or not c then return end
    for _, b in pairs(c:GetDescendants()) do
        if b:IsA("BasePart") and not b:FindFirstChildWhichIsA("Highlight") then
            local h = Instance.new("Highlight")
            h.Adornee = b
            h.FillColor = Color3.fromRGB(0, 255, 0)
            h.FillTransparency = 0.5
            h.OutlineColor = Color3.fromRGB(255, 255, 255)
            h.OutlineTransparency = 0
            h.Parent = b
            b:SetAttribute("H", true)
        end
    end
end

local function RC(c)
    if not c then return end
    for _, b in pairs(c:GetDescendants()) do
        if b:IsA("BasePart") and b:GetAttribute("H") then
            local h = b:FindFirstChildWhichIsA("Highlight")
            if h then h:Destroy() end
            b:SetAttribute("H", false)
        end
    end
end

local function UC()
    if CH then
        for _, p in pairs(game.Players:GetPlayers()) do
            if p ~= P and p.Character then AC(p.Character) end
        end
    else
        for _, p in pairs(game.Players:GetPlayers()) do
            if p ~= P and p.Character then RC(p.Character) end
        end
    end
end

local function CE(p)
    if not ESP or not p.Character then return end
    local c = p.Character
    local hrp = c:FindFirstChild("HumanoidRootPart") or c.PrimaryPart
    if not hrp then return end
    local b = Instance.new("BoxHandleAdornment")
    b.Adornee = hrp
    b.Size = Vector3.new(4, 5.5, 4)
    b.AlwaysOnTop = true
    b.Color3 = Color3.fromRGB(255, 50, 50)
    b.Transparency = 0.4
    b.Parent = hrp
    local l = Instance.new("LineHandleAdornment")
    l.Adornee = hrp
    l.Length = 6
    l.Thickness = 0.1
    l.Color3 = Color3.fromRGB(255, 255, 255)
    l.Transparency = 0.3
    l.Parent = hrp
    local t = Instance.new("BillboardGui")
    t.Adornee = hrp
    t.Size = UDim2.new(0, 100, 0, 25)
    t.StudsOffset = Vector3.new(0, 3.5, 0)
    t.AlwaysOnTop = true
    local tl = Instance.new("TextLabel")
    tl.Size = UDim2.new(1, 0, 1, 0)
    tl.BackgroundTransparency = 1
    tl.TextColor3 = Color3.fromRGB(255, 255, 255)
    tl.TextScaled = true
    tl.Text = p.Name
    tl.Parent = t
    t.Parent = hrp
    table.insert(OBJ, b)
    table.insert(OBJ, l)
    table.insert(OBJ, t)
end

local function RE()
    for _, o in pairs(OBJ) do
        if o then o:Destroy() end
    end
    OBJ = {}
    if ESP then
        for _, p in pairs(game.Players:GetPlayers()) do
            if p ~= P then CE(p) end
        end
    end
end

local function StartFly()
    local char = P.Character
    if not char then return end
    local hrp = char:FindFirstChild("HumanoidRootPart")
    if not hrp then return end
    FLY = true
    H.PlatformStand = true
    BG = Instance.new("BodyGyro")
    BG.P = 1e4
    BG.MaxTorque = Vector3.new(1e5, 1e5, 1e5)
    BG.CFrame = hrp.CFrame
    BG.Parent = hrp
    BV = Instance.new("BodyVelocity")
    BV.Velocity = Vector3.new(0, 0, 0)
    BV.MaxForce = Vector3.new(1e5, 1e5, 1e5)
    BV.Parent = hrp
    local UIS = game:GetService("UserInputService")
    game:GetService("RunService").Heartbeat:Connect(function()
        if not FLY then return end
        local v = Vector3.new(0, 0, 0)
        if UIS:IsKeyDown(Enum.KeyCode.W) then v = v + hrp.CFrame.LookVector * 50 end
        if UIS:IsKeyDown(Enum.KeyCode.S) then v = v - hrp.CFrame.LookVector * 50 end
        if UIS:IsKeyDown(Enum.KeyCode.A) then v = v - hrp.CFrame.RightVector * 50 end
        if UIS:IsKeyDown(Enum.KeyCode.D) then v = v + hrp.CFrame.RightVector * 50 end
        if UIS:IsKeyDown(Enum.KeyCode.Space) then v = v + Vector3.new(0, 50, 0) end
        if UIS:IsKeyDown(Enum.KeyCode.LeftShift) then v = v + Vector3.new(0, -50, 0) end
        BV.Velocity = v
        BG.CFrame = hrp.CFrame
    end)
end

local function StopFly()
    FLY = false
    H.PlatformStand = false
    if BG then BG:Destroy() BG = nil end
    if BV then BV:Destroy() BV = nil end
end

T:CreateToggle({
    Name = "Inf Jump",
    Flag = "infj",
    Callback = function(v)
        if v then
            J = game:GetService("UserInputService").JumpRequest:Connect(function()
                H:ChangeState(Enum.HumanoidStateType.Jumping)
            end)
        else
            if J then J:Disconnect() J = nil end
        end
    end
})

T:CreateSlider({
    Name = "Speed",
    Range = {16, 100},
    Increment = 1,
    CurrentValue = 16,
    Flag = "spd",
    Callback = function(v)
        if H then H.WalkSpeed = v end
    end
})

T:CreateToggle({
    Name = "Noclip",
    Flag = "nocl",
    Callback = function(v)
        if v then
            CN = game:GetService("RunService").Stepped:Connect(function()
                if C then
                    for _, p in pairs(C:GetDescendants()) do
                        if p:IsA("BasePart") then p.CanCollide = false end
                    end
                end
            end)
        else
            if CN then CN:Disconnect() CN = nil end
            if C then
                for _, p in pairs(C:GetDescendants()) do
                    if p:IsA("BasePart") then p.CanCollide = true end
                end
            end
        end
    end
})

T:CreateToggle({
    Name = "Fly",
    Flag = "fly",
    Callback = function(v)
        if v then StartFly() else StopFly() end
    end
})

T:CreateToggle({
    Name = "Chams",
    Flag = "cham",
    Callback = function(v)
        CH = v
        UC()
        if v then
            for _, p in pairs(game.Players:GetPlayers()) do
                if p ~= P then
                    local conn = p.CharacterAdded:Connect(function(c)
                        wait(0.5)
                        if CH and p.Character then AC(p.Character) end
                    end)
                    CON[p] = conn
                end
            end
        else
            for _, conn in pairs(CON) do
                if conn then conn:Disconnect() end
            end
            CON = {}
        end
    end
})

T:CreateToggle({
    Name = "ESP Box+Line",
    Flag = "esp",
    Callback = function(v)
        ESP = v
        RE()
        if v then
            for _, p in pairs(game.Players:GetPlayers()) do
                if p ~= P then
                    local conn = p.CharacterAdded:Connect(function(c)
                        wait(0.5)
                        if ESP and p.Character then CE(p) end
                    end)
                    table.insert(CON, conn)
                end
            end
        end
    end
})

S:CreateButton({
    Name = "Refresh Chams",
    Callback = function()
        if CH then UC() end
    end
})

S:CreateButton({
    Name = "Refresh ESP",
    Callback = function()
        RE()
    end
})

P.CharacterAdded:Connect(function(c)
    C = c
    H = C:WaitForChild("Humanoid")
    wait(0.5)
    H.WalkSpeed = R:GetValue("spd") or 16
    if R:GetValue("nocl") then
        CN = game:GetService("RunService").Stepped:Connect(function()
            for _, p in pairs(C:GetDescendants()) do
                if p:IsA("BasePart") then p.CanCollide = false end
            end
        end)
    end
    if R:GetValue("cham") then
        for _, p in pairs(game.Players:GetPlayers()) do
            if p ~= P and p.Character then AC(p.Character) end
        end
    end
    if R:GetValue("esp") then
        for _, p in pairs(game.Players:GetPlayers()) do
            if p ~= P and p.Character then CE(p) end
        end
    end
    if R:GetValue("fly") then StartFly() end
end)

R:Notify({Title = "SWILL", Content = "Loaded | Key:KeyScript | Note:W Key System", Duration = 3})