Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game.StarterGui:SetCoreGuiEnabled(2, false);
- local l__LocalPlayer__1 = game.Players.LocalPlayer;
- local v2 = l__LocalPlayer__1.Character or l__LocalPlayer__1.CharacterAdded:wait();
- local l__TweenService__3 = game:GetService("TweenService");
- local l__Parent__4 = script.Parent;
- local l__mouse__5 = l__LocalPlayer__1:GetMouse();
- local u1 = {};
- local function u2()
- for v6 = 1, 13 do
- if not u1[v6] then
- return v6;
- end;
- end;
- end;
- local l__Hotbar__3 = l__Parent__4.Hotbar;
- local l__UserInputService__4 = game:GetService("UserInputService");
- local u5 = {
- [Enum.KeyCode.ButtonL1] = 1,
- [Enum.KeyCode.ButtonL2] = 2,
- [Enum.KeyCode.ButtonR2] = 3,
- [Enum.KeyCode.ButtonR1] = 4
- };
- local l__Humanoid__6 = v2:WaitForChild("Humanoid");
- local l__Backpack__7 = l__LocalPlayer__1.Backpack;
- local u8 = nil;
- local function v7(p1)
- if not p1 or not (not p1:GetAttribute("Regged")) or not p1:IsA("Tool") then
- return;
- end;
- p1:SetAttribute("Regged", true);
- local v8 = u2();
- if v8 then
- u1[v8] = p1;
- l__Hotbar__3[v8].ToolName.Text = p1:GetAttribute("FakeName") or p1.Name;
- if l__UserInputService__4.GamepadEnabled then
- l__Hotbar__3[v8].Number.TextWrapped = false;
- l__Hotbar__3[v8].Number.TextXAlignment = "Left";
- l__Hotbar__3[v8].Number.Text = (function()
- for v9, v10 in pairs(u5) do
- if v10 == v8 then
- return string.gsub(v9.Name, "Button", ""):gsub("1", "B"):gsub("2", "T");
- end;
- end;
- end)();
- end;
- l__Hotbar__3[v8].Visible = true;
- local u9 = nil;
- local u10 = l__Hotbar__3[v8];
- u9 = p1:GetAttributeChangedSignal("FakeName"):Connect(function()
- if not p1 or not p1.Parent then
- return u9:Disconnect();
- end;
- u10.ToolName.Text = p1:GetAttribute("FakeName") or p1.Name;
- end);
- local v11 = l__Hotbar__3[v8].MouseButton1Down:Connect(function()
- if not p1:GetAttribute("Skill") or not l__LocalPlayer__1:GetAttribute("S_AutoUnequip") then
- return;
- end;
- l__Humanoid__6:EquipTool(p1);
- p1.Parent = l__Backpack__7;
- if u8 then
- u8.Overlay.ImageTransparency = 1;
- local l__Cooldown__12 = u8:FindFirstChild("Cooldown");
- if l__Cooldown__12 then
- l__Cooldown__12.BackgroundColor3 = Color3.fromRGB(255, 78, 78);
- end;
- u8 = nil;
- end;
- end);
- local u11 = l__Hotbar__3[v8].MouseButton1Click:Connect(function()
- if p1:GetAttribute("Skill") and l__LocalPlayer__1:GetAttribute("S_AutoUnequip") then
- if u8 then
- u8.Overlay.ImageTransparency = 1;
- local l__Cooldown__13 = u8:FindFirstChild("Cooldown");
- if l__Cooldown__13 then
- l__Cooldown__13.BackgroundColor3 = Color3.fromRGB(255, 78, 78);
- end;
- u8 = nil;
- end;
- return;
- end;
- if u8 == l__Hotbar__3[v8] then
- u8.Overlay.ImageTransparency = 1;
- local l__Cooldown__14 = u8:FindFirstChild("Cooldown");
- if l__Cooldown__14 then
- l__Cooldown__14.BackgroundColor3 = Color3.fromRGB(255, 78, 78);
- end;
- u8 = nil;
- l__Humanoid__6:UnequipTools();
- return;
- end;
- if u8 then
- u8.Overlay.ImageTransparency = 1;
- local l__Cooldown__15 = u8:FindFirstChild("Cooldown");
- if l__Cooldown__15 then
- l__Cooldown__15.BackgroundColor3 = Color3.fromRGB(255, 78, 78);
- end;
- end;
- local l__Cooldown__16 = l__Hotbar__3[v8]:FindFirstChild("Cooldown");
- if l__Cooldown__16 then
- l__Cooldown__16.BackgroundColor3 = Color3.fromRGB(255, 78, 78);
- end;
- l__Hotbar__3[v8].Overlay.ImageTransparency = 0;
- u8 = l__Hotbar__3[v8];
- l__Humanoid__6:EquipTool(p1);
- end);
- local u12 = l__Hotbar__3[v8].MouseButton1Up:Connect(function()
- if not p1:GetAttribute("Skill") or not l__LocalPlayer__1:GetAttribute("S_AutoUnequip") then
- return;
- end;
- return v2.Communicate:FireServer({
- Goal = "Auto Use End",
- Tool = p1
- });
- end);
- p1:GetPropertyChangedSignal("Parent"):Connect(function()
- if not p1.Parent then
- if u11 then
- u11:Disconnect();
- end;
- if u12 then
- u12:Disconnect();
- end;
- u1[v8] = nil;
- l__Hotbar__3[v8].ToolName.Text = "";
- l__Hotbar__3[v8].Overlay.ImageTransparency = 1;
- l__Hotbar__3[v8].Visible = false;
- end;
- end);
- end;
- game.StarterGui:SetCoreGuiEnabled(2, false);
- end;
- local u13 = {
- [Enum.KeyCode.One] = 1,
- [Enum.KeyCode.Two] = 2,
- [Enum.KeyCode.Three] = 3,
- [Enum.KeyCode.Four] = 4,
- [Enum.KeyCode.Five] = 5,
- [Enum.KeyCode.Six] = 6,
- [Enum.KeyCode.Seven] = 7,
- [Enum.KeyCode.Eight] = 8,
- [Enum.KeyCode.Nine] = 9,
- [Enum.KeyCode.Zero] = 10
- };
- l__UserInputService__4.InputBegan:Connect(function(p2, p3)
- if p3 then
- return;
- end;
- local l__KeyCode__17 = p2.KeyCode;
- if u5[l__KeyCode__17] then
- local v18 = u5[l__KeyCode__17];
- if u1[v18] then
- v2.Communicate:FireServer({
- Goal = "Console Move",
- Tool = u1[v18]
- });
- end;
- return;
- end;
- if not u13[l__KeyCode__17] then
- return;
- end;
- local v19 = u13[l__KeyCode__17];
- if u1[v19] then
- local v20 = u1[v19];
- if v20:GetAttribute("Skill") and l__LocalPlayer__1:GetAttribute("S_AutoUnequip") then
- l__Humanoid__6:EquipTool(v20);
- v20.Parent = l__Backpack__7;
- if u8 then
- u8.Overlay.ImageTransparency = 1;
- local l__Cooldown__21 = u8:FindFirstChild("Cooldown");
- if l__Cooldown__21 then
- l__Cooldown__21.BackgroundColor3 = Color3.fromRGB(255, 78, 78);
- end;
- u8 = nil;
- end;
- return;
- end;
- if u8 == l__Hotbar__3[v19] then
- u8.Overlay.ImageTransparency = 1;
- local l__Cooldown__22 = u8:FindFirstChild("Cooldown");
- if l__Cooldown__22 then
- l__Cooldown__22.BackgroundColor3 = Color3.fromRGB(255, 78, 78);
- end;
- u8 = nil;
- l__Humanoid__6:UnequipTools();
- return;
- end;
- if u8 then
- u8.Overlay.ImageTransparency = 1;
- local l__Cooldown__23 = u8:FindFirstChild("Cooldown");
- if l__Cooldown__23 then
- l__Cooldown__23.BackgroundColor3 = Color3.fromRGB(255, 78, 78);
- end;
- end;
- local l__Cooldown__24 = l__Hotbar__3[v19]:FindFirstChild("Cooldown");
- if l__Cooldown__24 then
- l__Cooldown__24.BackgroundColor3 = Color3.fromRGB(255, 78, 78);
- end;
- l__Hotbar__3[v19].Overlay.ImageTransparency = 0;
- u8 = l__Hotbar__3[v19];
- l__Humanoid__6:EquipTool(v20);
- end;
- end);
- l__UserInputService__4.InputEnded:Connect(function(p4, p5)
- local v25 = nil;
- if p5 then
- return;
- end;
- local l__KeyCode__26 = p4.KeyCode;
- if u5[l__KeyCode__26] then
- local v27 = u5[l__KeyCode__26];
- if u1[v27] then
- v2.Communicate:FireServer({
- Goal = "Console Move End",
- Tool = u1[v27]
- });
- end;
- return;
- end;
- if not u13[l__KeyCode__26] then
- return;
- end;
- local v28 = u13[l__KeyCode__26];
- if u1[v28] then
- v25 = u1[v28];
- if not v25:GetAttribute("Skill") or not l__LocalPlayer__1:GetAttribute("S_AutoUnequip") then
- return;
- end;
- else
- return;
- end;
- return v2.Communicate:FireServer({
- Goal = "Auto Use End",
- Tool = v25
- });
- end);
- l__Backpack__7.ChildAdded:Connect(v7);
- for v29, v30 in pairs(l__Backpack__7:GetChildren()) do
- if v30:IsA("Tool") then
- v7(v30);
- end;
- end;
- local u14 = {};
- function shared.ResetCooldowns()
- for v31, v32 in pairs(u14) do
- if v32.Parent then
- v32:Destroy();
- local v33 = script.Cooldown:Clone();
- v33.Name = "";
- v33.BackgroundColor3 = Color3.new(1, 1, 1);
- v33.Parent = v32.Parent;
- l__TweenService__3:Create(v33, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
- BackgroundTransparency = 1
- }):Play();
- game:service("Debris"):AddItem(v33, 0.5);
- end;
- end;
- table.clear(u14);
- end;
- function shared.CooldownIndicator(p6)
- local l__Name__34 = p6.Name;
- local l__Cooldown__35 = p6.Cooldown;
- for v36, v37 in pairs(u1) do
- if v37 and v37.Parent and v37.Name == l__Name__34 then
- local v38 = l__Hotbar__3[v36];
- local v39 = script.Cooldown:Clone();
- if v37.Parent == v2 then
- v39.BackgroundColor3 = Color3.fromRGB(255, 78, 78);
- end;
- v39.Parent = v38;
- l__TweenService__3:Create(v39, TweenInfo.new(l__Cooldown__35, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
- Size = UDim2.new(1, 0, 0, 0)
- }):Play();
- table.insert(u14, v39);
- task.delay(l__Cooldown__35, function()
- if not v39.Parent then
- return;
- end;
- local v40 = script.Cooldown:Clone();
- v40.Name = "";
- v40.BackgroundColor3 = Color3.new(1, 1, 1);
- v40.Parent = v38;
- l__TweenService__3:Create(v40, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
- BackgroundTransparency = 1
- }):Play();
- game:service("Debris"):AddItem(v40, 0.5);
- v39:Destroy();
- end);
- local u15 = nil;
- u15 = v38:GetPropertyChangedSignal("Visible"):Connect(function()
- if v38.Visible then
- return;
- end;
- game:GetService("Debris"):AddItem(v39, 0);
- return u15:Disconnect();
- end);
- return;
- end;
- end;
- end;
- function shared.BackpackVisibility(p7)
- l__Parent__4.Visible = p7;
- end;
- --[[game.ReplicatedStorage.OnCooldown.OnClientEvent:Connect(function(Tools,times)
- spawn(function()
- for i,v in pairs(script.Parent.Hotbar:GetDescendants()) do
- if v:IsA("TextButton") then
- if v.Overlay.ImageTransparency == 0 and v.ToolName.Text == Tools then
- v.Overlay.ImageTransparency = 1
- local cooldown = script.Cooldown:Clone()
- cooldown.Parent = v
- l__TweenService__3:Create(cooldown, TweenInfo.new(times, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
- Size = UDim2.new(1, 0, 0, 0)
- }):Play();
- task.delay(times,function()
- local v40 = script.Cooldown:Clone();
- v40.Name = "";
- v40.BackgroundColor3 = Color3.new(1, 1, 1);
- v40.Parent = v;
- l__TweenService__3:Create(v40, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
- BackgroundTransparency = 1
- }):Play();
- game:service("Debris"):AddItem(v40, 0.5);
- cooldown:Destroy()
- end)
- end
- end
- end
- end)
- end)]]
- game.ReplicatedStorage.OnCooldown.OnClientEvent:Connect(function(Tools,times)
- local l__Name__34 = Tools;
- local l__Cooldown__35 = times;
- for v36, v37 in pairs(u1) do
- if v37 and v37.Parent and v37.Name == l__Name__34 then
- local v38 = l__Hotbar__3[v36];
- local v39 = script.Cooldown:Clone();
- if v37.Parent == v2 then
- v39.BackgroundColor3 = Color3.fromRGB(255, 78, 78);
- end;
- v39.Parent = v38;
- l__TweenService__3:Create(v39, TweenInfo.new(l__Cooldown__35, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
- Size = UDim2.new(1, 0, 0, 0)
- }):Play();
- table.insert(u14, v39);
- task.delay(l__Cooldown__35, function()
- if not v39.Parent then
- return;
- end;
- local v40 = script.Cooldown:Clone();
- v40.Name = "";
- v40.BackgroundColor3 = Color3.new(1, 1, 1);
- v40.Parent = v38;
- l__TweenService__3:Create(v40, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
- BackgroundTransparency = 1
- }):Play();
- game:service("Debris"):AddItem(v40, 0.5);
- v39:Destroy();
- end);
- local u15 = nil;
- u15 = v38:GetPropertyChangedSignal("Visible"):Connect(function()
- if v38.Visible then
- return;
- end;
- game:GetService("Debris"):AddItem(v39, 0);
- return u15:Disconnect();
- end);
- return;
- end;
- end;
- end)
Advertisement
Add Comment
Please, Sign In to add comment