Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local player = Players.LocalPlayer
- local char = player.Character or player.CharacterAdded:Wait()
- player.CharacterAdded:Connect(function(c)
- char = c
- end)
- local tool
- for _, v in ipairs(player:GetDescendants()) do
- if v.Name == "SyncAPI" then
- tool = v.Parent
- break
- end
- end
- if not tool then
- for _, v in ipairs(ReplicatedStorage:GetDescendants()) do
- if v.Name == "SyncAPI" then
- tool = v.Parent
- break
- end
- end
- end
- if not tool or not tool:FindFirstChild("SyncAPI") or not tool.SyncAPI:FindFirstChild("ServerEndpoint") then
- warn("You don't have Building Tools (F3X)")
- return
- end
- local remote = tool.SyncAPI.ServerEndpoint
- local function _(args)
- return remote:InvokeServer(unpack(args))
- end
- function SetCollision(part,bool)
- local args = { [1] = "SyncCollision", [2] = { [1] = { [ "Part" ] = part, [ "CanCollide" ] = bool } } }
- _(args)
- end
- function SetAnchor(bool,part)
- local args = { [1] = "SyncAnchor", [2] = { [1] = { [ "Part" ] = part, [ "Anchored" ] = bool } } }
- _(args)
- end
- function CreatePart(cf,parent)
- local args = { [1] = "CreatePart", [2] = "Normal", [3] = cf, [4] = parent }
- _(args)
- end
- function CreatePartSky(cf, parent)
- local args = {
- [1] = "CreatePart",
- [2] = "Normal",
- [3] = cf,
- [4] = parent
- }
- return _(args)
- end
- function SetName(part,name)
- local args = { [1] = "SetName", [2] = {part}, [3] = name }
- _(args)
- end
- function MovePart(part,cf)
- local args = { [1] = "SyncMove", [2] = { [1] = { [ "Part" ] = part, [ "CFrame" ] = cf } } }
- _(args)
- end
- function AddMesh(part)
- local args = { [1] = "CreateMeshes", [2] = { [1] = { [ "Part" ] = part } } }
- _(args)
- end
- function SetMesh(part,meshid)
- local args = { [1] = "SyncMesh", [2] = { [1] = { [ "Part" ] = part, [ "MeshId" ] = "rbxassetid://" ..meshid } } }
- _(args)
- end
- function SetTexture(part,texid)
- local args = { [1] = "SyncMesh", [2] = { [1] = { [ "Part" ] = part, [ "TextureId" ] = "rbxassetid://" ..texid } } }
- _(args)
- end
- function SetVertexColor(part,color)
- local args = { [1] = "SyncMesh", [2] = { [1] = { [ "Part" ] = part, [ "VertexColor" ] = color } } }
- _(args)
- end
- function MeshResize(part,size)
- local args = { [1] = "SyncMesh", [2] = { [1] = { [ "Part" ] = part, [ "Scale" ] = size } } }
- _(args)
- end
- function SetLocked(part,bool)
- local args = { [1] = "SetLocked", [2] = {part}, [3] = bool }
- _(args)
- end
- local skyPart
- function Sky(id)
- local root = char:WaitForChild("HumanoidRootPart")
- local spawnPos = Vector3.new(0,0, 0)
- if skyPart then
- SetName(skyPart, "HdSkybox")
- AddMesh(skyPart)
- SetMesh(skyPart, "111891702759441")
- SetTexture(skyPart, id)
- SetVertexColor(skyPart, Vector3.new(3,3,3))
- MeshResize(skyPart, Vector3.new(10000,10000,10000))
- SetLocked(skyPart, true)
- SetAnchor(true, skyPart)
- SetCollision(skyPart, false)
- end
- end
- skyPart = CreatePartSky(CFrame.new(0,0,0), workspace)
- Sky("108973483377425")
- --==============================================================================================================--
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local hdClient = ReplicatedStorage:WaitForChild("HDAdminHDClient")
- local RequestCommandSilent = hdClient:WaitForChild("Signals"):WaitForChild("RequestCommandSilent")
- RequestCommandSilent:InvokeServer(";fog 10000 ;fogcolor black")
- RequestCommandSilent:InvokeServer(";time 0")
- function SpawnDecal(part,side)
- local args = {
- [1] = "CreateTextures",
- [2] = {
- [1] = {
- ["Part"] = part,
- ["Face"] = side,
- ["TextureType"] = "Decal"
- }
- }
- }
- _(args)
- end
- function AddDecal(part,asset,side)
- local args = {
- [1] = "SyncTexture",
- [2] = {
- [1] = {
- ["Part"] = part,
- ["Face"] = side,
- ["TextureType"] = "Decal",
- ["Texture"] = "rbxassetid://".. asset
- }
- }
- }
- _(args)
- end
- function spam(id)
- for _, v in ipairs(workspace:GetDescendants()) do
- if v:IsA("BasePart") and v ~= skyPart then
- task.spawn(function()
- SetLocked(v,false)
- SpawnDecal(v,Enum.NormalId.Front)
- AddDecal(v,id,Enum.NormalId.Front)
- SpawnDecal(v,Enum.NormalId.Back)
- AddDecal(v,id,Enum.NormalId.Back)
- SpawnDecal(v,Enum.NormalId.Right)
- AddDecal(v,id,Enum.NormalId.Right)
- SpawnDecal(v,Enum.NormalId.Left)
- AddDecal(v,id,Enum.NormalId.Left)
- SpawnDecal(v,Enum.NormalId.Bottom)
- AddDecal(v,id,Enum.NormalId.Bottom)
- SpawnDecal(v,Enum.NormalId.Top)
- AddDecal(v,id,Enum.NormalId.Top)
- end)
- end
- end
- end
- spam("108973483377425")
Advertisement
Add Comment
Please, Sign In to add comment