|
| 19 Nov 2013 04:02 PM |
Its really weird Here is the script (Really long, its a plugin sorry.)
------------- --{Options}-- ------------- do OpenWithPlace = true --{Open gui when you open a place} RemoveOldWelds = true --{Remove old welds created by this plugin when creating new welds} ByNumberTable = {1, 45, 90, 180, 360} --{Numbers that can be picked with the arrows} ByMode = 2 --{Place in the table the by number starts on} ToggleTextTable = {"CFrame", "Position", "Set CFrame"} --{Text for the toggle button} ToggleMode = 1 --{Place in the table the ToggleText starts on} end ------------- --{Options}-- -------------
--------------- --{Variables}-- --------------- do local PluginManagerObject = PluginManager() local Plugin = PluginManagerObject:CreatePlugin() local Toolbar = Plugin:CreateToolbar("Scriptural's Plugins") Button = Toolbar:CreateButton("", "CFrame", "Image.png") end --------------- --{Variables}-- ---------------
--------------- --{Functions}-- --------------- do function Number(StringProblem) if pcall(function() return tonumber(loadstring("return " .. StringProblem)()) end) then return loadstring("return " .. StringProblem)() else return 0 end end
CreateScreenGui = function(...) ScreenGuiTable = {...} getfenv()[ScreenGuiTable[1]] = Instance.new("ScreenGui") getfenv()[ScreenGuiTable[1]].Name = ScreenGuiTable[2] getfenv()[ScreenGuiTable[1]].Archivable = ScreenGuiTable[3] end
CreateFrame = function(...) FrameTable = {...} getfenv()[FrameTable[1]] = Instance.new("Frame") getfenv()[FrameTable[1]].Active = FrameTable[2] getfenv()[FrameTable[1]].BackgroundColor3 = FrameTable[3] getfenv()[FrameTable[1]].BackgroundTransparency = FrameTable[4] getfenv()[FrameTable[1]].BorderColor3 = FrameTable[5] getfenv()[FrameTable[1]].BorderSizePixel = FrameTable[6] getfenv()[FrameTable[1]].Name = FrameTable[7] getfenv()[FrameTable[1]].Position = FrameTable[8] getfenv()[FrameTable[1]].Size = FrameTable[9] getfenv()[FrameTable[1]].SizeConstraint = FrameTable[10] getfenv()[FrameTable[1]].Style = FrameTable[11] getfenv()[FrameTable[1]].Visible = FrameTable[12] getfenv()[FrameTable[1]].ZIndex = FrameTable[13] getfenv()[FrameTable[1]].Archivable = FrameTable[14] getfenv()[FrameTable[1]].ClipsDescendants = FrameTable[15] getfenv()[FrameTable[1]].Draggable = FrameTable[16] end
CreateTextBox = function(...) TextBoxTable = {...} getfenv()[TextBoxTable[1]] = Instance.new("TextBox") getfenv()[TextBoxTable[1]].Active = TextBoxTable[2] getfenv()[TextBoxTable[1]].BackgroundColor3 = TextBoxTable[3] getfenv()[TextBoxTable[1]].BackgroundTransparency = TextBoxTable[4] getfenv()[TextBoxTable[1]].BorderColor3 = TextBoxTable[5] getfenv()[TextBoxTable[1]].BorderSizePixel = TextBoxTable[6] getfenv()[TextBoxTable[1]].ClearTextOnFocus = TextBoxTable[7] getfenv()[TextBoxTable[1]].MultiLine = TextBoxTable[8] getfenv()[TextBoxTable[1]].Name = TextBoxTable[9] getfenv()[TextBoxTable[1]].Position = TextBoxTable[10] getfenv()[TextBoxTable[1]].Size = TextBoxTable[11] getfenv()[TextBoxTable[1]].SizeConstraint = TextBoxTable[12] getfenv()[TextBoxTable[1]].Visible = TextBoxTable[13] getfenv()[TextBoxTable[1]].ZIndex = TextBoxTable[14] getfenv()[TextBoxTable[1]].Archivable = TextBoxTable[15] getfenv()[TextBoxTable[1]].ClipsDescendants = TextBoxTable[16] getfenv()[TextBoxTable[1]].Draggable = TextBoxTable[17] getfenv()[TextBoxTable[1]].Font = TextBoxTable[18] getfenv()[TextBoxTable[1]].FontSize = TextBoxTable[19] getfenv()[TextBoxTable[1]].Text = TextBoxTable[20] getfenv()[TextBoxTable[1]].TextColor3 = TextBoxTable[21] getfenv()[TextBoxTable[1]].TextScaled = TextBoxTable[22] getfenv()[TextBoxTable[1]].TextStrokeColor3 = TextBoxTable[23] getfenv()[TextBoxTable[1]].TextStrokeTransparency = TextBoxTable[24] getfenv()[TextBoxTable[1]].TextTransparency = TextBoxTable[25] getfenv()[TextBoxTable[1]].TextWrapped = TextBoxTable[26] getfenv()[TextBoxTable[1]].TextXAlignment = TextBoxTable[27] getfenv()[TextBoxTable[1]].TextYAlignment = TextBoxTable[28] end
CreateTextButton = function(...) TextButtonTable = {...} getfenv()[TextButtonTable[1]] = Instance.new("TextButton") getfenv()[TextButtonTable[1]].Parent= Workspace getfenv()[TextButtonTable[1]].Active = TextButtonTable[2] getfenv()[TextButtonTable[1]].AutoButtonColor = TextButtonTable[3] getfenv()[TextButtonTable[1]].BackgroundColor3 = TextButtonTable[4] getfenv()[TextButtonTable[1]].BackgroundTransparency = TextButtonTable[5] getfenv()[TextButtonTable[1]].BorderColor3 = TextButtonTable[6] getfenv()[TextButtonTable[1]].BorderSizePixel = TextButtonTable[7] getfenv()[TextButtonTable[1]].Modal = TextButtonTable[8] getfenv()[TextButtonTable[1]].Name = TextButtonTable[9] getfenv()[TextButtonTable[1]].Position = TextButtonTable[10] getfenv()[TextButtonTable[1]].Selected = TextButtonTable[11] getfenv()[TextButtonTable[1]].Size = TextButtonTable[12] getfenv()[TextButtonTable[1]].SizeConstraint = TextButtonTable[13] getfenv()[TextButtonTable[1]].Style = TextButtonTable[14] getfenv()[TextButtonTable[1]].Visible = TextButtonTable[15] getfenv()[TextButtonTable[1]].ZIndex = TextButtonTable[16] getfenv()[TextButtonTable[1]].Archivable = TextButtonTable[17] getfenv()[TextButtonTable[1]].ClipsDescendants = TextButtonTable[18] getfenv()[TextButtonTable[1]].Draggable = TextButtonTable[19] getfenv()[TextButtonTable[1]].Font = TextButtonTable[20] getfenv()[TextButtonTable[1]].FontSize = TextButtonTable[21] getfenv()[TextButtonTable[1]].Text = TextButtonTable[22] getfenv()[TextButtonTable[1]].TextColor3 = TextButtonTable[23] getfenv()[TextButtonTable[1]].TextScaled = TextButtonTable[24] getfenv()[TextButtonTable[1]].TextStrokeColor3 = TextButtonTable[25] getfenv()[TextButtonTable[1]].TextStrokeTransparency = TextButtonTable[26] getfenv()[TextButtonTable[1]].TextTransparency = TextButtonTable[27] getfenv()[TextButtonTable[1]].TextWrapped = TextButtonTable[28] getfenv()[TextButtonTable[1]].TextXAlignment = TextButtonTable[29] getfenv()[TextButtonTable[1]].TextYAlignment = TextButtonTable[30] end
CreateTextLabel = function(...) TextLabelTable = {...} getfenv()[TextLabelTable[1]] = Instance.new("TextLabel") getfenv()[TextLabelTable[1]].Active = TextLabelTable[2] getfenv()[TextLabelTable[1]].BackgroundColor3 = TextLabelTable[3] getfenv()[TextLabelTable[1]].BackgroundTransparency = TextLabelTable[4] getfenv()[TextLabelTable[1]].BorderColor3 = TextLabelTable[5] getfenv()[TextLabelTable[1]].BorderSizePixel = TextLabelTable[6] getfenv()[TextLabelTable[1]].Name = TextLabelTable[7] getfenv()[TextLabelTable[1]].Position = TextLabelTable[8] getfenv()[TextLabelTable[1]].Size = TextLabelTable[9] getfenv()[TextLabelTable[1]].SizeConstraint = TextLabelTable[10] getfenv()[TextLabelTable[1]].Visible = TextLabelTable[11] getfenv()[TextLabelTable[1]].ZIndex = TextLabelTable[12] getfenv()[TextLabelTable[1]].Archivable = TextLabelTable[13] getfenv()[TextLabelTable[1]].ClipsDescendants = TextLabelTable[14] getfenv()[TextLabelTable[1]].Draggable = TextLabelTable[15] getfenv()[TextLabelTable[1]].Font = TextLabelTable[16] getfenv()[TextLabelTable[1]].FontSize = TextLabelTable[17] getfenv()[TextLabelTable[1]].Text = TextLabelTable[18] getfenv()[TextLabelTable[1]].TextColor3 = TextLabelTable[19] getfenv()[TextLabelTable[1]].TextScaled = TextLabelTable[20] getfenv()[TextLabelTable[1]].TextStrokeColor3 = TextLabelTable[21] getfenv()[TextLabelTable[1]].TextStrokeTransparency = TextLabelTable[22] getfenv()[TextLabelTable[1]].TextTransparency = TextLabelTable[23] getfenv()[TextLabelTable[1]].TextWrapped = TextLabelTable[24] getfenv()[TextLabelTable[1]].TextXAlignment = TextLabelTable[25] getfenv()[TextLabelTable[1]].TextYAlignment = TextLabelTable[26] end end --------------- --{Functions}-- ---------------
------------------ --{Creating Gui}-- ------------------ do CreateScreenGui("ScreenGui", "Scriptural's CFrame Plugin Gui", true)
CreateFrame("Dragbar", true, Color3.new(0, 0.39215689897537, 1), 0.25, Color3.new(0.10588236153126, 0.16470588743687, 0.20784315466881), 0, "Dragbar", UDim2.new(0, 0, 0, 0), UDim2.new(0, 200, 0, 20), Enum.SizeConstraint.RelativeXY , Enum.FrameStyle.Custom , OpenWithPlace, 1, true, false, true)
CreateFrame("Background", false, Color3.new(0.63921570777893, 0.63529413938522, 0.64705884456635), 1, Color3.new(0.10588236153126, 0.16470588743687, 0.20784315466881), 0, "Background", UDim2.new(0, 0, 0, 20), UDim2.new(0, 200, 0, 150), Enum.SizeConstraint.RelativeXY , Enum.FrameStyle.Custom , true, 1, true, false, false)
CreateFrame("Background2", false, Color3.new(0.63921570777893, 0.63529413938522, 0.64705884456635), 0.5, Color3.new(0.10588236153126, 0.16470588743687, 0.20784315466881), 0, "Background2", UDim2.new(0, 0, 0, 170), UDim2.new(0, 200, 0, 36), Enum.SizeConstraint.RelativeXY , Enum.FrameStyle.Custom , true, 1, true, false, false)
CreateTextButton("Close", true, true, Color3.new(0, 0, 0), 0, Color3.new(0.10588236153126, 0.16470588743687, 0.20784315466881), 0, false, "Close", UDim2.new(0.89999997615814, 0, 0, 0), false, UDim2.new(0.10000000149012, 0, 1, 0), Enum.SizeConstraint.RelativeXY , Enum.ButtonStyle.Custom , true, 1, true, false, false, Enum.Font.ArialBold , Enum.FontSize.Size24 , "X", Color3.new(1, 0, 0), false , Color3.new(0, 0, 0), 1 , 0, true , Enum.TextXAlignment.Center , Enum.TextYAlignment.Center)
CreateTextLabel("DragbarText", false, Color3.new(0.63921570777893, 0.63529413938522, 0.64705884456635), 1, Color3.new(0.10588236153126, 0.16470588743687, 0.20784315466881), 1, "DragbarText", UDim2.new(0, 0, 0, 0), UDim2.new(0.89999997615814, 0, 1, 0), Enum.SizeConstraint.RelativeXY , true, 1, true, false, false, Enum.Font.Legacy , Enum.FontSize.Size10 , "Scriptural's CFrame Plugin", Color3.new(0, 0, 0), false , Color3.new(0, 0, 0), 1 , 0, true , Enum.TextXAlignment.Center , Enum.TextYAlignment.Center)
CreateTextBox("By", true, Color3.new(0.63921570777893, 0.63529413938522, 0.64705884456635), 0.5, Color3.new(0, 0, 0), 0, false, false , "By", UDim2.new(0.25, 0, 0, 0), UDim2.new(0.5, 0, 0.25, 0), Enum.SizeConstraint.RelativeXY , true, 1, true, false, false, Enum.Font.SourceSans , Enum.FontSize.Size14 , tostring(ByNumberTable[ByMode]), Color3.new(0, 0, 0), true , Color3.new(0, 0, 0), 1 , 0, true , Enum.TextXAlignment.Center , Enum.TextYAlignment.Center)
CreateTextButton("ByLess", true, true, Color3.new(0.63921570777893, 0.63529413938522, 0.64705884456635), 0.5, Color3.new(0, 0, 0), 0, false, "ByLess", UDim2.new(0, 0, 0, 0), false, UDim2.new(0.25, 0, 0.25, 0), Enum.SizeConstraint.RelativeXY , Enum.ButtonStyle.Custom , true, 1, true, false, false, Enum.Font.SourceSans , Enum.FontSize.Size14 , "<", Color3.new(0, 0, 0), true , Color3.new(0, 0, 0), 1 , 0, true , Enum.TextXAlignment.Center , Enum.TextYAlignment.Center)
CreateTextButton("ByMore", true, true, Color3.new(0.63921570777893, 0.63529413938522, 0.64705884456635), 0.5, Color3.new(0, 0, 0), 0, false, "ByMore", UDim2.new(0.75, 0, 0, 0), false, UDim2.new(0.25, 0, 0.25, 0), Enum.SizeConstraint.RelativeXY , Enum.ButtonStyle.Custom , true, 1, true, false, false, Enum.Font.SourceSans , Enum.FontSize.Size14 , ">", Color3.new(0, 0, 0), true , Color3.new(0, 0, 0), 1 , 0, true , Enum.TextXAlignment.Center , Enum.TextYAlignment.Center)
CreateTextButton("XLess", true, true, Color3.new(0.63921570777893, 0.63529413938522, 0.64705884456635), 0.5, Color3.new(0, 0, 0), 0, false, "XLess", UDim2.new(0, 0, 0.25, 0), false, UDim2.new(0.25, 0, 0.25, 0), Enum.SizeConstraint.RelativeXY , Enum.ButtonStyle.Custom , true, 1, true, false, false, Enum.Font.SourceSans , Enum.FontSize.Size14 , "<", Color3.new(0, 0, 0), true , Color3.new(0, 0, 0), 1 , 0, true , Enum.TextXAlignment.Center , Enum.TextYAlignment.Center)
CreateTextButton("XMore", true, true, Color3.new(0.63921570777893, 0.63529413938522, 0.64705884456635), 0.5, Color3.new(0, 0, 0), 0, false, "XMore", UDim2.new(0.75, 0, 0.25, 0), false, UDim2.new(0.25, 0, 0.25, 0), Enum.SizeConstraint.RelativeXY , Enum.ButtonStyle.Custom , true, 1, true, false, false, Enum.Font.SourceSans , Enum.FontSize.Size14 , ">", Color3.new(0, 0, 0), true , Color3.new(0, 0, 0), 1 , 0, true , Enum.TextXAlignment.Center , Enum.TextYAlignment.Center)
CreateTextButton("YLess", true, true, Color3.new(0.63921570777893, 0.63529413938522, 0.64705884456635), 0.5, Color3.new(0, 0, 0), 0, false, "YLess", UDim2.new(0, 0, 0.5, 0), false, UDim2.new(0.25, 0, 0.25, 0), Enum.SizeConstraint.RelativeXY , Enum.ButtonStyle.Custom , true, 1, true, false, false, Enum.Font.SourceSans , Enum.FontSize.Size14 , "<", Color3.new(0, 0, 0), true , Color3.new(0, 0, 0), 1 , 0, true , Enum.TextXAlignment.Center , Enum.TextYAlignment.Center)
CreateTextButton("YMore", true, true, Color3.new(0.63921570777893, 0.63529413938522, 0.64705884456635), 0.5, Color3.new(0, 0, 0), 0, false, "YMore", UDim2.new(0.75, 0, 0.5, 0), false, UDim2.new(0.25, 0, 0.25, 0), Enum.SizeConstraint.RelativeXY , Enum.ButtonStyle.Custom , true, 1, true, false, false, Enum.Font.SourceSans , Enum.FontSize.Size14 , ">", Color3.new(0, 0, 0), true , Color3.new(0, 0, 0), 1 , 0, true , Enum.TextXAlignment.Center , Enum.TextYAlignment.Center)
CreateTextButton("ZLess", true, true, Color3.new(0.63921570777893, 0.63529413938522, 0.64705884456635), 0.5, Color3.new(0, 0, 0), 0, false, "ZLess", UDim2.new(0, 0, 0.75, 0), false, UDim2.new(0.25, 0, 0.25, 0), Enum.SizeConstraint.RelativeXY , Enum.ButtonStyle.Custom , true, 1, true, false, false, Enum.Font.SourceSans , Enum.FontSize.Size14 , "<", Color3.new(0, 0, 0), true , Color3.new(0, 0, 0), 1 , 0, true , Enum.TextXAlignment.Center , Enum.TextYAlignment.Center)
CreateTextButton("ZMore", true, true, Color3.new(0.63921570777893, 0.63529413938522, 0.64705884456635), 0.5, Color3.new(0, 0, 0), 0, false, "ZMore", UDim2.new(0.75, 0, 0.75, 0), false, UDim2.new(0.25, 0, 0.25, 0), Enum.SizeConstraint.RelativeXY , Enum.ButtonStyle.Custom , true, 1, true, false, false, Enum.Font.SourceSans , Enum.FontSize.Size14 , ">", Color3.new(0, 0, 0), true , Color3.new(0, 0, 0), 1 , 0, true , Enum.TextXAlignment.Center , Enum.TextYAlignment.Center)
CreateTextLabel("XBox", false, Color3.new(0.63921570777893, 0.63529413938522, 0.64705884456635), 0.5, Color3.new(0.10588236153126, 0.16470588743687, 0.20784315466881), 0, "XBox", UDim2.new(0.25, 0, 0.25, 0), UDim2.new(0.5, 0, 0.25, 0), Enum.SizeConstraint.RelativeXY , true, 1, true, false, false, Enum.Font.SourceSans , Enum.FontSize.Size14 , "X", Color3.new(0, 0, 0), true , Color3.new(0, 0, 0), 1 , 0, true , Enum.TextXAlignment.Center , Enum.TextYAlignment.Center)
CreateTextLabel("YBox", false, Color3.new(0.63921570777893, 0.63529413938522, 0.64705884456635), 0.5, Color3.new(0.10588236153126, 0.16470588743687, 0.20784315466881), 0, "YBox", UDim2.new(0.25, 0, 0.5, 0), UDim2.new(0.5, 0, 0.25, 0), Enum.SizeConstraint.RelativeXY , true, 1, true, false, false, Enum.Font.SourceSans , Enum.FontSize.Size14 , "Y", Color3.new(0, 0, 0), true , Color3.new(0, 0, 0), 1 , 0, true , Enum.TextXAlignment.Center , Enum.TextYAlignment.Center)
CreateTextLabel("ZBox", false, Color3.new(0.63921570777893, 0.63529413938522, 0.64705884456635), 0.5, Color3.new(0.10588236153126, 0.16470588743687, 0.20784315466881), 0, "ZBox", UDim2.new(0.25, 0, 0.75, 0), UDim2.new(0.5, 0, 0.25, 0), Enum.SizeConstraint.RelativeXY , true, 1, true, false, false, Enum.Font.SourceSans , Enum.FontSize.Size14 , "Z", Color3.new(0, 0, 0), true , Color3.new(0, 0, 0), 1 , 0, true , Enum.TextXAlignment.Center , Enum.TextYAlignment.Center)
CreateTextButton("ToggleButton", true, true, Color3.new(0, 1, 0), 0.5, Color3.new(0.10588236153126, 0.16470588743687, 0.20784315466881), 0, false, "Toggle", UDim2.new(0, 0, 0, 0), false, UDim2.new(1, 0, 0.5, 0), Enum.SizeConstraint.RelativeXY , Enum.ButtonStyle.Custom , true, 1, true, false, false, Enum.Font.SourceSans , Enum.FontSize.Size14 , "CFrame", Color3.new(0, 0, 0), true , Color3.new(0, 0, 0), 1 , 0, true , Enum.TextXAlignment.Center , Enum.TextYAlignment.Center)
CreateTextButton("WeldButton", true, true, Color3.new(1, 0, 0), 0.5, Color3.new(0.10588236153126, 0.16470588743687, 0.20784315466881), 0, false, "WeldButton", UDim2.new(0, 0, 0.5, 0), false, UDim2.new(1, 0, 0.5, 0), Enum.SizeConstraint.RelativeXY , Enum.ButtonStyle.Custom , true, 1, true, false, false, Enum.Font.SourceSans , Enum.FontSize.Size14 , "Weld", Color3.new(0, 0, 0), true , Color3.new(0, 0, 0), 1 , 0, true , Enum.TextXAlignment.Center , Enum.TextYAlignment.Center) end ------------------ --{Creating Gui}-- ------------------
--------------- --{Parenting}-- --------------- do Dragbar.Parent = ScreenGui
Background.Parent, Background2.Parent, Close.Parent, DragbarText.Parent = Dragbar, Dragbar, Dragbar, Dragbar
By.Parent, ByLess.Parent, ByMore.Parent, XLess.Parent, XMore.Parent, YLess.Parent, YMore.Parent, ZLess.Parent, ZMore.Parent, XBox.Parent, YBox.Parent, ZBox.Parent = Background, Background, Background, Background, Background, Background, Background, Background, Background, Background, Background, Background
ToggleButton.Parent, WeldButton.Parent = Background2, Background2
ScreenGui.Parent = Game.CoreGui end --------------- --{Parenting}-- ---------------
--------------------- --{Click functions}-- --------------------- do Close.MouseButton1Down:connect(function() Dragbar.Visible = false end)
ByLess.MouseButton1Down:connect(function() if ByMode == 1 then ByMode = #ByNumberTable else ByMode = ByMode - 1 end By.Text = tostring(ByNumberTable[ByMode]) end) ByMore.MouseButton1Down:connect(function() if ByMode == #ByNumberTable then ByMode = 1 else ByMode = ByMode + 1 end By.Text = tostring(ByNumberTable[ByMode]) end) XLess.MouseButton1Down:connect(function() print("XLess " .. tostring(Number(By.Text))) end) XMore.MouseButton1Down:connect(function() print("XMore " .. tostring(Number(By.Text))) end) YLess.MouseButton1Down:connect(function() print("YLess " .. tostring(Number(By.Text))) end) YMore.MouseButton1Down:connect(function() print("YMore " .. tostring(Number(By.Text))) end) ZLess.MouseButton1Down:connect(function() print("ZLess " .. tostring(Number(By.Text))) end) ZMore.MouseButton1Down:connect(function() print("ZMore " .. tostring(Number(By.Text))) end) end --------------------- --{Click functions}-- ---------------------
--------------------------- --{Plugin Click function}-- --------------------------- do Button.Click:connect(function() Dragbar.Visible = not Dragbar.Visible end) end --------------------------- --{Plugin Click function}-- --------------------------- |
|
|
| Report Abuse |
|