Thecodeeasar

Fe unanchored

Nov 11th, 2024
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.38 KB | None | 0 0
  1. -- Attempt to load the Orion Library
  2. local success, OrionLib = pcall(function()
  3. return loadstring(game:HttpGet('https://raw.githubusercontent.com/shlexware/Orion/main/source'))()
  4. end)
  5.  
  6. -- Check if the library loaded successfully
  7. if not success then
  8. warn("Failed to load Orion Library: " .. tostring(OrionLib))
  9. return -- Exit if loading failed
  10. end
  11.  
  12. -- Create the main window
  13. local Window = OrionLib:MakeWindow({
  14. Name = "Unanchored Parts Controller",
  15. HidePremium = false,
  16. SaveConfig = true,
  17. ConfigFolder = "UnanchoredPartsConfig"
  18. })
  19.  
  20. -- Create a section for unanchored parts control
  21. local UnanchoredPartsControlSection = Window:MakeSection({
  22. Name = "Unanchored Parts Control",
  23. })
  24.  
  25. -- Function to get all unanchored parts
  26. local function getUnanchoredParts()
  27. local parts = {}
  28. for _, v in pairs(workspace:GetDescendants()) do
  29. if v:IsA("BasePart") and not v.Anchored and not v:IsDescendantOf(Players.LocalPlayer.Character) then
  30. table.insert(parts, v)
  31. end
  32. end
  33. return parts
  34. end
  35.  
  36. -- Function to arrange parts at a specific position
  37. local function arrangeParts(parts, position)
  38. for _, part in ipairs(parts) do
  39. part.CFrame = position
  40. end
  41. end
  42.  
  43. -- Button to bring unanchored parts to the player's right arm as a gun
  44. UnanchoredPartsControlSection:CreateButton({
  45. Name = "Gun",
  46. Callback = function()
  47. local character = Players.LocalPlayer.Character
  48. if character and character:FindFirstChild("Right Arm") then
  49. local rightArm = character["Right Arm"]
  50. local parts = getUnanchoredParts()
  51. arrangeParts(parts, rightArm.CFrame * CFrame.new(0, -1, -2)) -- Adjust position as needed
  52. end
  53. end,
  54. })
  55.  
  56. -- Button to bring unanchored parts above the player's head as a hand
  57. UnanchoredPartsControlSection:CreateButton({
  58. Name = "Hand",
  59. Callback = function()
  60. local character = Players.LocalPlayer.Character
  61. if character and character:FindFirstChild("Head") then
  62. local head = character.Head
  63. local parts = getUnanchoredParts()
  64. arrangeParts(parts, head.CFrame * CFrame.new(0, 3, 0)) -- Adjust position as needed
  65. end
  66. end,
  67. })
  68.  
  69. -- Button to bring unanchored parts above the player's head as their username representation
  70. UnanchoredPartsControlSection:CreateButton({
  71. Name = "Your User",
  72. Callback = function()
  73. local character = Players.LocalPlayer.Character
  74. if character and character:FindFirstChild("Head") then
  75. local head = character.Head
  76. local parts = getUnanchoredParts()
  77. arrangeParts(parts, head.CFrame * CFrame.new(0, 5, 0)) -- Adjust position as needed for username representation
  78. end
  79. end,
  80. })
  81.  
  82. -- Button to bring unanchored parts into the player's arm like holding a phone
  83. UnanchoredPartsControlSection:CreateButton({
  84. Name = "Phone",
  85. Callback = function()
  86. local character = Players.LocalPlayer.Character
  87. if character and character:FindFirstChild("Right Arm") then
  88. local rightArm = character["Right Arm"]
  89. local parts = getUnanchoredParts()
  90. arrangeParts(parts, rightArm.CFrame * CFrame.new(0, -0.5, -1)) -- Adjust position as needed for phone representation
  91. end
  92. end,
  93. })
  94.  
  95. -- Initialize the library (required)
  96. OrionLib:Init()
Add Comment
Please, Sign In to add comment