Advertisement
Guest User

Island 2 Script

a guest
Apr 26th, 2018
4,369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.10 KB | None | 0 0
  1. warn'\n\n\t\t\t\t\tScript: Island2GUI.lua\n\t\t\t\tAuthor: ic3w0lf\n\n'local a='I2-FW'local b=game:GetService'Players'.LocalPlayer;local c=getgenv and game:service'CoreGui'.RobloxGui or b:WaitForChild'PlayerGui'if c:FindFirstChild(a)then c[a]:Destroy()end;local d=Instance.new('ScreenGui',c)d.Name=a;local e=Instance.new('Frame',d)e.BackgroundTransparency=.8;e.Active=true;e.Draggable=true;e.Size=UDim2.new(0,0,0,8)e.Position=UDim2.new(0,300,0,400)e.BackgroundColor3=Color3.fromRGB(22,22,22)e.BorderColor3=Color3.fromRGB(100,100,100)local f=Instance.new('TextLabel',e)f.BackgroundTransparency=1;f.Size=UDim2.new(1,0,0,15)f.Text='>'f.TextXAlignment='Left'f.TextColor3=Color3.new(1,1,0)f.Position=UDim2.new(0,0,1,0)f.TextStrokeTransparency=.3;f.TextStrokeColor3=Color3.new(0,0,0)local g=Instance.new('TextLabel',e)g.BackgroundTransparency=1;g.Size=UDim2.new(1,0,0,15)g.Text='<'g.TextXAlignment='Right'g.TextColor3=Color3.new(1,1,0)g.Position=UDim2.new(0,0,1,0)g.TextStrokeTransparency=.3;g.TextStrokeColor3=Color3.new(0,0,0)local h=Instance.new'TextLabel'h.BackgroundTransparency=1;h.TextColor3=Color3.new(1,1,1)h.Size=UDim2.new(1,0,0,15)h.TextStrokeTransparency=.3;h.TextStrokeColor3=Color3.new(0,0,0)local i=1;local j=i;local k={options={}}function k:add(l,m)if typeof(l)~='string'or typeof(m)~='function'then return warn'invalid arguments'end;local n=h:Clone()n.Text=l;n.Position=UDim2.new(0,0,1,20*#k.options)n.TextColor3=#k.options+1==i and Color3.new(1,1,0)or Color3.new(1,1,1)n.Parent=e;if e.AbsoluteSize.X-25<n.TextBounds.X then e.Size=UDim2.new(0,n.TextBounds.X+50,0,8)end;local o={text=l,func=m,index=#k.options+1,gui=n}table.insert(k.options,o)end;local function p(q)if typeof(q)=='string'then return q:match'^%s+$'~=nil or#q==0 or q==''end;return true end;local r=false;local function s(l,t,u,v)if r then return end;r=true;local w=Instance.new('TextBox',d)w.BackgroundTransparency=.45;w.BorderSizePixel=1;w.Size=UDim2.new(0,240,0,25)w.Position=UDim2.new(.5,-w.Size.X.Offset/2,0,-w.Size.Y.Offset*2)w.BackgroundColor3=Color3.new(0,0,0)w.TextColor3=Color3.new(1,1,1)w.TextStrokeTransparency=.3;w.TextStrokeColor3=Color3.new(0,0,0)w.Text=''w.PlaceholderText=v;w:TweenPosition(UDim2.new(.5,-w.Size.X.Offset/2,.5,-w.Size.Y.Offset/2-120),'In','Quad',.3,true)spawn(function()while w.Parent~=nil do wait()w.BorderColor3=Color3.fromHSV(tick()*128%255/255,1,1)end end)w.Changed:connect(function(x)if x=='Text'then if not w.TextFits then w.Size=UDim2.new(0,w.TextBounds.X+2,0,25)w.Position=UDim2.new(.5,-w.Size.X.Offset/2,.5,-w.Size.Y.Offset/2-120)end;if not p(u)then w.Text=w.Text:match(u)or''end end end)w:CaptureFocus()w.FocusLost:connect(function()r=false;w:TweenPosition(UDim2.new(.5,-w.Size.X.Offset/2,-1,-w.Size.Y.Offset),'In','Quad',.6,true,function(y)if y==Enum.TweenStatus.Completed then w:Destroy()end end)t(w.Text)end)end;function loop(z,m)spawn(function()while wait(z)do pcall(m)if d.Parent~=c then break end end end)end;local A=setmetatable({},{__index=function(B,C)return false end,__newindex=function(B,C,D)rawset(B,C,D)end})function Initialize()overrideFunction('ExampleFunction',function(E,...)local F={...}return E(...)end)end;k:add('Auto Take Everything [OFF]',function(self)A['ate']=not A['ate']self.gui.Text='Auto Take Everything ['..(A['ate']and'ON'or'OFF')..']'end)k:add('Auto Take Luggage [OFF]',function(self)A['atl']=not A['atl']self.gui.Text='Auto Take Luggage ['..(A['atl']and'ON'or'OFF')..']'end)k:add('Cut Near Trees',function(self)for G,H in pairs(workspace.Trees:GetChildren())do if H:FindFirstChild'HumanoidRootPart'then local I=false;if input.down.leftcontrol then workspace.Remoter.TreeCut:FireServer(H,'Axe')else if(H.HumanoidRootPart.Position-locals.char.HumanoidRootPart.Position).magnitude<100 then workspace.Remoter.TreeCut:FireServer(H,'Axe')end end end end end)k:add('Pickup Near Items',function(self)for G,H in pairs(workspace:GetChildren())do if H:IsA'BasePart'and H:FindFirstChild'Inspect'and(H.Position-locals.char.HumanoidRootPart.Position).magnitude<100 then workspace.Remoter.Take:InvokeServer(H)end end end)k:add('Take Near Suitcases',function(self)for G,H in pairs(workspace:GetDescendants())do if H:IsA'Model'and H.Name=='Suitcase'and H:FindFirstChild'Part'and(H.Part.Position-locals.char.HumanoidRootPart.Position).magnitude<100 then workspace.Remoter.Luggage:FireServer(H)end end end)k:add('Kill Near Animals',function(self)for G,H in pairs(workspace.Animals:GetChildren())do if H:IsA'Model'and H:FindFirstChild'ANIMAL'and(H.ANIMAL.HumanoidRootPart.Position-locals.char.HumanoidRootPart.Position).magnitude<100 then for G=1,4 do workspace.Remoter.ZombieCut:FireServer(H,'Axe')end end end end)k:add('Take Near Ores',function(self)for G,H in pairs(workspace.Ores:GetChildren())do for G=1,10 do workspace.Remoter.OreMine:FireServer(H,'Pickaxe')end end;wait(.5)for G,H in pairs(workspace:GetChildren())do if H:IsA'BasePart'and H:FindFirstChild'Inspect'and(H.Position-locals.char.HumanoidRootPart.Position).magnitude<100 then spawn(function()workspace.Remoter.Take:InvokeServer(H)end)end end end)loop(.5,function()if A['atl']then for G,H in pairs(workspace:GetDescendants())do if H:IsA'Model'and H.Name=='Suitcase'then workspace.Remoter.Luggage:FireServer(H)end end end;if A['ate']then for G,H in pairs(workspace:GetChildren())do if H:FindFirstChild'Inspect'then spawn(function()workspace.Remoter.Take:InvokeServer(H)end)end end end end)assert(Initialize)()local function J(K)f:TweenPosition(UDim2.new(0,0,1,20*(K-1)),'In','Quint',.075,true)g:TweenPosition(UDim2.new(0,0,1,20*(K-1)),'In','Quint',.075,true)for G,H in pairs(k.options)do if H.index==K then H.gui.TextColor3=Color3.new(1,1,0)else H.gui.TextColor3=Color3.new(1,1,1)end;if e.AbsoluteSize.X-25<H.gui.TextBounds.X then e.Size=UDim2.new(0,H.gui.TextBounds.X+50,0,8)end end end;game:GetService'UserInputService'.InputEnded:connect(function(input,L)if not L and d.Parent~=nil then if input.KeyCode.Name=='KeypadFive'or input.KeyCode.Name=='Equals'then pcall(k.options[i].func,k.options[i])elseif input.KeyCode.Name=='KeypadEight'or input.KeyCode.Name=='LeftBracket'then i=i-1 elseif input.KeyCode.Name=='KeypadTwo'or input.KeyCode.Name=='RightBracket'then i=i+1 end;if i<1 then i=#k.options elseif i>#k.options then i=1 end;J(i,j)end end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement