Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if not game:IsLoaded() then game.Loaded:Wait() end
- -- Caricamento Rayfield Istantaneo
- local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
- local Window = Rayfield:CreateWindow({
- Name = "RAYTREXFIELD by Trexhacker",
- LoadingTitle = "RAYTREXFIELD by Trexhacker",
- LoadingSubtitle = "by Trexhacker",
- ConfigurationSaving = { Enabled = false },
- KeySystem = false,
- HideIntroduction = true
- })
- -- Force Pure Black Background across Rayfield Elements
- task.spawn(function()
- while task.wait(0.1) do
- local gui = game:GetService("CoreGui"):FindFirstChild("Rayfield") or game:GetService("Players").LocalPlayer:FindFirstChild("PlayerGui"):FindFirstChild("Rayfield")
- if gui then
- local main = gui:FindFirstChild("Main")
- if main then
- main.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- for _, obj in ipairs(main:GetDescendants()) do
- if obj:IsA("Frame") and obj.Name == "Background" then
- obj.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- end
- end
- break
- end
- end
- end
- end)
- -- Tabs
- local TabMovement = Window:CreateTab("player", 4483362458)
- local TabVisuals = Window:CreateTab("Visuals", 4483362458)
- local TabOther = Window:CreateTab("Other", 4483362458)
- -- Roblox Services
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local UserInputService = game:GetService("UserInputService")
- local CoreGui = game:GetService("CoreGui")
- local LocalPlayer = Players.LocalPlayer
- local Camera = workspace.CurrentCamera
- -- State Variables
- local flying, flySpeed = false, 50
- local noclip = false
- local infJumpEnabled = false
- local aimbotEnabled, fovRadius = false, 120
- local wallCheckEnabled = false
- local walkSpeed, jumpPower = 16, 50
- local speedEnabled, jumpEnabled = false, false
- local clickTpEnabled = false
- -- Teleport & Follow Variables
- local selectedTpPlayer = "No Player Selected"
- local selectedFollowPlayer = "No Player Selected"
- local isFollowing = false
- local currentFollowChar = nil
- local followDistance = 4
- local followHeight = 0
- local TpDropdown, FollowDropdown
- local espEnabled = false
- local espObjects = {}
- ----------------------------------------------------------------
- -- GUI-BASED FOV CIRCLE
- ----------------------------------------------------------------
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Name = "FOVScreenGui"
- ScreenGui.ResetOnSpawn = false
- ScreenGui.IgnoreGuiInset = true
- pcall(function() ScreenGui.Parent = CoreGui end)
- if not ScreenGui.Parent then ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui") end
- local FOVFrame = Instance.new("Frame")
- FOVFrame.Name = "FOVCircle"
- FOVFrame.AnchorPoint = Vector2.new(0.5, 0.5)
- FOVFrame.Position = UDim2.new(0.5, 0, 0.5, 0)
- FOVFrame.Size = UDim2.new(0, fovRadius * 2, 0, fovRadius * 2)
- FOVFrame.BackgroundTransparency = 1
- FOVFrame.Visible = false
- FOVFrame.Parent = ScreenGui
- local UICorner = Instance.new("UICorner")
- UICorner.CornerRadius = UDim.new(1, 0)
- UICorner.Parent = FOVFrame
- local UIStroke = Instance.new("UIStroke")
- UIStroke.Thickness = 2
- UIStroke.Color = Color3.fromRGB(255, 255, 255)
- UIStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
- UIStroke.Parent = FOVFrame
- RunService.RenderStepped:Connect(function()
- if aimbotEnabled then
- UIStroke.Color = Color3.fromHSV(tick() % 5 / 5, 1, 1)
- end
- end)
- ----------------------------------------------------------------
- -- PLAYER LIST FUNCTIONS
- ----------------------------------------------------------------
- local function getPlayerNames()
- local names = {}
- for _, p in ipairs(Players:GetPlayers()) do
- if p ~= LocalPlayer then
- table.insert(names, p.Name)
- end
- end
- if #names == 0 then table.insert(names, "No Player Selected") end
- return names
- end
- local function refreshAllDropdowns()
- local names = getPlayerNames()
- if TpDropdown then TpDropdown:Refresh(names) end
- if FollowDropdown then FollowDropdown:Refresh(names) end
- end
- Players.PlayerAdded:Connect(function() refreshAllDropdowns() end)
- Players.PlayerRemoving:Connect(function() refreshAllDropdowns() end)
- local function getPhysicallyClosestPlayer()
- local closest, minDistance = nil, math.huge
- if not LocalPlayer.Character or not LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then return nil end
- local lpPos = LocalPlayer.Character.HumanoidRootPart.Position
- for _, player in ipairs(Players:GetPlayers()) do
- if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
- local hum = player.Character:FindFirstChildOfClass("Humanoid")
- if hum and hum.Health > 0 then
- local dist = (player.Character.HumanoidRootPart.Position - lpPos).Magnitude
- if dist < minDistance then
- closest = player.Character
- minDistance = dist
- end
- end
- end
- end
- return closest
- end
- ----------------------------------------------------------------
- -- FLY SYSTEM
- ----------------------------------------------------------------
- local bv, bg
- local function getMoveVector()
- local moveDir = Vector3.new(0, 0, 0)
- local pModule = LocalPlayer:FindFirstChild("PlayerScripts") and LocalPlayer.PlayerScripts:FindFirstChild("PlayerModule")
- if pModule then
- local ok, controlModule = pcall(function() return require(pModule:FindFirstChild("ControlModule")) end)
- if ok and controlModule and controlModule.GetMoveVector then
- local vec = controlModule:GetMoveVector()
- if vec and vec.Magnitude > 0 then
- moveDir = (Camera.CFrame.RightVector * vec.X) - (Camera.CFrame.LookVector * vec.Z)
- end
- end
- end
- if moveDir.Magnitude == 0 and LocalPlayer.Character then
- local hum = LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
- if hum and hum.MoveDirection.Magnitude > 0 then moveDir = hum.MoveDirection end
- end
- if UserInputService:IsKeyDown(Enum.KeyCode.W) then moveDir = moveDir + Camera.CFrame.LookVector end
- if UserInputService:IsKeyDown(Enum.KeyCode.S) then moveDir = moveDir - Camera.CFrame.LookVector end
- if UserInputService:IsKeyDown(Enum.KeyCode.A) then moveDir = moveDir - Camera.CFrame.RightVector end
- if UserInputService:IsKeyDown(Enum.KeyCode.D) then moveDir = moveDir + Camera.CFrame.RightVector end
- if UserInputService:IsKeyDown(Enum.KeyCode.Space) then moveDir = moveDir + Vector3.new(0, 1, 0) end
- if UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) or UserInputService:IsKeyDown(Enum.KeyCode.RightControl) then moveDir = moveDir - Vector3.new(0, 1, 0) end
- return moveDir
- end
- RunService.RenderStepped:Connect(function()
- if flying and LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
- local hrp = LocalPlayer.Character.HumanoidRootPart
- local hum = LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
- if hum then hum.PlatformStand = true end
- if not bv then
- bv = Instance.new("BodyVelocity", hrp)
- bv.Name = "FlyBV"; bv.MaxForce = Vector3.new(9e9, 9e9, 9e9); bv.Velocity = Vector3.new(0, 0, 0)
- bg = Instance.new("BodyGyro", hrp)
- bg.Name = "FlyBG"; bg.MaxTorque = Vector3.new(9e9, 9e9, 9e9); bg.P = 10000
- end
- bg.CFrame = Camera.CFrame
- local dir = getMoveVector()
- bv.Velocity = dir.Magnitude > 0 and (dir.Unit * flySpeed) or Vector3.new(0, 0, 0)
- else
- if LocalPlayer.Character then
- local hum = LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
- if hum then hum.PlatformStand = false end
- end
- if bv then bv:Destroy(); bv = nil end
- if bg then bg:Destroy(); bg = nil end
- end
- end)
- ----------------------------------------------------------------
- -- TAB MOVEMENT
- ----------------------------------------------------------------
- TabMovement:CreateSection("Player")
- TabMovement:CreateToggle({Name = "Fly", Callback = function(v) flying = v end})
- TabMovement:CreateInput({
- Name = "Fly Speed",
- PlaceholderText = "50",
- RemoveTextAfterFocusLost = false,
- Callback = function(t)
- local num = tonumber(t)
- if num then flySpeed = num end
- end
- })
- RunService.Stepped:Connect(function()
- if noclip and LocalPlayer.Character then
- for _, p in pairs(LocalPlayer.Character:GetDescendants()) do if p:IsA("BasePart") then p.CanCollide = false end end
- end
- end)
- TabMovement:CreateToggle({Name = "Noclip", Callback = function(v) noclip = v end})
- TabMovement:CreateSection("Modifiers")
- TabMovement:CreateToggle({Name = "Infinite Jump", Callback = function(v) infJumpEnabled = v end})
- UserInputService.JumpRequest:Connect(function()
- if infJumpEnabled and LocalPlayer.Character then
- local hum = LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
- if hum then hum:ChangeState(Enum.HumanoidStateType.Jumping) end
- end
- end)
- TabMovement:CreateToggle({Name = "Speed", Callback = function(v)
- speedEnabled = v
- if not speedEnabled and LocalPlayer.Character then
- local h = LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
- if h then h.WalkSpeed = 16 end
- end
- end})
- TabMovement:CreateInput({
- Name = "Speed Value",
- PlaceholderText = "16",
- RemoveTextAfterFocusLost = false,
- Callback = function(t)
- local num = tonumber(t)
- if num then walkSpeed = num end
- end
- })
- RunService.RenderStepped:Connect(function()
- if speedEnabled and LocalPlayer.Character then
- local h = LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
- if h then h.WalkSpeed = walkSpeed end
- end
- end)
- TabMovement:CreateToggle({
- Name = "Jump",
- Callback = function(v)
- jumpEnabled = v
- if not jumpEnabled and LocalPlayer.Character then
- local h = LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
- if h then h.JumpPower = 50 end
- end
- end
- })
- TabMovement:CreateInput({
- Name = "Jump Value",
- PlaceholderText = "50",
- RemoveTextAfterFocusLost = false,
- Callback = function(t)
- local num = tonumber(t)
- if num then jumpPower = num end
- end
- })
- RunService.RenderStepped:Connect(function()
- if jumpEnabled and LocalPlayer.Character then
- local h = LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
- if h then h.UseJumpPower = true; h.JumpPower = jumpPower end
- end
- end)
- ----------------------------------------------------------------
- -- TAB VISUALS
- ----------------------------------------------------------------
- TabVisuals:CreateSection("Aimbot")
- TabVisuals:CreateToggle({Name = "Aimbot", Callback = function(v) aimbotEnabled = v; FOVFrame.Visible = v end})
- TabVisuals:CreateInput({
- Name = "FOV Size",
- PlaceholderText = "120",
- RemoveTextAfterFocusLost = false,
- Callback = function(t)
- local num = tonumber(t)
- if num then fovRadius = num; FOVFrame.Size = UDim2.new(0, fovRadius * 2, 0, fovRadius * 2) end
- end
- })
- TabVisuals:CreateToggle({Name = "Wall Check", Callback = function(v) wallCheckEnabled = v end})
- RunService.RenderStepped:Connect(function()
- if aimbotEnabled then
- local closest, maxDist = nil, fovRadius
- local screenCenter = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)
- for _, p in pairs(Players:GetPlayers()) do
- if p ~= LocalPlayer and p.Character and p.Character:FindFirstChild("Head") then
- local head = p.Character.Head
- local hum = p.Character:FindFirstChildOfClass("Humanoid")
- if hum and hum.Health > 0 then
- local pos, onScreen = Camera:WorldToViewportPoint(head.Position)
- local dist = (Vector2.new(pos.X, pos.Y) - screenCenter).Magnitude
- if onScreen and dist < maxDist then
- if wallCheckEnabled then
- local rayParams = RaycastParams.new()
- rayParams.FilterType = Enum.RaycastFilterType.Exclude
- if LocalPlayer.Character then rayParams.FilterDescendantsInstances = {LocalPlayer.Character, Camera} end
- local ray = workspace:Raycast(Camera.CFrame.Position, (head.Position - Camera.CFrame.Position), rayParams)
- if ray and not ray.Instance:IsDescendantOf(p.Character) then continue end
- end
- closest = head; maxDist = dist
- end
- end
- end
- end
- if closest then Camera.CFrame = CFrame.new(Camera.CFrame.Position, closest.Position) end
- end
- end)
- TabVisuals:CreateSection("ESP")
- local function createESP(player)
- if player == LocalPlayer then return end
- local function setupESP(character)
- if not character then return end
- local head = character:WaitForChild("Head", 5)
- local hum = character:WaitForChild("Humanoid", 5)
- if not head or not hum then return end
- if character:FindFirstChild("ESP_Billboard") then character.ESP_Billboard:Destroy() end
- local highlight = Instance.new("Highlight", character)
- highlight.Name = "ESPHighlight"; highlight.FillColor = Color3.fromRGB(255, 0, 0); highlight.FillTransparency = 0.5; highlight.OutlineColor = Color3.fromRGB(255, 255, 255)
- local billboard = Instance.new("BillboardGui", character)
- billboard.Name = "ESP_Billboard"; billboard.Adornee = head; billboard.Size = UDim2.new(0, 90, 0, 30); billboard.StudsOffset = Vector3.new(0, 2, 0); billboard.AlwaysOnTop = true
- local nameLabel = Instance.new("TextLabel", billboard)
- nameLabel.Size = UDim2.new(1, 0, 0, 11); nameLabel.BackgroundTransparency = 1; nameLabel.Text = player.Name; nameLabel.TextColor3 = Color3.fromRGB(255, 255, 255); nameLabel.Font = Enum.Font.SourceSansBold; nameLabel.TextSize = 10
- local healthBg = Instance.new("Frame", billboard)
- healthBg.Size = UDim2.new(0.85, 0, 0, 3); healthBg.Position = UDim2.new(0.075, 0, 0, 13); healthBg.BackgroundColor3 = Color3.fromRGB(40, 40, 40); healthBg.BorderSizePixel = 0
- local healthBar = Instance.new("Frame", healthBg)
- healthBar.Size = UDim2.new(1, 0, 1, 0); healthBar.BackgroundColor3 = Color3.fromRGB(0, 255, 0); healthBar.BorderSizePixel = 0
- local healthPercent = Instance.new("TextLabel", billboard)
- healthPercent.Size = UDim2.new(1, 0, 0, 10); healthPercent.Position = UDim2.new(0, 0, 0, 17); healthPercent.BackgroundTransparency = 1; healthPercent.Text = "100%"; healthPercent.TextColor3 = Color3.fromRGB(255, 255, 255); healthPercent.Font = Enum.Font.SourceSans; healthPercent.TextSize = 9
- local conn; conn = hum.HealthChanged:Connect(function(health)
- if not character or not character.Parent then conn:Disconnect(); return end
- local max = hum.MaxHealth > 0 and hum.MaxHealth or 100
- local pct = math.clamp(health / max, 0, 1)
- healthBar.Size = UDim2.new(pct, 0, 1, 0)
- healthPercent.Text = math.floor(pct * 100) .. "%"
- healthBar.BackgroundColor3 = Color3.fromRGB(255 * (1 - pct), 255 * pct, 0)
- end)
- espObjects[player] = { Highlight = highlight, Billboard = billboard, Connection = conn }
- end
- if player.Character then setupESP(player.Character) end
- player.CharacterAdded:Connect(function(newChar) if espEnabled then setupESP(newChar) end end)
- end
- local function removeESP()
- for _, data in pairs(espObjects) do
- if data.Highlight then data.Highlight:Destroy() end
- if data.Billboard then data.Billboard:Destroy() end
- if data.Connection then data.Connection:Disconnect() end
- end
- table.clear(espObjects)
- end
- TabVisuals:CreateToggle({Name = "ESP", Callback = function(v)
- espEnabled = v
- if espEnabled then
- for _, p in ipairs(Players:GetPlayers()) do createESP(p) end
- else
- removeESP()
- end
- end})
- ----------------------------------------------------------------
- -- TAB OTHER
- ----------------------------------------------------------------
- TabOther:CreateSection("Click TP")
- TabOther:CreateToggle({Name = "Click TP", Callback = function(v) clickTpEnabled = v end})
- local tapStartPos = Vector2.new(0, 0)
- local tapStartTime = 0
- UserInputService.InputBegan:Connect(function(input, gameProcessed)
- if not clickTpEnabled then return end
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- tapStartPos = input.Position
- tapStartTime = tick()
- end
- end)
- UserInputService.InputEnded:Connect(function(input, gameProcessed)
- if not clickTpEnabled then return end
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- local distanceMoved = (input.Position - tapStartPos).Magnitude
- local timeElapsed = tick() - tapStartTime
- if distanceMoved > 15 or timeElapsed > 0.3 then return end
- local unitRay = Camera:ViewportPointToRay(input.Position.X, input.Position.Y)
- local raycastParams = RaycastParams.new()
- raycastParams.FilterType = Enum.RaycastFilterType.Exclude
- if LocalPlayer.Character then
- raycastParams.FilterDescendantsInstances = {LocalPlayer.Character}
- end
- local result = workspace:Raycast(unitRay.Origin, unitRay.Direction * 2500, raycastParams)
- if result and LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
- local hitPos = result.Position
- local targetPos = Vector3.new(hitPos.X, hitPos.Y + 3, hitPos.Z)
- local currentCFrame = LocalPlayer.Character:GetPivot()
- LocalPlayer.Character:PivotTo(CFrame.new(targetPos, targetPos + currentCFrame.LookVector))
- end
- end
- end)
- TabOther:CreateSection("Teleport")
- TpDropdown = TabOther:CreateDropdown({Name = "Player", Options = getPlayerNames(), CurrentOption = {"No Player Selected"}, Callback = function(Option)
- selectedTpPlayer = typeof(Option) == "table" and Option[1] or Option
- end})
- TabOther:CreateButton({Name = "Teleport", Callback = function()
- local targetChar = nil
- if selectedTpPlayer ~= "" and selectedTpPlayer ~= "No Player Selected" then
- local target = Players:FindFirstChild(selectedTpPlayer)
- if target and target.Character then targetChar = target.Character end
- else
- targetChar = getPhysicallyClosestPlayer()
- end
- if targetChar and targetChar:FindFirstChild("HumanoidRootPart") and LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
- LocalPlayer.Character.HumanoidRootPart.CFrame = targetChar.HumanoidRootPart.CFrame * CFrame.new(0, 0, 3)
- end
- end})
- TabOther:CreateSection("Follow")
- FollowDropdown = TabOther:CreateDropdown({Name = "Player", Options = getPlayerNames(), CurrentOption = {"No Player Selected"}, Callback = function(Option)
- selectedFollowPlayer = typeof(Option) == "table" and Option[1] or Option
- end})
- TabOther:CreateInput({
- Name = "Distance",
- PlaceholderText = "4",
- RemoveTextAfterFocusLost = false,
- Callback = function(t)
- local num = tonumber(t)
- if num then followDistance = num end
- end
- })
- TabOther:CreateInput({
- Name = "Height",
- PlaceholderText = "0",
- RemoveTextAfterFocusLost = false,
- Callback = function(t)
- local num = tonumber(t)
- if num then followHeight = num end
- end
- })
- TabOther:CreateToggle({Name = "Follow", Callback = function(v)
- isFollowing = v
- if isFollowing then
- if selectedFollowPlayer ~= "" and selectedFollowPlayer ~= "No Player Selected" then
- local p = Players:FindFirstChild(selectedFollowPlayer)
- if p then currentFollowChar = p.Character end
- else
- currentFollowChar = getPhysicallyClosestPlayer()
- end
- end
- end})
- RunService.RenderStepped:Connect(function()
- if isFollowing and currentFollowChar and currentFollowChar:FindFirstChild("HumanoidRootPart") and LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
- local targetPos = currentFollowChar.HumanoidRootPart.CFrame * CFrame.new(0, followHeight, followDistance)
- LocalPlayer.Character.HumanoidRootPart.CFrame = LocalPlayer.Character.HumanoidRootPart.CFrame:Lerp(targetPos, 0.1)
- end
- end)
- Rayfield:Notify({
- Title = "RAYTREXFIELD by Trexhacker",
- Content = "Script loaded successfully!",
- Duration = 5,
- Image = 4483362458,
- })
Advertisement
Add Comment
Please, Sign In to add comment