Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --BULLET HIT
- local function Hit (cast,result,veloc,bullet)
- local hit = result.Instance
- if hit then
- local hitpos = result.Position
- local findmodel = hit:FindFirstAncestorOfClass("Model")
- if findmodel then
- local hum = findmodel:FindFirstChild("Humanoid")
- if hum then
- local isplayer = game.Players:GetPlayerFromCharacter(findmodel)
- if isplayer then
- if isplayer.Team ~= currentplayer.Team then
- hum:TakeDamage(dmg)
- task.wait(10)
- bullettemplate:Destroy()
- if hum.Health <= 0 then
- local findead = findmodel:FindFirstChild("Dead")
- if findead then
- return
- end
- local dead = Instance.new("IntValue",findmodel)
- dead.Name = "Dead"
- local leaderstats = currentplayer.leaderstats
- local kills = leaderstats.Kills
- kills.Value += 1
- sendfeed:FireAllClients(currentplayer.Name,isplayer.Name,currentplayer.Team.TeamColor.Color,isplayer.Team.TeamColor.Color)
- end
- bullet:Destroy()
- end
- else
- bullet:Destroy()
- hum:TakeDamage(dmg)
- end
- else
- bullet.Position = hitpos
- end
- else
- bullet.Position = hitpos
- end
- debris:AddItem(bullet,4)
- end
- end
- --Set permissinos for roles
- local ReplicatedStorage1 = game:GetService("ReplicatedStorage");
- local Modules2 = ReplicatedStorage1:WaitForChild("Modules");
- local v3 = require(Modules2:WaitForChild("CheckHas"));
- local v4 = require(ReplicatedStorage1:WaitForChild("WeaponsSystem"):WaitForChild("WeaponsSystem"));
- local v5 = require(script.Parent.Confirmation);
- local UserInputService6 = game:GetService("UserInputService");
- local v7 = require(game:GetService("ReplicatedStorage").Icon);
- local v8 = require(Modules2.LikeGoal);
- local LocalPlayer9 = game:GetService("Players").LocalPlayer;
- local PlayerGui10 = LocalPlayer9:WaitForChild("PlayerGui");
- local mouse11 = LocalPlayer9:GetMouse();
- script.Parent.Music.Playing = true;
- script.Parent.Enabled = true;
- local CurrentCamera12 = workspace.CurrentCamera;
- CurrentCamera12.CameraSubject = ReplicatedStorage1.MenuCamera;
- CurrentCamera12.CFrame = ReplicatedStorage1.MenuCamera.CFrame;
- CurrentCamera12.CameraType = "Scriptable";
- local u1 = require(script.spr);
- local u2 = script.Parent.Home;
- local v13 = tick();
- local Home14 = script.Parent:WaitForChild("Home");
- local Teams15 = script.Parent:WaitForChild("Teams");
- local Store16 = script.Parent:WaitForChild("Store");
- local Rules17 = script.Parent:WaitForChild("Rules");
- local LikeGoa18 = Home14.LikeGoal;
- local v19 = { "Patient", "Employee", "Security Department", "Scientist", "Engineer", "Medical Department" };
- local function u3(p1)
- u1.target(u2, 1, 2, {
- Size = UDim2.new(0, 0, 0, 0)
- });
- u1.target(p1, 1, 2, {
- Size = UDim2.new(1, 0, 1, 0)
- });
- u2 = p1;
- end;
- local Group4 = script.Parent:WaitForChild("Group");
- Home14.ButtonClip.Play.MouseButton1Click:Connect(function()
- u3(Group4);
- end);
- Group4.FACILITY.TextButton.MouseButton1Click:Connect(function()
- u3(Teams15);
- end);
- Home14.ButtonClip.Store.MouseButton1Click:Connect(function()
- u3(Store16);
- end);
- Home14.ButtonClip.Rules.MouseButton1Click:Connect(function()
- u3(Rules17);
- end);
- Rules17.Back.MouseButton1Click:Connect(function()
- u3(Home14);
- end);
- Teams15.Back.MouseButton1Click:Connect(function()
- u3(Home14);
- end);
- Group4.Back.MouseButton1Click:Connect(function()
- u3(Home14);
- end);
- Store16.Back.MouseButton1Click:Connect(function()
- u3(Home14);
- end);
- local MarketplaceService20 = game:GetService("MarketplaceService");
- for v21, v22 in pairs(Store16.ButtonClip:GetChildren()) do
- if v22:IsA("Frame") then
- local v23 = MarketplaceService20:GetProductInfo(tonumber(v22.Name) and 0, Enum.InfoType.GamePass);
- v22.Logo.Image = "rbxassetid://" .. (v23 and v23.IconImageAssetId) and 9117342187;
- if not game:GetService("MarketplaceService"):UserOwnsGamePassAsync(LocalPlayer9.UserId, v22.Name) then
- v22.Buy.MouseButton1Click:Connect(function()
- if not game:GetService("MarketplaceService"):UserOwnsGamePassAsync(LocalPlayer9.UserId, v22.Name) and v22.Buy.Text ~= "BOUGHT" then
- game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer, v22.Name);
- end;
- end);
- game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(p2, p3, p4)
- if p3 == tonumber(v22.Name) and p4 then
- v22.Buy.Text = "BOUGHT";
- v22.Title.TextColor3 = Color3.fromRGB(0, 255, 0);
- v22.Logo.ImageColor3 = Color3.fromRGB(0, 255, 0);
- end;
- end);
- else
- v22.Buy.Text = "BOUGHT";
- v22.Title.TextColor3 = Color3.fromRGB(0, 255, 0);
- v22.Logo.ImageColor3 = Color3.fromRGB(0, 255, 0);
- end;
- end;
- end;
- local TeamChanger24 = game.ReplicatedStorage:WaitForChild("Events"):WaitForChild("TeamChanger");
- local TweenService25 = game:GetService("TweenService");
- local MarketplaceService26 = game:GetService("MarketplaceService");
- local v27 = TeamChanger24:InvokeServer("GetTeams");
- local v28 = v7.new();
- v28:setName("MenuIcon");
- v28:setLabel("Menu");
- v28:setEnabled(false);
- v28:bindEvent("selected", function()
- v28:deselect();
- if TeamChanger24:InvokeServer("ChangeTeam", game.Teams.Choosing) then
- script.Parent.Enabled = true;
- u3(Home14);
- v28:setEnabled(false);
- script.Parent.Music:Play();
- script.Parent.Music.Volume = 0.8;
- script.Parent.Parent.Playerlist.Enabled = false;
- script.Parent.Parent.WardenGui.Enabled = false;
- game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, false);
- local CurrentCamera29 = workspace.CurrentCamera;
- CurrentCamera29.CameraSubject = game.ReplicatedStorage.MenuCamera;
- CurrentCamera29.CFrame = game.ReplicatedStorage.MenuCamera.CFrame;
- CurrentCamera29.CameraType = "Scriptable";
- mouse11.Icon = "";
- end;
- end);
- task.spawn(function()
- LocalPlayer9:WaitForChild("ScavCooldown", math.huge);
- Group4.SCAV.TextButton.MouseButton1Click:Connect(function()
- if game.ReplicatedStorage.Events.CheckCooldownScav:InvokeServer() then
- v5().Pressed:Connect(function()
- if tonumber(LocalPlayer9.ScavCooldown.Value) > 0 and math.floor(tick() - tonumber(LocalPlayer9.ScavCooldown.Value)) < 300 then
- return;
- end;
- if game.ReplicatedStorage.Events.RequestScav:InvokeServer() then
- script.Parent.Music.Volume = 0;
- u3(Home14);
- script.Parent.Enabled = false;
- script.Parent.Parent.Playerlist.Enabled = true;
- script.Parent.Parent.WardenGui.Enabled = true;
- v28:setEnabled(true);
- game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true);
- local CurrentCamera30 = workspace.CurrentCamera;
- CurrentCamera30.CameraSubject = game.Players.LocalPlayer.Character.Humanoid;
- CurrentCamera30.CameraType = "Custom";
- game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false);
- game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true);
- task.wait(0.3);
- end;
- end);
- return;
- end;
- game.StarterGui:SetCore("SendNotification", {
- Title = "Notification",
- Text = "Scavenger raid is on cooldown.",
- Icon = "",
- Duration = 5
- });
- end);
- end);
- ReplicatedStorage1:WaitForChild("Events"):WaitForChild("ScavMenu").OnClientEvent:Connect(function()
- script.Parent.Enabled = true;
- u3(Home14);
- v28:setEnabled(false);
- script.Parent.Music:Play();
- script.Parent.Music.Volume = 0.8;
- script.Parent.Parent.Playerlist.Enabled = false;
- script.Parent.Parent.WardenGui.Enabled = false;
- game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, false);
- local CurrentCamera31 = workspace.CurrentCamera;
- CurrentCamera31.CameraSubject = game.ReplicatedStorage.MenuCamera;
- CurrentCamera31.CFrame = game.ReplicatedStorage.MenuCamera.CFrame;
- CurrentCamera31.CameraType = "Scriptable";
- mouse11.Icon = "";
- end);
- for v32, v33 in pairs(v27) do
- if v33.Name ~= "Solitary" and v33.Name ~= "Choosing" and v33.Name ~= "Scav" then
- coroutine.wrap(function()
- if table.find(v19, v33.Name) then
- task.wait(0.1 * table.find(v19, v33.Name));
- else
- task.wait(0.1 * (#v19 + 0.1));
- end;
- local v34 = script.Template:Clone();
- v34.Parent = Teams15.ButtonClip;
- if v33.Name == "Intelligence Agency" then
- v34.TextLabel.Text = "Site Intelligence";
- elseif v33.Name == "Executive" then
- v34.TextLabel.Text = "Site Administration";
- else
- v34.TextLabel.Text = v33.Name;
- end;
- v34.Name = v33.Name;
- v34.TextLabel.TextColor3 = v33.TeamColor.Color;
- local TextButton35 = v34:WaitForChild("TextButton");
- local Lock36 = v34:WaitForChild("Lock");
- local Slots37 = v34:WaitForChild("Slots");
- local SlotBoxes38 = v34:WaitForChild("SlotBoxes");
- local FreeSlots39 = v33:FindFirstChild("FreeSlots");
- if FreeSlots39 then
- Slots37.Visible = true;
- for v40 = 1, FreeSlots39.Value do
- local v41 = SlotBoxes38.UIGridLayout.Slot:Clone();
- v41.Name = v40;
- v41.LayoutOrder = v40;
- v41.Parent = SlotBoxes38;
- end;
- else
- Slots37.Visible = false;
- SlotBoxes38.Visible = false;
- end;
- if FreeSlots39 or v33.Name == "Patient" then
- v34.LayoutOrder = -1;
- end;
- local u5 = FreeSlots39 and #FreeSlots39:GetChildren();
- local function v42()
- if not FreeSlots39 then
- return;
- end;
- u5 = FreeSlots39 and #FreeSlots39:GetChildren();
- Slots37.Text = u5 .. "/" .. FreeSlots39.Value .. " Free Slots";
- for v43, v44 in pairs(SlotBoxes38:GetChildren()) do
- if v44:IsA("Frame") then
- local v45 = tonumber(v44.Name);
- if v45 and v45 <= u5 then
- v44.BackgroundColor3 = Color3.new(1, 1, 1);
- v44.BackgroundTransparency = 0;
- else
- v44.BackgroundColor3 = Color3.new(0.105882, 0.105882, 0.105882);
- v44.BackgroundTransparency = 0.5;
- end;
- end;
- end;
- end;
- v42();
- v34.Visible = true;
- if FreeSlots39 then
- FreeSlots39.ChildAdded:Connect(v42);
- FreeSlots39.ChildRemoved:Connect(v42);
- end;
- v34.TextButton.MouseEnter:Connect(function()
- game.Lighting.Hover:Play();
- v34.TextButton.UIStroke.Color = Color3.fromRGB(255, 200, 0);
- v34.TextButton.TextColor3 = Color3.fromRGB(255, 200, 0);
- end);
- Lock36.MouseEnter:Connect(function()
- game.Lighting.Hover:Play();
- Lock36.ImageColor3 = Color3.fromRGB(255, 200, 0);
- end);
- v34.TextButton.MouseLeave:Connect(function()
- v34.TextButton.UIStroke.Color = Color3.fromRGB(255, 255, 255);
- v34.TextButton.TextColor3 = Color3.fromRGB(255, 255, 255);
- end);
- Lock36.MouseLeave:Connect(function()
- Lock36.ImageColor3 = Color3.new(1, 1, 1);
- end);
- local function v46()
- game.Lighting.Click:Play();
- local v47 = TeamChanger24:InvokeServer("ChangeTeam", v33);
- if not v47 then
- if not v47 then
- task.spawn(function()
- script.Parent.ErrorFX.Visible = true;
- script.Parent.Error:TweenPosition(UDim2.new(0.5, 0, 1.1, 0), Enum.EasingDirection.In, Enum.EasingStyle.Quad, 1, false);
- script.Parent.ErrorFX:TweenPosition(UDim2.new(0.5, 2, 1.1, 2), Enum.EasingDirection.In, Enum.EasingStyle.Quad, 1, false);
- task.wait(3);
- script.Parent.Error:TweenPosition(UDim2.new(0.5, 0, 1.3, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Bounce, 1.5, false);
- script.Parent.ErrorFX:TweenPosition(UDim2.new(0.5, 2, 1.3, 2), Enum.EasingDirection.Out, Enum.EasingStyle.Bounce, 1.5, false);
- task.wait(1.5);
- script.Parent.Error.Visible = false;
- script.Parent.ErrorFX.Visible = false;
- end);
- end;
- return;
- end;
- script.Parent.Music.Volume = 0;
- u3(Home14);
- script.Parent.Enabled = false;
- script.Parent.Parent.Playerlist.Enabled = true;
- script.Parent.Parent.WardenGui.Enabled = true;
- v28:setEnabled(true);
- game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true);
- local CurrentCamera48 = workspace.CurrentCamera;
- CurrentCamera48.CameraSubject = game.Players.LocalPlayer.Character.Humanoid;
- CurrentCamera48.CameraType = "Custom";
- game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false);
- game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true);
- task.wait(0.3);
- end;
- v34.TextButton.Activated:Connect(v46);
- Lock36.Activated:Connect(v46);
- coroutine.wrap(function()
- while v34 do
- if script.Parent.Enabled then
- if v3.PermsToJoinTeam(LocalPlayer9, v33) then
- Lock36.Visible = false;
- Lock36.Active = false;
- TextButton35.Visible = true;
- TextButton35.Active = true;
- else
- Lock36.Visible = true;
- Lock36.Visible = true;
- TextButton35.Visible = false;
- TextButton35.Active = false;
- end;
- end;
- wait(0.25);
- end;
- end)();
- end)();
- end;
- end;
- game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, false);
- local u6 = tick();
- game:GetService("UserInputService").InputBegan:Connect(function(p5, p6)
- if not p6 and p5.KeyCode == Enum.KeyCode.M then
- if not script.Parent.Enabled and tick() - u6 < 0.4 and TeamChanger24:InvokeServer("ChangeTeam", game.Teams.Choosing) then
- script.Parent.Enabled = true;
- v28:setEnabled(false);
- u3(Home14);
- script.Parent.Music:Play();
- script.Parent.Music.Volume = 0.8;
- script.Parent.Parent.Playerlist.Enabled = false;
- script.Parent.Parent.WardenGui.Enabled = false;
- script.Parent.Music.Playing = true;
- game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, false);
- local CurrentCamera49 = workspace.CurrentCamera;
- CurrentCamera49.CameraSubject = game.ReplicatedStorage.MenuCamera;
- CurrentCamera49.CFrame = game.ReplicatedStorage.MenuCamera.CFrame;
- CurrentCamera49.CameraType = "Scriptable";
- end;
- u6 = tick();
- end;
- end);
- v4.camera:setEnabled(false);
- mouse11.Icon = "";
- UserInputService6.MouseIconEnabled = true;
- while wait(1) do
- if script.Parent.Enabled then
- mouse11.Icon = "";
- LikeGoa18.GoalCounter.Text = v8:GetThumbsUp() .. "/" .. v8.CurrentGoal;
- local v50 = v8:GetThumbsUp() / v8.CurrentGoal;
- if v50 > 1 then
- v50 = 1;
- end;
- LikeGoa18.Progress.Percentage.Size = UDim2.new(v50, 0, 1, 0);
- end;
- end;
- --Script CheckHas
- local v1 = {
- Rank = function(p1, p2, p3)
- if p1 and p2 and type(p2) == "number" and p3 then
- local v2 = p1:GetRankInGroup(p2);
- if type(p3) == "number" and p3 <= v2 then
- return true;
- end;
- if type(p3) == "table" and p3[1] < v2 and v2 <= p3[2] then
- return true;
- end;
- end;
- return false;
- end
- };
- local MarketplaceService1 = game:GetService("MarketplaceService");
- function v1.Gamepass(p4, p5)
- return MarketplaceService1:UserOwnsGamePassAsync(p4.UserId and 0, p5 and 0);
- end;
- local u2 = {};
- function v1.PermsToJoinTeam(LocalPlayer, Team)
- local v3, v4, v5 = pairs(Team:GetChildren());
- while true do
- local v6, v7 = v3(v4, v5);
- if not v6 then
- break;
- end;
- if v7.Name == "groupID" and v1.Rank(LocalPlayer, v7.Value, v7.minRank.Value) then
- return true;
- end;
- if string.find(v7.Name, "Gamepass") and v1.Gamepass(LocalPlayer, v7.Value) then
- return true;
- end;
- if v7.Name == "FreeSlots" and #v7:GetChildren() < v7.Value then
- return true;
- end;
- if v7.Name == "Premium" and v7.Value == true and LocalPlayer.MembershipType == Enum.MembershipType.Premium then
- return true;
- end;
- if u2[LocalPlayer.UserId] then
- return true;
- end;
- end;
- return false;
- end;
- return v1;
Add Comment
Please, Sign In to add comment