Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Setup
- Gui = Instance.new("ScreenGui",game:GetService("CoreGui"))
- Gui.Name = "CFrameGui"
- Frame = Instance.new("Frame",Gui)
- Frame.Name = "GuiFrame"
- Frame.Style = "RobloxSquare"
- Frame.Position = UDim2.new(0,7,0,10)
- Frame.Size = UDim2.new(0,200,0,100)
- IncrementButton = Instance.new("TextBox",Frame)
- IncrementButton.BackgroundColor3 = Color3.new(0,0,0)
- IncrementButton.BorderColor3 = Color3.new(170,0,0)
- IncrementButton.Position = UDim2.new(0,140,0,25)
- IncrementButton.Size = UDim2.new(0,50,0,30)
- IncrementButton.Name = "incrementbutton"
- IncrementButton.Text = " "
- IncrementButton.Font = "ArialBold"
- IncrementButton.FontSize = "Size12"
- IncrementButton.TextColor3 = BrickColor.new("White").Color
- CloseButton = Instance.new("TextButton",Frame)
- CloseButton.BackgroundColor3 = Color3.new(0,0,0)
- CloseButton.BorderColor3 = Color3.new(170,0,0)
- CloseButton.Position = UDim2.new(0,0,0,65)
- CloseButton.Size = UDim2.new(0,50,0,10)
- CloseButton.Name = "closebutton"
- CloseButton.Text = "CLOSE"
- CloseButton.Font = "ArialBold"
- CloseButton.FontSize = "Size12"
- CloseButton.TextColor3 = BrickColor.new("White").Color
- MoveButton = Instance.new("TextButton",Frame)
- MoveButton.BackgroundColor3 = Color3.new(0,0,0)
- MoveButton.BorderColor3 = Color3.new(170,0,0)
- MoveButton.Position = UDim2.new(0,0,0,50)
- MoveButton.Size = UDim2.new(0,50,0,10)
- MoveButton.Name = "movebutton"
- MoveButton.Text = "MOVE"
- MoveButton.Font = "ArialBold"
- MoveButton.FontSize = "Size11"
- MoveButton.TextColor3 = BrickColor.new("White").Color
- XButton = Instance.new("TextButton",Frame)
- XButton.BackgroundColor3 = Color3.new(0,0,0)
- XButton.BorderColor3 = Color3.new(170,0,0)
- XButton.Position = UDim2.new(0,0,0,22)
- XButton.Size = UDim2.new(0,10,0,10)
- XButton.Name = "xbutton"
- XButton.Text = "X"
- XButton.Font = "ArialBold"
- XButton.FontSize = "Size11"
- XButton.TextColor3 = BrickColor.new("White").Color
- YButton = Instance.new("TextButton",Frame)
- YButton.BackgroundColor3 = Color3.new(0,0,0)
- YButton.BorderColor3 = Color3.new(170,0,0)
- YButton.Position = UDim2.new(0,12,0,22)
- YButton.Size = UDim2.new(0,10,0,10)
- YButton.Name = "ybutton"
- YButton.Text = "Y"
- YButton.Font = "ArialBold"
- YButton.FontSize = "Size11"
- YButton.TextColor3 = BrickColor.new("White").Color
- ZButton = Instance.new("TextButton",Frame)
- ZButton.BackgroundColor3 = Color3.new(0,0,0)
- ZButton.BorderColor3 = Color3.new(170,0,0)
- ZButton.Position = UDim2.new(0,24,0,22)
- ZButton.Size = UDim2.new(0,10,0,10)
- ZButton.Name = "zbutton"
- ZButton.Text = "Z"
- ZButton.Font = "ArialBold"
- ZButton.FontSize = "Size11"
- ZButton.TextColor3 = BrickColor.new("White").Color
- IncrementTtl = Instance.new("TextLabel",Frame)
- IncrementTtl.BackgroundTransparency = 1
- IncrementTtl.Name = "incrementttl"
- IncrementTtl.Position = UDim2.new(0,139,0,47)
- IncrementTtl.Size = UDim2.new(0,50,0,30)
- IncrementTtl.Font = "ArialBold"
- IncrementTtl.FontSize = "Size12"
- IncrementTtl.Text = "Increment"
- IncrementTtl.TextColor3 = BrickColor.new("White").Color
- Status = Instance.new("TextLabel",Frame)
- Status.BackgroundColor3 = Color3.new(91,91,91)
- Status.BorderColor3 = Color3.new(91,91,91)
- Status.Position = UDim2.new(0,-7,0,-7)
- Status.Size = UDim2.new(0,198,0,20)
- Status.Font = "ArialBold"
- Status.FontSize = "Size18"
- Status.Text = "CFraming - Moving"
- Status.TextColor3 = BrickColor.new("White").Color
- Status.TextXAlignment = "Left"
- PlusButton = Instance.new("TextButton",Frame)
- PlusButton.Size = UDim2.new(0,10,0,10)
- PlusButton.Position = UDim2.new(0,36,0,22)
- PlusButton.BackgroundColor3 = Color3.new(0,0,0)
- PlusButton.BorderColor3 = Color3.new(170,0,0)
- PlusButton.Text = "+"
- PlusButton.Font = "ArialBold"
- PlusButton.TextColor3 = BrickColor.new("White").Color
- PlusButton.FontSize = "Size18"
- MinusButton = Instance.new("TextButton",Frame)
- MinusButton.Size = UDim2.new(0,10,0,10)
- MinusButton.Position = UDim2.new(0,48,0,22)
- MinusButton.BackgroundColor3 = Color3.new(0,0,0)
- MinusButton.BorderColor3 = Color3.new(170,0,0)
- MinusButton.Text = "-"
- MinusButton.Font = "ArialBold"
- MinusButton.TextColor3 = BrickColor.new("White").Color
- MinusButton.FontSize = "Size18"
- ----------
- axis = {
- x = false;
- y = false;
- z = false;
- }
- settings = {
- positive = true;
- negative = false;
- }
- XButton.MouseButton1Down:connect(function() axis.x = true axis.y = false axis.z = false end)
- YButton.MouseButton1Down:connect(function() axis.x = false axis.y = true axis.z = false end)
- ZButton.MouseButton1Down:connect(function() axis.x = false axis.y = false axis.z = true end)
- PlusButton.MouseButton1Down:connect(function() settings.positive = true settings.negative = false end)
- MinusButton.MouseButton1Down:connect(function() settings.positive = false settings.negative = true end)
- CloseButton.MouseButton1Down:connect(function() Gui:Destroy() end)
- MoveButton.MouseButton1Down:connect(function()
- if axis.x == true then
- local ln = game.Selection:Get()
- if #ln == 0 then print("ERROR: No objects selected") return end
- for i = 1, #ln do
- if tonumber(IncrementButton.Text) ~= nil then
- if settings.positive == true then ln[i].CFrame = CFrame.new(ln[i].CFrame.x+tonumber(IncrementButton.Text),ln[i].CFrame.y,ln[i].CFrame.z) end
- if settings.negative == true then ln[i].CFrame = CFrame.new(ln[i].CFrame.x-tonumber(IncrementButton.Text),ln[i].CFrame.y,ln[i].CFrame.z) end
- end
- end
- end
- if axis.y == true then
- local ln2 = game.Selection:Get()
- if #ln2 == 0 then print("ERROR: No objects selected") return end
- for i = 1, #ln2 do
- if tonumber(IncrementButton.Text) ~= nil then
- if settings.positive == true then ln2[i].CFrame = CFrame.new(ln2[i].CFrame.x,ln2[i].CFrame.y+tonumber(IncrementButton.Text),ln2[i].CFrame.z) end
- if settings.negative == true then ln2[i].CFrame = CFrame.new(ln2[i].CFrame.x,ln2[i].CFrame.y-tonumber(IncrementButton.Text),ln2[i].CFrame.z) end
- end
- end
- end
- if axis.z == true then
- local ln3 = game.Selection:Get()
- if #ln3 == 0 then print("ERROR: No objects selected") return end
- for i = 1, #ln3 do
- if tonumber(IncrementButton.Text) ~= nil then
- if settings.positive == true then ln3[i].CFrame = CFrame.new(ln3[i].CFrame.x,ln3[i].CFrame.y,ln3[i].CFrame.z+tonumber(IncrementButton.Text)) end
- if settings.negative == true then ln3[i].CFrame = CFrame.new(ln3[i].CFrame.x,ln3[i].CFrame.y,ln3[i].CFrame.z-tonumber(IncrementButton.Text)) end
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement