aiden8889
|
  |
| Joined: 10 Jun 2009 |
| Total Posts: 91 |
|
|
| 06 Sep 2014 01:30 PM |
PLAYER SCRIPT: wait(0.5) --Made by YouTubes-- --Edit settings below-- local Tool = script.Parent local Settings = { Range = 1000 ,Spread = 10 ,Damage = {50, 75} ,HeadShotDamage = {70, 120} ,Bullets = 1 ,FireRate = 0.1 ,Automatic = true ,AntiTK = true ,ImpactDuration = 3 --Reload ,ReloadKey = "R" ,ReloadTime = 2.5 ,Ammo = 30 ,IncludeChamberedBullet = true --Gui ,GuiPos = Vector2.new(script.Gui.Frame.Position.X.Scale, script.Gui.Frame.Position.Y.Scale) --Arms ,OneHanded = false ,FakeArms = true ,FakeArmTransparency = 0.5 ,RightPos = CFrame.new(-0.75, -0.25, 0.5) * CFrame.Angles(math.rad(-90), 0, 0) ,LeftPos = CFrame.new(1, 0.5, 0.5) * CFrame.Angles(math.rad(-90), math.rad(45), 0) ,AimPart = Tool.AimPart ,AimPartOffset = CFrame.new() ,AimGripOffset = Vector3.new(0, 0, 0) ,LeftAimPos = CFrame.new(1, 0.5, 0.5) * CFrame.Angles(math.rad(-100), math.rad(45), 0) ,AimAnim = { Enabled = false ,Frames = 50 ,Time = 0.1 } ,ChangeFOV = {true, 60} ,SpreadReduction = 5 --Weld ,Weld = true --Mouse ,Icons = { Idle = "rbxassetid://70288585" ,Fire1 = "rbxassetid://70288578" ,Fire2 = "rbxassetid://70288572" ,Fire3 = "rbxassetid://70288578" ,Reload = "rbxassetid://70288599" ,Aim = "rbxasset://textures/Blank.png" } ,FireMouseAnimTime = 0.15 --Recoil ,Recoil = math.rad(1) --Smoke ,Smoke = true ,SmokePart = Tool.SmokePart ,Smokes = {{script.Smoke, 6, 0.1}, {script.Smoke1, 0.1}, {script.Smoke1, 0.1}} --Sprint ,Sprint = true ,SprintSpeed = 25 ,SprintKey = "0" ,SprintSpreadIncrease = 40 ,SprintArmOffset = CFrame.new(0.25, 0.125, 0.25) * CFrame.Angles(math.rad(-30), math.rad(35), 0) --Other ,DropHats = true }
--Do not edit below this lign--
local Orig_Spread = Settings.Spread local Orig_Grip = Tool.GripPos
local Player = game.Players.LocalPlayer local Character = Player.Character
local Camera = Workspace.CurrentCamera
local Ammo, StoredAmmo = script.Ammo, script.StoredAmmo
local Gui, CanUpdateGui = nil, true
local Sprinting, Equipped
function Update_Gui() if Gui and CanUpdateGui then Gui.Frame.AmmoDisplay.Text = Ammo.Value .. "|" .. StoredAmmo.Value end end
local Welded if Settings.Weld then Delay(0, function() local weldC0s = {} for i, v in pairs(Tool:GetChildren()) do if v:IsA("BasePart") and v ~= Tool.Handle then table.insert(weldC0s, {v, Tool.Handle.CFrame:toObjectSpace(v.CFrame)}) v.Anchored = false end end Tool.Handle.Anchored = false local welds = {} Tool.Equipped:connect(function() for i, v in ipairs(welds) do v.Part1 = nil v:Destroy() end for i, v in ipairs(weldC0s) do if v[1] and v[2] then local w = Instance.new("Weld", Tool.Handle) w.Part0 = Tool.Handle w.Part1 = v[1] w.C0 = v[2] table.insert(welds, w) end end end) wait() Welded = true end) end
local Left_Weld, Right_Weld
Ammo.Changed:connect(Update_Gui) StoredAmmo.Changed:connect(Update_Gui)
Settings.Range = math.min(Settings.Range, 999)
local Ignore_Model = Workspace:FindFirstChild("Ray_Ignore") or Instance.new("Model", Workspace) Ignore_Model.Name = "Ray_Ignore"
local Ray_Ignore = {Character, Ignore_Model, Camera}
Character.Humanoid.Died:connect(function() Tool.Parent = Player.Backpack end)
function Fire(Mouse) local Spread = CFrame.Angles(math.rad(math.random(-Settings.Spread, Settings.Spread)/10), math.rad(math.random(-Settings.Spread, Settings.Spread)/10), math.rad(math.random(-Settings.Spread, Settings.Spread)/10)) local Ray = Ray.new(Character.Head.Position, (CFrame.new(Character.Head.Position, Mouse.Hit.p) * Spread).lookVector.unit * Settings.Range) local Hit, Pos = Workspace:FindPartOnRayWithIgnoreList(Ray, Ray_Ignore) if Hit and Hit.Parent:FindFirstChild("Humanoid") then local Hit_Player = game.Players:GetPlayerFromCharacter(Hit.Parent) if Settings.AntiTK and not Hit_Player.Neutral and Hit_Player.TeamColor == Player.TeamColor then return end local Humanoid = Hit.Parent.Humanoid local c = Instance.new("ObjectValue") c.Name = "creator" c.Value = Player game.Debris:AddItem(c, 3) c.Parent = Humanoid if Hit.Name == "Head" then Humanoid.Health = Humanoid.Health - math.random(Settings.HeadShotDamage[1], Settings.HeadShotDamage[2]) else Humanoid.Health = Humanoid.Health - math.random(Settings.Damage[1], Settings.Damage[2]) end elseif Hit then local Hit_Part = Instance.new("Part", Ignore_Model) Hit_Part.FormFactor = "Custom" Hit_Part.TopSurface = 0 Hit_Part.BottomSurface = 0 Hit_Part.Anchored = true Hit_Part.CanCollide = false Hit_Part.Size = Vector3.new() Hit_Part.CFrame = CFrame.new(Pos) * CFrame.Angles(math.random(0, 360), math.random(0, 360), math.random(0, 360)) Hit_Part.BrickColor = BrickColor.new("Black") game.Debris:AddItem(Hit_Part, Settings.ImpactDuration) if not Hit.Anchored then local w = Instance.new("Weld", Hit_Part) w.Part0 = Hit w.Part1 = Hit_Part w.C0 = Hit.CFrame:toObjectSpace(Hit_Part.CFrame) Hit_Part.Anchored = false end if Hit.Parent:IsA("Hat") and Settings.DropHats then Hit.Parent.Parent = workspace game.Debris:AddItem(Hit, 3) end end end
local Can_Shoot = true local Reloading = false
local First_Person = false
local Mouse_Held
Tool.Equipped:connect(function(Mouse) Equipped = true if Settings.Weld and not Welded then wait() Tool.Parent = Player.Backpack end Character = Player.Character if Gui then return end Ray_Ignore = {Character, Ignore_Model, Camera} Mouse.Icon = Settings.Icons.Idle Gui = script.Gui:Clone() Gui.Parent = Player.PlayerGui Gui.Frame.Position = UDim2.new(Settings.GuiPos.X, Gui.Frame.Position.X.Offset, 1.1, Gui.Frame.Position.Y.Offset) Gui.Frame:TweenPosition(UDim2.new(Settings.GuiPos.X, Gui.Frame.Position.X.Offset, Settings.GuiPos.Y, Gui.Frame.Position.Y.Offset), "Out", "Bounce", 1) CanUpdateGui = true Update_Gui() Mouse.Button1Down:connect(function() if Can_Shoot and Ammo.Value > 0 and Character.Humanoid.Health > 0 then Mouse_Held = true while true do Can_Shoot = false Delay(0, function() local t = math.min(Settings.FireMouseAnimTime/3, Settings.FireRate/3) if not Aiming then Mouse.Icon = Settings.Icons.Fire1 end wait(t) if not Aiming then if Reloading then return end Mouse.Icon = Settings.Icons.Fire2 end wait(t) if not Aiming then if Reloading then return end Mouse.Icon = Settings.Icons.Fire3 end wait(t) if not Aiming then if Reloading then return end Mouse.Icon = Settings.Icons.Idle end end) if Settings.Smoke then for i, v in pairs(Settings.Smokes) do local s = v[1]:Clone() s.Parent = Settings.SmokePart s.Enabled = true game.Debris:AddItem(s, v[2]) if v[3] then Delay(v[3], function() s.Enabled = false end) end end end for _ = 1, Settings.Bullets do Fire(Mouse) end Camera.CoordinateFrame = CFrame.new(Camera.Focus.p) * (Camera.CoordinateFrame - Camera.CoordinateFrame.p) * CFrame.Angles(math.abs(Settings.Recoil), 0, 0) * CFrame.new(0, 0, (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude) if Tool.Handle:FindFirstChild("Shoot") then Tool.Handle.Shoot:Play() end Ammo.Value = Ammo.Value - 1 wait(Settings.FireRate) if not Settings.Automatic or Ammo.Value <= 0 or Character.Humanoid.Health <= 0 or not Mouse_Held then break end end Can_Shoot = true elseif Can_Shoot and Character.Humanoid.Health > 0 and Tool.Handle:FindFirstChild("Click") then Tool.Handle.Click:Play() end end) Mouse.Button1Up:connect(function() Mouse_Held = false end) Mouse.KeyDown:connect(function(Key) if Key:upper() == Settings.ReloadKey:upper() and Can_Shoot and StoredAmmo.Value > 0 and not Aiming then if Settings.IncludeChamberedBullet and Ammo.Value == Settings.Ammo + 1 or not Settings.IncludeChamberedBullet and Ammo.Value == Settings.Ammo then return end Can_Shoot = false Reloading = true local TextLabel = Gui.Frame.AmmoDisplay Delay(0, function() CanUpdateGui = false TextLabel.Text = "Reloading." wait(Settings.ReloadTime/3) if TextLabel then TextLabel.Text = "Reloading.." end wait(Settings.ReloadTime/3) if TextLabel then TextLabel.Text = "Reloading..." end end) if Tool.Handle:FindFirstChild("Reload") then Tool.Handle.Reload:Play() end Mouse.Icon = Settings.Icons.Reload wait(Settings.ReloadTime) Mouse.Icon = Settings.Icons.Idle CanUpdateGui = true local m = Settings.Ammo if Ammo.Value > 0 and Settings.IncludeChamberedBullet then m = m + 1 end if (StoredAmmo.Value - (m - Ammo.Value)) <= 0 then Ammo.Value = Ammo.Value + StoredAmmo.Value StoredAmmo.Value = 0 else StoredAmmo.Value = StoredAmmo.Value - (m - Ammo.Value) Ammo.Value = m end Can_Shoot = true Reloading = false elseif Key:upper() == Settings.SprintKey:upper() and Settings.Sprint and not Aiming then Sprinting = true Character.Humanoid.WalkSpeed = Settings.SprintSpeed Settings.Spread = Settings.Spread + Settings.SprintSpreadIncrease end end) Mouse.KeyUp:connect(function(Key) if Key:upper() == Settings.SprintKey:upper() and Sprinting then Sprinting = false Character.Humanoid.WalkSpeed = 16 Settings.Spread = Settings.Spread - Settings.SprintSpreadIncrease Right_Weld.C0 = CFrame.new(0, -1.5, 0) end end) Mouse.Button2Down:connect(function() if not Reloading and not Sprinting and not Aiming and (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude < 1 then Aiming = true Mouse.Icon = Settings.Icons.Aim if Settings.AimAnim.Enabled then Right_Weld.C1 = CFrame.new() Right_Weld.C0 = CFrame.new() Delay(0, function() Tween_C0(Right_Weld, Settings.AimAnim.Frames, Settings.AimAnim.Time, Right_Weld.C0, Character.Head.CFrame:toObjectSpace(Settings.AimPart.CFrame)) end) Delay(0, function() Tween_C1(Left_Weld, Settings.AimAnim.Frames, Settings.AimAnim.Time, Left_Weld.C1, Settings.LeftAimPos) end) Delay(0, function() if Settings.ChangeFOV[1] then Camera.FieldOfView = 70 local Cam_Dif, T_F = 70 - Settings.ChangeFOV[2], Settings.AimAnim.Time * Settings.AimAnim.Frames for i = 1, T_F do local FOV = 70 - Cam_Dif/T_F * i Camera.FieldOfView = FOV wait(Settings.AimAnim.Time/Settings.AimAnim.Frames) if not Aiming then return end end Camera.FieldOfView = Settings.ChangeFOV[2] end end) else Right_Weld.C1 = CFrame.new() Right_Weld.C0 = CFrame.new() Right_Weld.C1 = Character.Head.CFrame:toObjectSpace(Settings.AimPart.CFrame) Left_Weld.C1 = Settings.LeftAimPos if Settings.ChangeFOV[1] then Camera.FieldOfView = Settings.ChangeFOV[2] end end Tool.GripPos = Orig_Grip + Settings.AimGripOffset Settings.Spread = Settings.Spread - Settings.SpreadReduction end end) Mouse.Button2Up:connect(function() if Aiming then Mouse.Icon = Settings.Icons.Idle Tool.GripPos = Orig_Grip if Settings.AimAnim.Enabled then Delay(0, function() Tween_C0(Right_Weld, Settings.AimAnim.Frames, Settings.AimAnim.Time, Right_Weld.C0, CFrame.new(0, -1.5, 0)) end) Delay(0, function() Tween_C1(Left_Weld, Settings.AimAnim.Frames, Settings.AimAnim.Time, Left_Weld.C1, Settings.LeftPos) end) else Right_Weld.C1 = Settings.RightPos Right_Weld.C0 = CFrame.new(0, -1.5, 0) Left_Weld.C1 = Settings.LeftPos end if Settings.ChangeFOV[1] then Camera.FieldOfView = 70 end Settings.Spread = Settings.Spread + Settings.SpreadReduction Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) Character.Torso.Neck.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) wait(0.25) Aiming = false end end) wait() Camera.Changed:connect(function() if (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude < 1 and Equipped then Mouse.TargetFilter = workspace Character.Torso.Neck.C1 = CFrame.new() Character.Torso.Neck.C0 = CFrame.new(0, 1.5, 0) * CFrame.Angles(math.asin((Mouse.Hit.p - Mouse.Origin.p).unit.y), 0, 0) end end) Mouse.Idle:connect(function() if (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude < 1 and Equipped then Mouse.TargetFilter = workspace Character.Torso.Neck.C1 = CFrame.new() Character.Torso.Neck.C0 = CFrame.new(0, 1.5, 0) * CFrame.Angles(math.asin((Mouse.Hit.p - Mouse.Origin.p).unit.y), 0, 0) end end) while wait() and Equipped do if Sprinting then Right_Weld.C0 = CFrame.new(0, -1.5, 0) * Settings.SprintArmOffset Left_Weld.C0 = CFrame.new(0, -1.5, 0) * Settings.SprintArmOffset elseif not Aiming then Left_Weld.C0 = CFrame.new(0, -1.5, 0) end if (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude > 1 and Equipped then Mouse.TargetFilter = nil Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) Character.Torso.Neck.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) end end end)
local Arms_Made local Fake_Arm_Right, Fake_Arm_Left, Fake_Arm_Model
Tool.Equipped:connect(function(Mouse) if Character and not Arms_Made then Arms_Made = true local Torso = Character.Torso Torso["Right Shoulder"].Part1 = nil Left_Weld = Instance.new("Weld", Torso) Left_Weld.Name = "Left_Weld" Left_Weld.Part0 = Character.Head Left_Weld.C0 = CFrame.new(0, -1.5, 0) if not Settings.OneHanded then Torso["Left Shoulder"].Part1 = nil Left_Weld.Part1 = Character["Left Arm"] end Right_Weld = Instance.new("Weld", Torso) Right_Weld.Name = "Right_Weld" Right_Weld.Part0 = Character.Head Right_Weld.Part1 = Character["Right Arm"] Right_Weld.C0 = CFrame.new(0, -1.5, 0) Left_Weld.C1 = Settings.LeftPos Right_Weld.C1 = Settings.RightPos end if Settings.FakeArms and not Fake_Arm_Right then Fake_Arm_Right, Fake_Arm_Left = Character["Right Arm"]:Clone(), Character["Left Arm"]:Clone() Fake_Arm_Right.FormFactor, Fake_Arm_Left.FormFactor = "Custom", "Custom" Fake_Arm_Right.Size, Fake_Arm_Left.Size = Vector3.new(), Vector3.new() local fakeArms = {Fake_Arm_Right, Fake_Arm_Left} for i = 1, 2 do local w = Instance.new("Weld", fakeArms[i]) w.Part0 = Character[fakeArms[i].Name] w.Part1 = fakeArms[i] fakeArms[i].Transparency = Settings.FakeArmTransparency end Fake_Arm_Model = Instance.new("Model", Camera) Fake_Arm_Right.Parent = Fake_Arm_Model if not Settings.OneHanded then Fake_Arm_Left.Parent = Fake_Arm_Model end Fake_Arm_Model.Name = "FakeArms" if Settings.CharacterMeshes then for i, v in pairs(Character:GetChildren()) do if v:IsA("CharacterMesh") and v.BodyPart == Enum.BodyPart.LeftArm or v:IsA("CharacterMesh") and v.BodyPart == Enum.BodyPart.RightArm then v:Clone().Parent = Fake_Arm_Model end end end if Character:FindFirstChild("Shirt") then Instance.new("Humanoid", Fake_Arm_Model) Character.Shirt:Clone().Parent = Fake_Arm_Model else local Arm_Mesh = Instance.new("SpecialMesh", Fake_Arm_Right) Arm_Mesh.MeshType, Arm_Mesh.Scale = "Brick", Vector3.new(5, 10, 5) local Arm_Mesh2 = Instance.new("SpecialMesh", Fake_Arm_Left) Arm_Mesh2.MeshType, Arm_Mesh2.Scale = "Brick", Vector3.new(5, 10, 5) end end end)
Tool.Unequipped:connect(function() Equipped = false Tool.GripPos = Orig_Grip Aiming = false Settings.Spread = Orig_Spread if Settings.ChangeFOV[1] then Camera.FieldOfView = 70 end if Gui then Gui:Destroy() Gui = nil end for i, v in pairs(Tool.Handle:GetChildren()) do if v:IsA("Sound") then v:Stop() end end if Fake_Arm_Right and Fake_Arm_Left and Fake_Arm_Model then Fake_Arm_Model:Destroy() Fake_Arm_Right, Fake_Arm_Left, Fake_Arm_Model = nil, nil, nil end if Character and Left_Weld and Right_Weld then Arms_Made = false local Torso = Character.Torso Torso["Right Shoulder"].Part1, Torso["Left Shoulder"].Part1 = Character["Right Arm"], Character["Left Arm"] Left_Weld:Destroy() Right_Weld:Destroy() end Sprinting = false Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) Character.Torso.Neck.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) Character.Humanoid.WalkSpeed = 16 end)
ZOMBIE SCRIPT:
Tool = script.Parent
function onMove(mouse) hit = mouse.Target if hit ~= nil then h = hit.Parent:findFirstChild("Zombie") if h ~= nil then if game.Players:findFirstChild(h.Parent.Name) ~= nil then if game.Players:findFirstChild(h.Parent.Name).TeamColor ~= game.Players:findFirstChild(script.Parent.Parent.Name).TeamColor then mouse.Icon = "http://www.roblox.com/asset/?id=26270850" -- Enemy elseif game.Players:findFirstChild(h.Parent.Name).TeamColor == game.Players:findFirstChild(script.Parent.Parent.Name).TeamColor then mouse.Icon = "http://www.roblox.com/asset/?id=26270835" -- Friendly end else mouse.Icon = "http://www.roblox.com/asset/?id=26270850" -- Enemy, maybe a AI? end else mouse.Icon = "http://www.roblox.com/asset/?id=26268115" -- Normal end else mouse.Icon = "http://www.roblox.com/asset/?id=26268115" -- Normal end end
function onKeyDown(key) key:lower() if key ~= nil then if key == "q" then if canHit == true then canHit = false melee() wait(0.7) canHit = true end end end end
selected = false RSH, LSH = nil, nil GRP = nil RW, LW = Instance.new("Weld"), Instance.new("Weld") anim = "none"
function WaitForChild(obj, ch_n) local t = time() while not obj:FindFirstChild(ch_n) and time() - t < 10 do wait(0.1) end return obj:FindFirstChild(ch_n) end
function onTouch(hit) if hit ~= nil and hit.Parent ~= nil and canHit == false and hit.Name ~= "Paintball" then if hit.Parent:findFirstChild("ForceField") == nil then local creator_tag = Instance.new("StringValue") creator_tag.Value = script.Parent.Parent.Name creator_tag.Name = "creator" if game.Players:findFirstChild(hit.Parent.Name) ~= nil then if game.Players:findFirstChild(hit.Parent.Name).TeamColor ~= game.Players:findFirstChild(script.Parent.Parent.Name).TeamColor then h = hit.Parent:findFirstChild("Zombie") if h ~= nil then h.Health = h.Health - 25 end end else h = hit.Parent:findFirstChild("Zombie") if h ~= nil then creator_tag.Parent = h h.Health = h.Health - 25 end end end end end
function melee() for i = 1, 2.3, 0.2 do wait() RW.C0 = CFrame.new(1.5, 0.5, 0.25) * CFrame.fromEulerAnglesXYZ(1.3*i, 0, -0.5) LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7*i, 0, 0.8) --LW.C1 = CFrame.new(0.3*i, 1+1*i, 0) end -- Tool.Handle.Melee:Play() con = script.Parent.Handle.Touched:connect(onTouch) -- for i = 2.3, 0, -0.3 do wait() RW.C0 = CFrame.new(1.5, 0.5, 0.25) * CFrame.fromEulerAnglesXYZ(1.3*i, 0, -0.5) LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7*i, 0, 0.8) --LW.C1 = CFrame.new(0.3*i, 1+1*i, 0) end
con:disconnect()
for i = 0, 1, 0.2 do wait() RW.C0 = CFrame.new(1.5, 0.5, 0.25) * CFrame.fromEulerAnglesXYZ(1.3*i, 0, -0.5) LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7*i, 0, 0.8) --LW.C1 = CFrame.new(0.3*i, 1+1*i, 0) end
end
script.Parent.Equipped:connect(function(mouse) mouse.KeyDown:connect(onKeyDown) mouse.Move:connect(function() onMove(mouse) end) player = game.Players:playerFromCharacter(script.Parent.Parent) local ch = script.Parent.Parent WaitForChild(ch, "Torso") RSH = WaitForChild(ch.Torso, "Right Shoulder") LSH = WaitForChild(ch.Torso, "Left Shoulder") GRP = WaitForChild(ch["Right Arm"], "RightGrip") _G.Grip = GRP -- RSH.Part1 = nil LSH.Part1 = nil -- RW.Part0 = ch.Torso RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) RW.C1 = CFrame.new(0, 0.5, 0) RW.Part1 = ch["Right Arm"] RW.Parent = ch.Torso _G.R = RW -- LW.Part0 = ch.Torso LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) LW.C1 = CFrame.new(0, 0.5, 0) LW.Part1 = ch["Left Arm"] LW.Parent = ch.Torso _G.L = LW -- GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-1.22, -0.45, 0.22) for i = 0, 1, 0.05 do wait() RW.C0 = CFrame.new(1.5, 0.5, 0.25) * CFrame.fromEulerAnglesXYZ(1.3*i, 0, -0.5*i) LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7*i, 0, 0.8*i) LW.C1 = CFrame.new(0.3*i, 1+1*i, 0) end RW.C0 = CFrame.new(1.5, 0.5, 0.25) * CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) wait() local rg = (ch["Right Arm"]:FindFirstChild("RightGrip") or GRP) if rg ~= GRP then GRP.Parent = ch["Right Arm"] rg:remove() end end)
script.Parent.Unequipped:connect(function(mouse) pl = player RW.C0 = CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0) LW.C0 = CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0) LW.C1 = CFrame.new(0,0,0) RW.Parent = nil LW.Parent = nil RSH.Part1 = pl.Character["Right Arm"] LSH.Part1 = pl.Character["Left Arm"] end)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function fire(v) Tool.Handle.Fire:play() local vCharacter = Tool.Parent local vPlayer = game.Players:GetPlayerFromCharacter(Tool.Parent) local spawnPos = Tool.Handle.Position spread = 2 spawnPos = spawnPos + (v* 8) missile = Instance.new("Part") missile.Position = spawnPos missile.Locked = true missile.CanCollide = true missile.Size = Vector3.new(2, 2, 2) missile.Velocity = v * 80 + Vector3.new(math.random(-(spread),(spread)),math.random(-(spread),(spread)),math.random(-(spread),(spread))) missile.BrickColor = vPlayer.TeamColor missile.BottomSurface = 0 missile.Shape = 0 missile.TopSurface = 0 missile.Name = "Paintball" missile.Elasticity = 0 missile.Friction = 0 scriptP = Tool.PaintRocket:clone() scriptP.Disabled = false scriptP.Parent = missile
local force = Instance.new("BodyForce") force.force = Vector3.new(0, missile:GetMass()*185 ,0) force.Parent = missile
local creator_tag = Instance.new("StringValue") creator_tag.Value = vPlayer.Name creator_tag.Name = "creator" creator_tag.Parent = missile missile.Parent = game.Workspace end canHit = true Enabled = true function onActivated() if Enabled == false then return end local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end local targetPos = humanoid.TargetPoint local lookAt = (targetPos - character.Head.Position).unit local targetPos = humanoid.TargetPoint if canHit == true then Enabled = false for i = 1, 1 do --Tool.Tip.Smoke.Enabled = true fire(lookAt) RW.C0 = CFrame.new(1.5, 0.6, 0.55) * CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) LW.C0 = CFrame.new(-1.5, 0.55, 0.3) * CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) wait(0.08) RW.C0 = CFrame.new(1.5, 0.5, 0.25) * CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) wait(1) Tool.Tip.Smoke.Enabled = false end wait(5) Enabled = true end end
script.Parent.Activated:connect(onActivated)
Thanks in advance :D
A89 |
|
|
| Report Abuse |
|