Kotyara19k-Official

Yo

Mar 31st, 2025 (edited)
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local char = player.Character or player.CharacterAdded:Wait()
  3.  
  4. local tool
  5.  
  6. for i, v in player:GetDescendants() do
  7. if v.Name == "SyncAPI" then
  8. tool = v.Parent
  9. end
  10. end
  11.  
  12. for i, v in game.ReplicatedStorage:GetDescendants() do
  13. if v.Name == "SyncAPI" then
  14. tool = v.Parent
  15. end
  16. end
  17.  
  18. remote = tool.SyncAPI.ServerEndpoint
  19.  
  20. function _(args)
  21. remote:InvokeServer(unpack(args))
  22. end
  23.  
  24. function CreatePart(cf, parent)
  25. local args = {
  26. [1] = "CreatePart",
  27. [2] = "Normal",
  28. [3] = cf,
  29. [4] = parent
  30. }
  31. _(args)
  32. end
  33.  
  34. function AddMesh(part)
  35. local args = {
  36. [1] = "CreateMeshes",
  37. [2] = {
  38. [1] = {
  39. ["Part"] = part
  40. }
  41. }
  42. }
  43. _(args)
  44. end
  45.  
  46. function SetMesh(part, meshid)
  47. local args = {
  48. [1] = "SyncMesh",
  49. [2] = {
  50. [1] = {
  51. ["Part"] = part,
  52. ["MeshId"] = "rbxassetid://" .. meshid
  53. }
  54. }
  55. }
  56. _(args)
  57. end
  58.  
  59. function SetTexture(part, texid)
  60. local args = {
  61. [1] = "SyncMesh",
  62. [2] = {
  63. [1] = {
  64. ["Part"] = part,
  65. ["TextureId"] = "rbxassetid://" .. texid
  66. }
  67. }
  68. }
  69. _(args)
  70. end
  71.  
  72. function MeshResize(part, size)
  73. local args = {
  74. [1] = "SyncMesh",
  75. [2] = {
  76. [1] = {
  77. ["Part"] = part,
  78. ["Scale"] = size
  79. }
  80. }
  81. }
  82. _(args)
  83. end
  84.  
  85. function SetName(part, name)
  86. local args = {
  87. [1] = "SetName",
  88. [2] = {
  89. [1] = part
  90. },
  91. [3] = name
  92. }
  93. _(args)
  94. end
  95.  
  96. -- Спавн и настройка скайбокса
  97. function Sky(id)
  98. local e = char.HumanoidRootPart.Position.X
  99. local f = char.HumanoidRootPart.Position.Y
  100. local g = char.HumanoidRootPart.Position.Z
  101.  
  102. -- Создаем Part выше игрока
  103. CreatePart(CFrame.new(e, f + 20, g), workspace)
  104.  
  105. task.wait(0.2) -- Ждем немного, чтобы Part точно создался
  106.  
  107. for _, v in workspace:GetDescendants() do
  108. if v:IsA("BasePart") and not v:IsDescendantOf(char) and v.Name ~= "HumanoidRootPart" then
  109. if math.abs(v.Position.X - e) < 2 and math.abs(v.Position.Z - g) < 2 then
  110. SetName(v, "SkyPart") -- Помечаем, чтобы избежать случайных изменений других объектов
  111. AddMesh(v)
  112. SetMesh(v, "1527559")
  113. SetTexture(v, id)
  114. MeshResize(v, Vector3.new(-3000, -3000, -3000))
  115. end
  116. end
  117. end
  118. end
  119.  
  120. Sky("111208964753144")
  121.  
Advertisement
Add Comment
Please, Sign In to add comment