Advertisements
Build helper
Script
Version history
Loading…
loadstring(game:HttpGet("https://script.roscripts.io/yKkYZWZ"))() -- [[ BUILD HELPER — RAYFIELD EDITION ]] -- Fixed errors: crashes during copying, server spam, and block physics/order. local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))() local Players = game:GetService("Players") local RunService = game:GetService("RunService") local VirtualInputManager = game:GetService("VirtualInputManager") local Workspace = game:GetService("Workspace") local LocalPlayer = Players.LocalPlayer local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait() local Humanoid = Character:WaitForChild("Humanoid") local HRP = Character:WaitForChild("HumanoidRootPart") local BlockData = LocalPlayer:WaitForChild("Data") local BlocksFolder = Workspace:WaitForChild("Blocks") local autofarm = false local index = 1 local clipboard = nil local selectedPlayer = nil local ignoreAnchored = true -- ==========================================-- FIXED CORE FUNCTIONS -- ========================================== local function getBlockID(name) return BlockData:FindFirstChild(name) and BlockData:FindFirstChild(name).Value or 9 end local function equipTool(toolName) local tool = LocalPlayer.Backpack:FindFirstChild(toolName) if not tool then return nil end if Character:FindFirstChild(toolName) then return Character[toolName] end Humanoid:EquipTool(tool) task.wait(0.1) return Character:FindFirstChild(toolName) end local function setTransparency(transparencyWanted, block) if not block or not block:FindFirstChild("PPart") then return end if block.PPart.Transparency == transparencyWanted then return end local tool = equipTool("PropertiesTool") if not tool then return end local calls = transparencyWanted / 0.25 local args = {"Transparency", {block}} task.spawn(function() for i = 1, calls do pcall(function() tool.SetPropertieRF:InvokeServer(unpack(args)) end) task.wait(0.05) end end) end local function setAnchored(block) if not block then return end local tool = equipTool("PropertiesTool") if not tool then return end local args = {"Anchored", {block}} task.spawn(function() pcall(function() tool.SetPropertieRF:InvokeServer(unpack(args)) end) end) end local function rescaleBlock(block, newPos, newSize) if not block then return end local tool = equipTool("ScalingTool") if not tool then return end local args = {block, newSize, newPos} task.spawn(function() pcall(function() tool.RF:InvokeServer(unpack(args)) end) end) end local function getPlayerZone(playerInstance) if not playerInstance then return nil end -- FIX: nil check local teamColor = playerInstance.TeamColor for _, v in pairs(Workspace:GetChildren()) do if v:FindFirstChild("TeamColor") and v.TeamColor.Value then if v.TeamColor.Value == teamColor then return v end end end return nil end local function placeBlock(name, pos, relativeTo, Anchored) local tool = equipTool("BuildingTool") if not tool then return end if not relativeTo then relativeTo = getPlayerZone(LocalPlayer) end local args = {name, getBlockID(name), relativeTo, relativeTo and relativeTo.CFrame:ToObjectSpace(pos) or CFrame.new(), ignoreAnchored and true or Anchored, pos, false} task.spawn(function() pcall(function() tool.RF:InvokeServer(unpack(args)) end) end) end local function paintBlock(block, color) if not block or not block:FindFirstChild("PPart") then return end if block.PPart.Color == color then return end local tool = equipTool("PaintingTool") if not tool then return end local args = {{block, color}} task.spawn(function() pcall(function() tool.RF:InvokeServer(args) end) end) end local function getJoint(model) for _, v in pairs(model.PPart:GetChildren()) do if v:IsA("Snap") or v:IsA("Weld") then if v.Part1 then if not (v.Part1.Parent == model) then return v.Part1 end end end end return getPlayerZone(LocalPlayer)
The rest is in View source.
Comments · 1
Sign in to comment.