Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// Variables
- local L_1_ = script.Parent
- local L_2_ = L_1_.Parent.Parent
- local L_3_ = L_2_.Character
- --// Declarables
- local L_4_ = L_1_:WaitForChild('Resource')
- local L_5_ = L_4_:WaitForChild('FX')
- local L_6_ = L_4_:WaitForChild('Events')
- local L_7_ = L_4_:WaitForChild('HUD')
- local L_8_ = L_4_:WaitForChild('Modules')
- local L_9_ = L_4_:WaitForChild('Vars')
- local L_10_ = L_4_:WaitForChild('SettingsModule')
- local L_11_ = require(L_10_:WaitForChild('ServerConfig'))
- local L_12_ = L_11_.ArtyStorage
- local L_13_
- local L_14_ = L_1_:WaitForChild('Grip')
- local L_15_
- local L_16_
- local L_17_
- local L_18_
- local L_19_
- local L_20_
- local L_21_
- local L_22_
- local L_23_
- local L_24_ = {}
- --// Events
- local L_25_ = L_6_:WaitForChild('EquipEvent')
- local L_26_ = L_6_:WaitForChild('FireEvent')
- --// Functions
- function Weld(L_27_arg1, L_28_arg2, L_29_arg3)
- local L_30_ = Instance.new("Motor6D", L_27_arg1)
- L_30_.Part0 = L_27_arg1
- L_30_.Part1 = L_28_arg2
- L_30_.Name = L_27_arg1.Name
- L_30_.C0 = L_29_arg3 or L_27_arg1.CFrame:inverse() * L_28_arg2.CFrame
- return L_30_
- end
- --// Connections
- L_1_.Equipped:connect(function()
- local L_31_ = L_3_:FindFirstChild('Torso')
- local L_32_ = L_3_:FindFirstChild('Head')
- local L_33_ = L_3_:FindFirstChild('HumanoidRootPart')
- L_15_ = Instance.new("Motor6D", L_31_)
- L_15_.Parent = L_31_
- L_15_.Name = "Clone"
- L_15_.Part0 = L_33_
- L_15_.Part1 = L_32_
- L_15_.C0 = L_31_:WaitForChild("Neck").C0
- L_15_.C1 = L_31_:WaitForChild("Neck").C1
- -- Make the AnimBase
- L_16_ = Instance.new("Part", L_3_)
- L_16_.FormFactor = "Custom"
- L_16_.CanCollide = false
- L_16_.Transparency = 1
- L_16_.Anchored = false
- L_16_.Name = "AnimBase"
- L_17_ = Instance.new("Motor6D")
- L_17_.Part0 = L_16_
- L_17_.Part1 = L_32_
- L_17_.Parent = L_16_
- L_17_.Name = "AnimBaseW"
- --AnimBaseW.C1 = gunSettings.StartPose
- L_13_ = Instance.new("Motor6D")
- L_13_.Part0 = L_3_['Right Arm']
- L_13_.Part1 = L_1_:FindFirstChild('Grip')
- L_13_.Parent = L_3_['Right Arm']
- L_13_.C1 = L_11_.weapPos
- L_13_.Name = "Grip"
- for L_34_forvar1, L_35_forvar2 in pairs(L_1_:GetChildren()) do
- if L_35_forvar2:IsA("Part") or L_35_forvar2:IsA("MeshPart") or L_35_forvar2:IsA("UnionOperation") then
- L_35_forvar2.Anchored = true
- if L_35_forvar2.Name ~= "Grip" then
- Weld(L_35_forvar2, L_1_:WaitForChild("Grip"))
- end;
- end;
- end
- for L_36_forvar1, L_37_forvar2 in pairs(L_1_:GetChildren()) do
- if L_37_forvar2:IsA("Part") or L_37_forvar2:IsA("MeshPart") or L_37_forvar2:IsA("UnionOperation") then
- L_37_forvar2.Anchored = false
- end
- end
- L_18_ = L_3_['Right Arm']
- L_19_ = L_3_['Left Arm']
- L_22_ = L_3_.Torso:WaitForChild("Right Shoulder")
- L_23_ = L_3_.Torso:WaitForChild("Left Shoulder")
- L_20_ = Instance.new("Motor6D")
- L_20_.Name = "RAW"
- L_20_.Part0 = L_16_
- L_20_.Part1 = L_18_
- L_20_.Parent = L_16_
- L_20_.C1 = L_11_.RightArmPos
- L_3_.Torso:WaitForChild("Right Shoulder").Part1 = nil
- L_21_ = Instance.new("Motor6D")
- L_21_.Name = "LAW"
- L_21_.Part0 = L_16_
- L_21_.Part1 = L_19_
- L_21_.Parent = L_16_
- L_21_.C1 = L_11_.LeftArmPos
- L_3_.Torso:WaitForChild("Left Shoulder").Part1 = nil
- if holstModel then
- holstModel:Destroy()
- end
- L_25_:FireClient(L_2_, true, L_13_, L_16_, L_17_, L_20_, L_21_, L_15_)
- end)
- L_1_.Unequipped:connect(function()
- local L_38_ = L_3_:FindFirstChild('Torso')
- local L_39_ = L_3_:FindFirstChild('Head')
- holstModel = Instance.new('Model', L_3_)
- holstModel.Name = "HolsterModel"
- for L_40_forvar1, L_41_forvar2 in pairs(L_1_:GetChildren()) do
- for L_42_forvar1, L_43_forvar2 in pairs(L_41_forvar2:GetChildren()) do
- if L_43_forvar2.ClassName == "Motor6D" then
- L_43_forvar2:Destroy()
- end
- end
- end
- for L_44_forvar1, L_45_forvar2 in pairs(L_1_:GetChildren()) do
- if L_45_forvar2:IsA("Part") or L_45_forvar2:IsA("MeshPart") or L_45_forvar2:IsA("UnionOperation") then
- L_45_forvar2.Anchored = true
- end
- end
- if L_3_.Humanoid and L_3_.Humanoid.Health > 0 then
- L_3_.HumanoidRootPart.RootJoint.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- L_38_['Right Hip'].C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- L_38_['Left Hip'].C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- L_15_.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- end
- L_38_:WaitForChild("Neck").Part1 = L_39_
- L_38_:WaitForChild("Neck").C1 = L_38_:WaitForChild("Neck").C1
- L_38_:WaitForChild("Neck").C0 = L_38_:WaitForChild("Neck").C0
- L_16_:Destroy()
- L_15_:Destroy()
- L_22_.Part1 = L_18_
- L_23_.Part1 = L_19_
- L_25_:FireClient(L_2_, false)
- if L_11_.HolsteringEnabled then
- for L_47_forvar1, L_48_forvar2 in pairs(L_1_:GetChildren()) do
- if L_48_forvar2:IsA("Part") or L_48_forvar2:IsA("MeshPart") or L_48_forvar2:IsA("UnionOperation") then
- L_48_forvar2.Anchored = true
- local L_49_ = L_48_forvar2:clone()
- L_49_.Parent = holstModel
- end
- end;
- for L_50_forvar1, L_51_forvar2 in pairs(holstModel:GetChildren()) do
- Weld(L_51_forvar2, holstModel:WaitForChild("Grip"))
- end
- local L_46_ = Weld(holstModel:WaitForChild("Grip"), L_3_:WaitForChild('Torso'))
- L_46_.Name = "TWeld"
- L_46_.C1 = L_11_.HolsterPos
- for L_52_forvar1, L_53_forvar2 in pairs(holstModel:GetChildren()) do
- L_53_forvar2.Anchored = false
- end
- end
- end)
- L_3_.Humanoid.Died:connect(function()
- L_25_:FireClient(L_2_, false)
- end)
- --// Event Connections
- L_26_.OnServerEvent:connect(function(L_54_arg1, L_55_arg2, L_56_arg3, L_57_arg4)
- local L_58_
- L_12_:FindFirstChild('Arty').PrimaryPart.DustUp.Enabled = true
- L_12_:FindFirstChild('Arty').PrimaryPart.Fire:Play()
- delay(0.1, function()
- L_12_:FindFirstChild('Arty').PrimaryPart.DustUp.Enabled = false
- end)
- wait(L_11_.SplashTime)
- local L_59_ = Instance.new('Part', workspace)
- L_59_.Position = L_55_arg2
- L_59_.Anchored = true
- L_59_.CanCollide = false
- L_59_.Transparency = 1
- if L_56_arg3 == '105mm' then
- local L_60_ = Instance.new('Sound', L_59_)
- L_60_.SoundId = 'rbxassetid://906024504'
- L_60_.Volume = 10
- L_60_:Play()
- L_58_ = Instance.new('Explosion', workspace)
- L_58_.BlastPressure = L_11_.BlastPressure
- L_58_.BlastRadius = L_11_.BlastRadius
- L_58_.DestroyJointRadiusPercent = L_11_.DJRP
- L_58_.ExplosionType = L_11_.ExplosionType
- L_58_.Position = L_55_arg2
- game.Debris:AddItem(L_59_, 7)
- elseif L_56_arg3 == 'SmokeRound' then
- local L_61_ = Instance.new('Sound', L_59_)
- L_61_.SoundId = 'rbxassetid://2112952590'
- L_61_.Volume = 10
- L_61_:Play()
- wait(L_61_.TimeLength)
- local L_62_ = Instance.new('Sound', L_59_)
- L_62_.SoundId = 'rbxassetid://2112952772'
- L_62_.Volume = 10
- L_62_.Looped = true
- L_62_:Play()
- local L_63_ = L_5_:WaitForChild('Smoke'):clone()
- L_63_.Parent = L_59_
- L_63_.Enabled = true
- game.Debris:AddItem(L_59_, 60)
- end
- game.Debris:AddItem(L_58_, 5)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement