Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print'Run Local'
- print'R = Clear clipboard.';
- print'E = Copy mode enabled/disabled.';print'F = Copy Text thats on the mouse.'
- print'More options coming soon.';
- print'Settings in script'
- print'https://pastebin.com/raw/U9BH33ar'
- local Clear_Key = 'r'
- local Enable_Key = 'e'
- local Get_Text_Key = 'f'
- local Take_One_Text_Only = true
- script.Name='Clipboard';wait();
- local players,Target_Gui_Objects,TB_Enabled=
- game:service'Players',{'TextBox','TextButton','TextLabel'},false;
- local lp_1=players.LocalPlayer;
- local lp_2,mouse=players[lp_1.Name],lp_1:GetMouse();
- local pg=lp_2:FindFirstChildWhichIsA'PlayerGui'or(function()error'Can not find PlayerGui';
- end)();
- local function Get_UI()
- local sg=pg:FindFirstChild'∞Clip'or(function()local a=Instance.new("ScreenGui",pg);
- a.Name='∞Clip';a.ResetOnSpawn=true;return a;end)();
- local tb=sg:FindFirstChildWhichIsA'TextBox'or(function()
- local a=Instance.new("TextBox",sg);a.BackgroundColor3=Color3.new(0,0,0);
- a.BorderColor3=Color3.new(1,1,1);a.Position=UDim2.new(0,0,.5,0);
- a.Size=UDim2.new(.25,0,.5,0);a.Font='Code';a.Text='';
- a.TextColor3=Color3.new(1,1,1);a.TextWrapped=true;a.ClearTextOnFocus=false;
- a.TextXAlignment='Left';a.TextYAlignment='Top';a.TextScaled=false;
- a.Text='Clipboard by SoftlockedUnderZero';
- return a;end)();
- tb:TweenPosition(UDim2.new(0,0,1,0));wait(1);
- local function Compare_Value_To_Table(v,t)
- for _,c in pairs(t)do if c==v then return c;end;end;
- end;
- local function Check_For_Gui_Object(v)
- if v then if v.Parent and Compare_Value_To_Table(v.ClassName,Target_Gui_Objects)then
- if v.Parent~=sg then return v;end;end;end;
- end;
- local function Mouse_Is_In_Obj(ob)
- local mx,my,abs_size,abs_pos=
- mouse.X,mouse.Y,ob.AbsoluteSize,ob.AbsolutePosition;
- local size_x,size_y,pos_x,pos_y=abs_size.X,abs_size.Y,abs_pos.X,abs_pos.Y;
- local range_x_min,range_x_max,range_y_min,range_y_max=
- pos_x,pos_x+size_x,pos_y,pos_y+size_y;
- if range_x_min<mx and range_x_max>mx and range_y_min<my and range_y_max>my then
- return ob;
- end;
- end;
- local function Check_UIs()
- for _,obj in pairs(pg:GetDescendants())do
- if Check_For_Gui_Object(obj)and TB_Enabled then if Mouse_Is_In_Obj(obj)then
- tb.Text=tb.Text..obj.Text;
- if Take_One_Text_Only then
- break;end;end;end;
- end;
- end;
- local function On_KeyDown(key)
- if key==Clear_Key and TB_Enabled then
- tb.Text='Clipboard by SoftlockedUnderZero';
- tb:TweenPosition(UDim2.new(0,0,1,0));TB_Enabled=false;wait(1);
- elseif key==Enable_Key then TB_Enabled=not TB_Enabled;if TB_Enabled then
- tb:TweenPosition(UDim2.new(0,0,.5,0));else
- tb:TweenPosition(UDim2.new(0,0,1,0));end;wait(1);
- elseif key==Get_Text_Key and TB_Enabled then Check_UIs();
- end;
- end;
- mouse.KeyDown:Connect(On_KeyDown)
- end;wait();Get_UI();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement