Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pppp = Instance.new("Part",script)
- pppp.CanQuery = false
- pppp.Anchored = true
- pppp.CanCollide = false
- pppp.Size = Vector3.new()
- pppp.Transparency = 1
- local s = Instance.new("Sound")
- s.PlayOnRemove = true
- s.Volume = 1.6
- s.SoundId = "rbxassetid://6828928602"
- local model = game:GetService("Players"):CreateHumanoidModelFromDescription(game:GetService("Players"):GetHumanoidDescriptionFromUserId(owner.UserId),1)
- local rt = Instance.new("Part",owner.Character)
- rt.CanCollide = false
- rt.Transparency = 1
- rt.Size = model:WaitForChild("UpperTorso").Size
- rt.Name = "UpperTorso"
- rt.Massless = true
- local lt = Instance.new("Part",owner.Character)
- lt.CanCollide = false
- lt.Transparency = 1
- lt.Size = model:WaitForChild("LowerTorso").Size
- lt.Name = "LowerTorso"
- lt.Massless = true
- local w = Instance.new("Weld",rt)
- w.Part0 = lt
- w.Part1 = rt
- w.Name = "Waist"
- w.C1 = model:WaitForChild("UpperTorso"):WaitForChild("Waist").C1
- w.C0 = model:WaitForChild("UpperTorso"):WaitForChild("Waist").C0
- local w = Instance.new("Weld",lt)
- w.Part0 = owner.Character.HumanoidRootPart
- w.Part1 = lt
- w.Name = "Root"
- w.C1 = model:WaitForChild("LowerTorso"):WaitForChild("Root").C1
- w.C0 = model:WaitForChild("LowerTorso"):WaitForChild("Root").C0
- local rul = Instance.new("Part",owner.Character)
- rul.CanCollide = false
- rul.Transparency = 1
- rul.Size = model:WaitForChild("RightUpperLeg").Size
- rul.Name = "RightUpperLeg"
- rul.Massless = true
- local w = Instance.new("Weld",rul)
- w.Part0 = lt
- w.Part1 = rul
- w.Name = "RightHip"
- w.C1 = model:WaitForChild("RightUpperLeg"):WaitForChild("RightHip").C1
- w.C0 = model:WaitForChild("RightUpperLeg"):WaitForChild("RightHip").C0
- local lul = Instance.new("Part",owner.Character)
- lul.CanCollide = false
- lul.Transparency = 1
- lul.Size = model:WaitForChild("LeftUpperLeg").Size
- lul.Name = "LeftUpperLeg"
- lul.Massless = true
- local w = Instance.new("Weld",lul)
- w.Part0 = lt
- w.Part1 = lul
- w.Name = "LeftHip"
- w.C1 = model:WaitForChild("LeftUpperLeg"):WaitForChild("LeftHip").C1
- w.C0 = model:WaitForChild("LeftUpperLeg"):WaitForChild("LeftHip").C0
- local rll = Instance.new("Part",owner.Character)
- rll.CanCollide = false
- rll.Transparency = 1
- rll.Size = model:WaitForChild("RightLowerLeg").Size
- rll.Name = "RightLowerLeg"
- rll.Massless = true
- local w = Instance.new("Weld",rll)
- w.Part0 = rul
- w.Part1 = rll
- w.Name = "RightKnee"
- w.C1 = model:WaitForChild("RightLowerLeg"):WaitForChild("RightKnee").C1
- w.C0 = model:WaitForChild("RightLowerLeg"):WaitForChild("RightKnee").C0
- local lll = Instance.new("Part",owner.Character)
- lll.CanCollide = false
- lll.Transparency = 1
- lll.Size = model:WaitForChild("LeftLowerLeg").Size
- lll.Name = "LeftLowerLeg"
- lll.Massless = true
- local w = Instance.new("Weld",lll)
- w.Part0 = lul
- w.Part1 = lll
- w.Name = "LeftKnee"
- w.C1 = model:WaitForChild("LeftLowerLeg"):WaitForChild("LeftKnee").C1
- w.C0 = model:WaitForChild("LeftLowerLeg"):WaitForChild("LeftKnee").C0
- local w = Instance.new("Weld",lll)
- w.Part0 = owner.Character["Left Leg"]
- w.Part1 = lll
- local w2 = Instance.new("Weld",rll)
- w2.Part0 = owner.Character["Right Leg"]
- w2.Part1 = rll
- w.Enabled = false
- w2.Enabled = false
- w.C0 = CFrame.new(0,-0.25,0)
- w2.C0 = CFrame.new(0,-0.25,0)
- local IK_HANDLER = {}
- IK_HANDLER.__index = IK_HANDLER
- local Pi = math.pi -- We are using radian-based angles (rather than degree), so we use Pi! Pi radians = 180 degrees
- local HalfPi = Pi/2 -- Pi/2 radians = 90 degrees.
- local Tau = 2*Pi -- 2pi radians = 360 degrees. And yes, Tau is a word! Represented by symbol 't'
- local ForwardVector = Vector3.new(0,0,-1) -- Get a forward-directional Vector3
- local YAxisExclusion = Vector3.new(1,0,1) -- This will be used later; Vector3*YAxisExclusion will remove the middle value, or the y-value.
- local RightHipCFrame = CFrame.new(0.55, -0.4, 0) -- The self.RightRotationAngle-hip reference CFrame, relative to the RightUpperLeg position
- local LeftHipCFrame = CFrame.new(-0.55, -0.4, 0) -- The self.LeftRotationAngle-hip reference CFrame, relative to the LeftUpperLeg position
- local RightHipCFrame2 = CFrame.new(0.55,-2.7,0)
- local LeftHipCFrame2 = CFrame.new(-0.55,-2.7,0)
- local RightIdleCFrame = CFrame.new(0.28,-1.9,0.03) -- Idle CFrame of Motor6D joint
- local LeftIdleCFrame = CFrame.new(-0.28,-1.9,-0.03) -- Idle CFrame of Motor6D joint
- --**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--
- --**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--
- --**--**--**--**--**--||
- --**--**--**--**--**--|| PRIVATE FUNCTIONS
- --**--**--**--**--**--||
- --**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--
- --**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--
- local function SolveLegIK(o,t,l0,l1) -- Does the major math calculations for IK
- -- Make the position local relative to the origin
- local l = o:pointToObjectSpace(t) -- World space to local space
- local lu = l.Unit -- Get normalized unit for future math
- local m = l.Magnitude -- Get the length from the position to the target
- -- Make a CFrame pointing from the shoulder position directing to the second position
- local x = ForwardVector:Cross(-lu) -- Cross the forward vector with the negative of the normalized unit
- local g = math.acos(-lu.Z) -- Get the arc-cosine of the negative normalized unit
- local p = o*CFrame.fromAxisAngle(x,g):Inverse() -- Get the IK plane
- -- In a self.RightRotationAngle-triangle, we have the hypotenuse and the two shorter legs.
- -- In a self.RightRotationAngle triangle, the hypotenuse is side "c," and the legs are a and b.
- -- This information will be helpful later on.
- if m < math.max(l1,l0)-math.min(l1,l0) then
- -- If c is between the lengths of a and b then return an offsetted plane so that one of the lengths reaches the goal,
- -- but the other length is folded so it looks natural
- -- This cacluation is done when a position comes before the end of the leg, and may look a bit... odd
- return p*CFrame.new(0,0,math.max(l1,l0)-math.min(l1,l0)-m),-HalfPi,Pi
- elseif m > l0+l1 then
- -- If c > a + b then return flat angles and an offsetted plane which reaches its target
- -- Basically, this makes the leg flat if there is nothing to place it on
- return p,HalfPi,0
- else
- -- Otherwise, use the law of cosines
- -- This is going to be all cases where the leg actually bends
- local a1 = -math.acos((-(l1*l1)+(l0*l0)+(m*m))/(2*l0*m))
- local a2 = math.acos(((l1*l1)-(l0*l0)+(m*m))/(2*l1*m))
- return p,HalfPi-a1,-(a2-a1)
- end
- end
- local function lerpNumber(a,b,t)return (a+(b-a)*t)end -- Get a number between a and b, given the alpha (t, which can be a number anywhere between 0-1).
- --**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--
- --**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--
- --**--**--**--**--**--||
- --**--**--**--**--**--|| CLASS CONSTRUCTOR, VARIABLES, AND METHODS
- --**--**--**--**--**--||
- --**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--
- --**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--
- local RaycastParameters = RaycastParams.new()
- RaycastParameters.IgnoreWater = true
- RaycastParameters.FilterType = Enum.RaycastFilterType.Blacklist
- local ParamBlacklist = {}
- IK_HANDLER.ActiveInstances = {}
- function IK_HANDLER.New(Player, Stride, CycleSpeed, MaxRenderDistance, RaycastOffset)
- local Character = Player and Player.Character
- if not Player then
- error("Attempted to pass player, got nil")
- elseif not Character then
- error("Attempted to get Character from " .. Player .. ", got nil")
- end
- local Stride = Stride or 2.6
- local CycleSpeed = CycleSpeed or 10
- local MaxRenderDistance = MaxRenderDistance or 150
- local RaycastOffset = RaycastOffset or 0.3
- local self = {}
- self.Character = Character
- self.Humanoid = Character:WaitForChild("Humanoid")
- self.HumanoidRootPart = owner.Character.HumanoidRootPart
- self.TargetBaseBart = Character:WaitForChild("LowerTorso")
- self.WaistJoint = Character:WaitForChild("UpperTorso"):WaitForChild("Waist")
- self.RootJoint = self.TargetBaseBart:WaitForChild("Root")
- self.WaistCFrame1 = self.WaistJoint.C1
- self.RightHip = Character:WaitForChild("RightUpperLeg"):WaitForChild("RightHip")
- self.RightKnee = Character:WaitForChild("RightLowerLeg"):WaitForChild("RightKnee")
- self.LeftHip = Character:WaitForChild("LeftUpperLeg"):WaitForChild("LeftHip")
- self.LeftKnee = Character:WaitForChild("LeftLowerLeg"):WaitForChild("LeftKnee")
- self.RightHipCFrame0 = self.RightHip.C0
- self.RightKneeCFrame0 = self.RightKnee.C0
- self.LeftHipCFrame0 = self.LeftHip.C0
- self.LeftKneeCFrame0 = self.LeftKnee.C0
- self.LeftRotationAngle = 0
- self.RightRotationAngle = Pi
- self.Direction = YAxisExclusion -- This will be changed
- self.CycleSpeed = CycleSpeed -- How fast the leg-movement cycle is. Change this to suit your needs!
- self.StrideCFrame = CFrame.new(0,0,-Stride/2) -- Turn the Stride number into a CFrame we can use for animation
- self.PreviousTick = tick()
- self.Enabled = true
- self.MaxRenderDistance = MaxRenderDistance
- self.RaycastOffset = RaycastOffset
- IK_HANDLER.ActiveInstances[self] = true
- IK_HANDLER.UpdateRaycastBlacklist()
- return setmetatable(self, IK_HANDLER) -- We have made an I N S T A N C E (*laughs in programming*)
- end
- function IK_HANDLER.UpdateRaycastBlacklist(Blacklist)
- if Blacklist then
- ParamBlacklist = Blacklist
- end
- local Mod = {}
- for self,_ in pairs(IK_HANDLER.ActiveInstances) do
- if self.Character then
- table.insert(Mod, self.Character)
- end
- end
- RaycastParameters.FilterDescendantsInstances = {unpack(Mod),unpack(ParamBlacklist)}
- end
- --**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--
- --**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--
- --**--**--**--**--**--||
- --**--**--**--**--**--|| INSTANCE METHODS
- --**--**--**--**--**--||
- --**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--
- --**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--**--
- function IK_HANDLER:IsActive()
- if not IK_HANDLER.ActiveInstances[self] then
- return false
- end
- if not self.Character or not self.Character.Parent then
- IK_HANDLER.ActiveInstances[self] = nil
- IK_HANDLER.UpdateRaycastBlacklist()
- return false
- end
- return true
- end
- function IK_HANDLER:Destroy()
- if IK_HANDLER.ActiveInstances[self] then
- IK_HANDLER.ActiveInstances[self] = nil
- end
- for Index, _ in pairs(self) do
- self[Index] = nil
- end
- self = nil
- IK_HANDLER.UpdateRaycastBlacklist()
- end
- function IK_HANDLER:Enable()
- self.Enabled = true
- end
- function IK_HANDLER:Disable()
- self.Enabled = false
- end
- function IK_HANDLER:Update()
- pcall(function()
- if not self.Enabled then
- return
- end
- if not self.Character or not self.Character.Parent then
- IK_HANDLER.ActiveInstances[self] = nil
- IK_HANDLER.UpdateRaycastBlacklist()
- return
- end
- local CurrentTick = tick()
- local Delta = math.clamp(CurrentTick - self.PreviousTick,0.00001,0.5)
- local Delta10 = math.min(Delta*10,1) -- Modify Delta for our needs
- local lowercf = self.TargetBaseBart.CFrame -- Our position
- local rootcf = self.HumanoidRootPart.CFrame -- Another position
- local rootvel0 = self.HumanoidRootPart.Velocity -- Our movement velocity
- local rootvel,rootvelm
- local climbing = self.Humanoid:GetState() == Enum.HumanoidStateType.Climbing -- Are we climbing?
- local RootPosition = rootcf.Position
- --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--
- --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--
- self.PreviousTick = CurrentTick
- if climbing then -- Don't animate if we are climbing, it looks weird
- rootvel = rootvel0
- rootvelm = rootvel.Magnitude
- self.Direction = rootcf.lookVector
- owner.Character.Humanoid.HipHeight = -1
- else
- rootvel =rootvel0*YAxisExclusion
- rootvelm =rootvel.Magnitude
- owner.Character.Humanoid.HipHeight = 0
- if rootvelm > 0.1 then
- self.Direction = self.Direction:Lerp(rootvel.Unit, Delta10)
- end
- end
- --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--
- --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--
- local up =rootvelm/18
- local cycle =up * Delta * self.CycleSpeed
- self.RightRotationAngle = (self.RightRotationAngle+cycle)%Tau
- self.LeftRotationAngle = (self.LeftRotationAngle+cycle)%Tau
- -- By using modulus and Tau (Tau is a full circle roation), we keep rotations within our imaginary circle. Without this we get really weird joint movement.
- --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--
- --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--
- if rootvelm > 0.1 then --// When moving
- local relv0 = lowercf:vectorToObjectSpace(rootvel)-- Object space is nice yes?
- local relv1 = relv0*0.2
- local relvx = relv0.X/rootvel.Magnitude
- self.WaistJoint.C1 = self.WaistJoint.C1:Lerp(self.WaistCFrame1*CFrame.Angles(math.rad(relv1.Z),0.1*math.cos(self.RightRotationAngle)-2*math.rad(relv1.X),math.rad(-relv1.X)):Inverse(),Delta10) -- Upper Torso Anim
- local hpmod = HalfPi/20
- local kneeRot = 2
- local hipAlpha = Delta10*1.5
- local kneeAlpha = Delta10*1.5
- do -- Right Leg
- local hip = (rootcf*RightHipCFrame).Position
- local ground = (rootcf*RightHipCFrame2).Position
- local desiredPos = (CFrame.new(ground, ground+self.Direction)*CFrame.Angles(-self.RightRotationAngle, 0, 0)*self.StrideCFrame*CFrame.new(0.1,0,0)).Position
- local offset = (desiredPos-hip)
- local raycastResult = workspace:Raycast(hip,offset.Unit*(offset.magnitude+0.6),RaycastParameters)
- local footPos = raycastResult and raycastResult.Position or (hip + offset.Unit*(offset.magnitude+self.RaycastOffset))
- local plane,th1,th2 = SolveLegIK(lowercf*self.RightHipCFrame0,footPos, 0.55,1.15) -- 0.55,1.15
- self.RightHip.C0 = self.RightHip.C0:Lerp(lowercf:toObjectSpace(plane)*CFrame.Angles(th1,-hpmod,0),hipAlpha)
- self.RightKnee.C0 = self.RightKnee.C0:Lerp(self.RightKneeCFrame0*CFrame.Angles(th2*kneeRot,0,0),kneeAlpha)
- end
- do-- Left Leg
- local hip = (rootcf*LeftHipCFrame).Position
- local ground =(rootcf*LeftHipCFrame2).Position
- local desiredPos = (CFrame.new(ground, ground+self.Direction)*CFrame.Angles(-self.LeftRotationAngle, 0, 0)*self.StrideCFrame*CFrame.new(-0.1,0,0)).Position
- local offset = (desiredPos-hip)
- local raycastResult = workspace:Raycast(hip,offset.Unit*(offset.magnitude+0.6),RaycastParameters)
- local footPos = raycastResult and raycastResult.Position or (hip + offset.Unit*(offset.magnitude+self.RaycastOffset))
- local plane,th1,th2 = SolveLegIK(lowercf*self.LeftHipCFrame0,footPos, 0.55,1.15)
- self.LeftHip.C0 = self.LeftHip.C0:Lerp(lowercf:toObjectSpace(plane)*CFrame.Angles(th1,hpmod,0),hipAlpha)
- self.LeftKnee.C0 = self.LeftKnee.C0:Lerp(self.LeftKneeCFrame0*CFrame.Angles(th2*kneeRot,0,0),kneeAlpha)
- end
- else --// When not moving
- -- Upper Torso
- self.WaistJoint.C1 =self.WaistJoint.C1:Lerp(self.WaistCFrame1, Delta10)
- local lowercf = lowercf
- do -- Right Leg
- local hipcf=(rootcf*RightHipCFrame)
- local hip =hipcf.Position
- local desiredPos =(hipcf*RightIdleCFrame).Position
- local offset =(desiredPos-hip)
- local raycastResult = workspace:Raycast(hip,offset.Unit*(offset.magnitude+1),RaycastParameters)
- local footPos = raycastResult and raycastResult.Position or (hip + offset.Unit*(offset.magnitude+self.RaycastOffset))
- local plane,th1,th2 = SolveLegIK(lowercf*self.RightHipCFrame0,footPos, 0.55,1.15)
- self.RightHip.C0 = self.RightHip.C0:Lerp(lowercf:toObjectSpace(plane)*CFrame.Angles(th1,0,-HalfPi/8),Delta10)
- self.RightKnee.C0 = self.RightKnee.C0:Lerp(self.RightKneeCFrame0*CFrame.Angles(th2,0,0),Delta10)
- end
- do -- Left Leg
- local hipcf = (rootcf*LeftHipCFrame)
- local hip = hipcf.Position
- local desiredPos = (hipcf*LeftIdleCFrame).Position
- local offset = (desiredPos-hip)
- local raycastResult = workspace:Raycast(hip,offset.Unit*(offset.magnitude+1),RaycastParameters)
- local footPos = raycastResult and raycastResult.Position or (hip + offset.Unit*(offset.magnitude+self.RaycastOffset))
- local plane,th1,th2 = SolveLegIK(lowercf*self.LeftHipCFrame0,footPos, 0.55,1.15)
- self.LeftHip.C0 = self.LeftHip.C0:Lerp(lowercf:toObjectSpace(plane)*CFrame.Angles(th1,0,HalfPi/8),Delta10)
- self.LeftKnee.C0 = self.LeftKnee.C0:Lerp(self.LeftKneeCFrame0*CFrame.Angles(th2,0,0),Delta10)
- end
- end
- end)
- end
- e = Instance.new("RemoteEvent",owner.Character)
- local hed = Instance.new("Weld",owner.Character.Torso)
- hed.Part0 = owner.Character.Head
- hed.Part1 = hed.Parent
- hed.C0 = CFrame.new(0,-0.5,0)
- hed.C1 = CFrame.new(0,1,0)
- hed.Enabled = false
- local tool = Instance.new("Tool",owner.Backpack)
- tool.RequiresHandle = false
- tool.Name = "i have an obsession with ultrakill weapons please help im begging you"
- tool.ToolTip = "i have an obsession with ultrakill weapons please help im begging you save me from this i beg i need help please help im begging you please"
- tool.TextureId = "rbxassetid://11541198228"
- tool.Grip = CFrame.Angles(math.rad(180),0,0) * CFrame.new(0,-0.5,0.5)
- local part = Instance.new("Part",tool)
- part.CanCollide = false
- part.Size = Vector3.new(4.282, 15.101, 31.717) * 0.1
- part.Massless = true
- local weld = Instance.new("Weld",owner.Character["Right Arm"])
- weld.Part0 = part
- weld.Part1 = owner.Character["Right Arm"]
- weld.C1 = CFrame.Angles(math.rad(180 + -90),0,0) * CFrame.new(0,-0.25,1.5) * CFrame.Angles(math.rad(-2),math.rad(-2),0)
- local armw = Instance.new("Weld",owner.Character.Torso)
- armw.Part0 = owner.Character["Right Arm"]
- armw.Part1 = owner.Character.Torso
- armw.C1 = CFrame.new(1.5,0.4,0.25)
- armw.Enabled = false
- armw.C0 = CFrame.new(0,0.5,0) * CFrame.Angles(math.rad(-90),0,0)
- local tweenService = game:GetService("TweenService")
- local tweenInfo = TweenInfo.new(0.1,Enum.EasingStyle.Quad,Enum.EasingDirection.Out)
- local goal = {}
- goal.C0 = CFrame.Angles(math.rad(-120),0,0)
- local tween = tweenService:Create(weld, tweenInfo, goal)
- local goal4 = {}
- goal4.C1 = CFrame.Angles(math.rad(180 + -90),0,0) * CFrame.new(0,-0.75,1.5) * CFrame.Angles(math.rad(-2),math.rad(-2),0)
- local tween4 = tweenService:Create(weld, tweenInfo, goal4)
- local tweenInfo = TweenInfo.new(0.15,Enum.EasingStyle.Linear,Enum.EasingDirection.Out)
- local goal2 = {}
- goal2.C0 = CFrame.Angles(math.rad(-240),0,0)
- local tween2 = tweenService:Create(weld, tweenInfo, goal2)
- local goal5 = {}
- goal5.C1 = CFrame.Angles(math.rad(180 + -90),0,0) * CFrame.new(0,-1.25,1.25) * CFrame.Angles(math.rad(-2),math.rad(-2),0)
- local tween5 = tweenService:Create(weld, tweenInfo, goal5)
- local tweenInfo = TweenInfo.new(0.1,Enum.EasingStyle.Quad,Enum.EasingDirection.In)
- local goal3 = {}
- goal3.C0 = CFrame.Angles(math.rad(-360),0,0)
- local tween3 = tweenService:Create(weld, tweenInfo, goal3)
- local goal6 = {}
- goal6.C1 = CFrame.Angles(math.rad(180 + -90),0,0) * CFrame.new(0,-0.25,1.5) * CFrame.Angles(math.rad(-2),math.rad(-2),0)
- local tween6 = tweenService:Create(weld, tweenInfo, goal6)
- local m = Instance.new("SpecialMesh",part)
- m.MeshId = "rbxassetid://7371059530"
- m.TextureId = "rbxassetid://10522947294"
- m.Scale = Vector3.new(1,1,1) * -0.1
- m.Offset = Vector3.new(0,0,0.5)
- local part2 = Instance.new("Part",tool)
- part2.CanCollide = false
- part2.Size = Vector3.new(4.282, 15.101, 31.717) * 0.1
- part2.Massless = true
- local weld2 = Instance.new("Weld",owner.Character["Left Arm"])
- weld2.Part0 = part2
- weld2.Part1 = owner.Character["Left Arm"]
- weld2.C1 = CFrame.Angles(math.rad(180 + -90),0,0) * CFrame.new(0,-0.25,1.5) * CFrame.Angles(math.rad(-2),math.rad(2),0)
- local armw2 = Instance.new("Weld",owner.Character.Torso)
- armw2.Part0 = owner.Character["Left Arm"]
- armw2.Part1 = owner.Character.Torso
- armw2.C1 = CFrame.new(-1.5,0.4,0.25)
- armw2.Enabled = false
- armw2.C0 = CFrame.new(0,0.5,0) * CFrame.Angles(math.rad(-90),0,0)
- local tweenService = game:GetService("TweenService")
- local tweenInfo = TweenInfo.new(0.1,Enum.EasingStyle.Quad,Enum.EasingDirection.Out)
- local goal12 = {}
- goal12.C0 = CFrame.Angles(math.rad(-120),0,0)
- local tween12 = tweenService:Create(weld2, tweenInfo, goal12)
- local goal42 = {}
- goal42.C1 = CFrame.Angles(math.rad(180 + -90),0,0) * CFrame.new(0,-0.75,1.5) * CFrame.Angles(math.rad(-2),math.rad(2),0)
- local tween42 = tweenService:Create(weld2, tweenInfo, goal42)
- local tweenInfo = TweenInfo.new(0.15,Enum.EasingStyle.Linear,Enum.EasingDirection.Out)
- local goal22 = {}
- goal22.C0 = CFrame.Angles(math.rad(-240),0,0)
- local tween22 = tweenService:Create(weld2, tweenInfo, goal22)
- local goal52 = {}
- goal52.C1 = CFrame.Angles(math.rad(180 + -90),0,0) * CFrame.new(0,-1.25,1.25) * CFrame.Angles(math.rad(-2),math.rad(2),0)
- local tween52 = tweenService:Create(weld2, tweenInfo, goal52)
- local tweenInfo = TweenInfo.new(0.1,Enum.EasingStyle.Quad,Enum.EasingDirection.In)
- local goal32 = {}
- goal32.C0 = CFrame.Angles(math.rad(-360),0,0)
- local tween32 = tweenService:Create(weld2, tweenInfo, goal32)
- local goal62 = {}
- goal62.C1 = CFrame.Angles(math.rad(180 + -90),0,0) * CFrame.new(0,-0.25,1.5) * CFrame.Angles(math.rad(-2),math.rad(2),0)
- local tween62 = tweenService:Create(weld2, tweenInfo, goal62)
- local tweenInfo = TweenInfo.new(0.2,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,true)
- local goal = {}
- goal.C0 = CFrame.new(0,0.5,0.2) * CFrame.Angles(math.rad(-100),0,0)
- local twee = tweenService:Create(armw, tweenInfo, goal)
- local twee2 = tweenService:Create(armw2, tweenInfo, goal)
- local tweenInfo = TweenInfo.new(0.15,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,true)
- local goal = {}
- goal.C0 = CFrame.new(0,-0.1,0.2) * CFrame.Angles(math.rad(-110),0,0)
- local tweee = tweenService:Create(armw, tweenInfo, goal)
- local tweee2 = tweenService:Create(armw2, tweenInfo, goal)
- local goal = {}
- goal.C1 = CFrame.Angles(math.rad(180 + -90),0,0) * CFrame.new(0,-0.5,1.25) * CFrame.Angles(math.rad(14),math.rad(-2),0)
- local tweeee = tweenService:Create(weld, tweenInfo, goal)
- local goal = {}
- goal.C1 = CFrame.Angles(math.rad(180 + -90),0,0) * CFrame.new(0,-0.5,1.25) * CFrame.Angles(math.rad(14),math.rad(2),0)
- local tweeee2 = tweenService:Create(weld2, tweenInfo, goal)
- local welll = Instance.new("Weld",owner.Character.HumanoidRootPart)
- welll.Part0 = owner.Character.Torso
- welll.Part1 = owner.Character.HumanoidRootPart
- welll.C0 = CFrame.new(0,-0.75,0)
- welll.C1 = CFrame.new(0,-0.75,0)
- welll.Enabled = false
- local tweenInfo = TweenInfo.new(0.1,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,true)
- local goa = {}
- goa.C1 = welll.C1 * CFrame.Angles(math.rad(-5),0,0)
- local tweee3 = tweenService:Create(welll, tweenInfo, goa)
- local m2 = Instance.new("SpecialMesh",part2)
- m2.MeshId = "rbxassetid://7371059530"
- m2.TextureId = "rbxassetid://10522947294"
- m2.Scale = Vector3.new(1,1,1) * -0.1
- m2.Offset = Vector3.new(0,0,0.5)
- local equip = Instance.new("Sound")
- equip.PlayOnRemove = true
- equip.Volume = 1
- local m = Instance.new("Sound",part)
- m.Volume = 0.7
- m.SoundId = "rbxassetid://1838457617"
- m.Looped = true
- local shotcount = 24
- equip.SoundId = "rbxassetid://6870002623"
- local reload = false
- tween.Completed:Connect(function()
- tween2:Play()
- tween5:Play()
- tween22:Play()
- tween52:Play()
- end)
- tween2.Completed:Connect(function()
- tween3:Play()
- tween6:Play()
- tween32:Play()
- tween62:Play()
- end)
- tween62.Completed:Connect(function()
- wait(0.05)
- reload = false
- shotcount = 0
- end)
- tool.Equipped:Connect(function()
- equip.Parent = part
- equip.Parent = nil
- m:Play()
- end)
- tool.Equipped:Connect(function()
- reload = true
- armw.Enabled = true
- armw2.Enabled = true
- hed.Enabled = true
- tween:Play()
- tween4:Play()
- tween12:Play()
- tween42:Play()
- twee:Play()
- twee2:Play()
- w.Enabled = true
- w2.Enabled = true
- welll.Enabled = true
- end)
- tool.Unequipped:Connect(function()
- armw.Enabled = false
- armw2.Enabled = false
- hed.Enabled = false
- w.Enabled = false
- w2.Enabled = false
- welll.Enabled = false
- shotcount = 24
- m:Pause()
- end)
- thepew = false
- tool.Activated:Connect(function()
- if not reload then
- thepew = true
- end
- end)
- tool.Deactivated:Connect(function()
- thepew = false
- end)
- e.OnServerEvent:Connect(function(_,cam,c1,alpha,hitcf,sw,wcs,shift)
- local lookvector = owner.Character.HumanoidRootPart.CFrame:toObjectSpace(cam).lookVector.unit
- local y = lookvector.y
- hed.C0 = hed.C0:Lerp(CFrame.new(0,-0.5,0) * CFrame.Angles(-y * 0.75,0,0),0.5)
- hed.C0 = hed.C0 * CFrame.Angles(sw.y,0,0)
- if shift then
- welll.C0 = welll.C0:Lerp(CFrame.new(0,-0.75,0) * CFrame.Angles(-y * 0.25,0,0) * CFrame.Angles(wcs.y / 9, wcs.x / 9,wcs.y / 9) * CFrame.Angles(0,sw.x,sw.x),0.5)
- if y > 0 then
- armw.C1 = armw.C1:Lerp(CFrame.new(1.5,0.4,0) * CFrame.Angles(y * 0.75 + sw.y,-(sw.x),0) * CFrame.new(0,-0.5 * (y * 0.75),-0.5 * (y * 0.75)),0.5)
- armw.C1 = armw.C1:Lerp(armw.C1 * CFrame.new(wcs.y / 3, wcs.x / 3,0),0.25)
- armw2.C1 = armw2.C1:Lerp(CFrame.new(-1.5,0.4,0) * CFrame.Angles(y * 0.75 + sw.y,-(sw.x),0) * CFrame.new(0,-0.5 * (y * 0.75),-0.5 * (y * 0.75)),0.5)
- armw2.C1 = armw2.C1:Lerp(armw2.C1 * CFrame.new(wcs.y / 3, wcs.x / 3,0),0.25)
- else
- armw.C1 = armw.C1:Lerp(CFrame.new(1.5,0.4,0) * CFrame.Angles((y * 0.75) + sw.y,-(sw.x),0) * CFrame.new(0,0.5 * (y * 0.75),-0.5 * (y * 0.75)),0.5)
- armw.C1 = armw.C1:Lerp(armw.C1 * CFrame.new(wcs.y / 3, wcs.x / 3,0),0.25)
- armw2.C1 = armw2.C1:Lerp(CFrame.new(-1.5,0.4,0) * CFrame.Angles((y * 0.75) + sw.y,-(sw.x),0) * CFrame.new(0,0.5 * (y * 0.75),-0.5 * (y * 0.75)),0.5)
- armw2.C1 = armw2.C1:Lerp(armw2.C1 * CFrame.new(wcs.y / 3, wcs.x / 3,0),0.25)
- end
- else
- welll.C0 = welll.C0:Lerp(CFrame.new(0,-0.75,0) * CFrame.Angles(-y * 0.25,0,0) * CFrame.Angles(wcs.y / 9, wcs.x / 9,wcs.y / 9),0.5)
- if y > 0 then
- armw.C1 = armw.C1:Lerp(CFrame.new(1.5,0.4,0) * CFrame.Angles((y * 0.75) + sw.y,0,0) * CFrame.new(0,-0.5 * (y * 0.75),-0.5 * (y * 0.75)),0.5)
- armw.C1 = armw.C1:Lerp(armw.C1 * CFrame.new(wcs.y / 3, wcs.x / 3,0),0.25)
- armw2.C1 = armw2.C1:Lerp(CFrame.new(-1.5,0.4,0) * CFrame.Angles((y * 0.75) + sw.y,0,0) * CFrame.new(0,-0.5 * (y * 0.75),-0.5 * (y * 0.75)),0.5)
- armw2.C1 = armw2.C1:Lerp(armw2.C1 * CFrame.new(wcs.y / 3, wcs.x / 3,0),0.25)
- else
- armw.C1 = armw.C1:Lerp(CFrame.new(1.5,0.4,0) * CFrame.Angles((y * 0.75) + sw.y,0,0) * CFrame.new(0,0.5 * (y * 0.75),-0.5 * (y * 0.75)),0.5)
- armw.C1 = armw.C1:Lerp(armw.C1 * CFrame.new(wcs.y / 3, wcs.x / 3,0),0.25)
- armw2.C1 = armw2.C1:Lerp(CFrame.new(-1.5,0.4,0) * CFrame.Angles((y * 0.75) + sw.y,0,0) * CFrame.new(0,0.5 * (y * 0.75),-0.5 * (y * 0.75)),0.5)
- armw2.C1 = armw2.C1:Lerp(armw2.C1 * CFrame.new(wcs.y / 3, wcs.x / 3,0),0.25)
- end
- end
- end)
- NLS([[
- e = script.Parent
- local tool = owner.Backpack:WaitForChild("i have an obsession with ultrakill weapons please help im begging you")
- local ITERATIONS = 8
- local SPRING = {}
- function SPRING.create(self, mass, force, damping, speed)
- local spring = {
- Target = Vector3.new();
- Position = Vector3.new();
- Velocity = Vector3.new();
- Mass = mass or 5;
- Force = force or 50;
- Damping = damping or 4;
- Speed = speed or 4;
- }
- function spring.shove(self, force)
- local x, y, z = force.X, force.Y, force.Z
- if x ~= x or x == math.huge or x == -math.huge then
- x = 0
- end
- if y ~= y or y == math.huge or y == -math.huge then
- y = 0
- end
- if z ~= z or z == math.huge or z == -math.huge then
- z = 0
- end
- self.Velocity = self.Velocity + Vector3.new(x, y, z)
- end
- function spring.update(self, dt)
- local scaledDeltaTime = math.min(dt,1) * self.Speed / ITERATIONS
- for i = 1, ITERATIONS do
- local iterationForce = self.Target - self.Position
- local acceleration = (iterationForce * self.Force) / self.Mass
- acceleration = acceleration - (self.Velocity * self.Damping)
- self.Velocity = self.Velocity + (acceleration * scaledDeltaTime)
- self.Position = self.Position + (self.Velocity * scaledDeltaTime)
- end
- return self.Position
- end
- return spring
- end
- local wc = SPRING.create()
- local sway = SPRING.create()
- local bobspeed = 1
- local bobmod = .1
- local alpha = .25
- local hitcf = CFrame.new()
- local function gb(addition, speed, modifier)
- return math.sin(tick() * addition * speed) * modifier
- end
- c1 = CFrame.new(0,0,0)
- c2 = CFrame.new(0,0,0)
- local UIS = game:GetService("UserInputService")
- shift = false
- UIS:GetPropertyChangedSignal("MouseBehavior"):Connect(function()
- if UIS.MouseBehavior == Enum.MouseBehavior.LockCenter then
- shift = true
- elseif UIS.MouseBehavior ~= Enum.MouseBehavior.LockCenter then
- shift = false
- end
- end)
- local mouse = owner:GetMouse()
- local part = Instance.new("Part",owner.Character.Head)
- part.Size = Vector3.new()
- part.CanCollide = false
- part.Transparency = 1
- local weld = Instance.new("Weld", owner.Character.Head)
- weld.Part0 = part
- weld.Part1 = owner.Character.Head
- weld.C0 = CFrame.new(0,-0.5,0.5)
- game:GetService("RunService").RenderStepped:Connect(function(dt)
- delta = game:GetService("UserInputService"):GetMouseDelta()
- local vel = owner.Character.HumanoidRootPart.Velocity
- local msway = Vector3.new(gb(10, bobspeed, bobmod), gb(5, bobspeed, bobmod), gb(5, bobspeed, bobmod))
- sway:shove(Vector3.new(delta.X / 500, delta.Y / 500))
- wc:shove((msway / 25) * dt * 60 * math.clamp(vel.Magnitude,0,30))
- local sw = sway:update(dt)
- local wcs = wc:update(dt)
- if shift == true and (owner.Character.Head.CFrame.Position - workspace.CurrentCamera.CFrame.Position).Magnitude < 1.5 then
- local x,_,z = owner.Character.HumanoidRootPart.CFrame:ToOrientation()
- local _,y,_ = workspace.CurrentCamera.CFrame:ToOrientation()
- owner.Character.HumanoidRootPart.CFrame = CFrame.new(owner.Character.HumanoidRootPart.Position) * CFrame.Angles(x,y,z)
- workspace.CurrentCamera.FieldOfView = 100
- for i,v in pairs(owner.Character:GetDescendants()) do
- if v:IsA("Part") or v:IsA("MeshPart") and v.Name ~= "Head" then
- v.LocalTransparencyModifier = 0
- end
- if v:IsA("Accessory") and (v.AccessoryType == Enum.AccessoryType.Hat or v.AccessoryType == Enum.AccessoryType.Hair or v.AccessoryType == Enum.AccessoryType.Face or v.AccessoryType == Enum.AccessoryType.Neck) and v.Handle ~= nil then
- v.Handle.Transparency = 1
- end
- end
- if owner.Character.Head.face ~= nil then
- owner.Character.Head.face.Transparency = 1
- end
- owner.Character.Head.Transparency = 1
- workspace.CurrentCamera.CameraSubject = part
- else
- workspace.CurrentCamera.FieldOfView = 70
- workspace.CurrentCamera.CameraSubject = owner.Character
- owner.Character.Head.Transparency = 0
- for i,v in pairs(owner.Character:GetDescendants()) do
- if v:FindFirstChildWhichIsA("SpecialMesh") then
- v.Transparency = 0
- end
- end
- if owner.Character.Head.face ~= nil then
- owner.Character.Head.face.Transparency = 0
- end
- end
- e:FireServer(workspace.CurrentCamera.CFrame,c1,alpha,hitcf,sw,wcs,shift)
- end)
- ]],e)
- wait()
- local IKProfile = IK_HANDLER.New(owner,1.5,10,0,0.5)
- wait()
- local Heartbeat = game:GetService("RunService").Heartbeat
- time = 1 + Heartbeat:Wait()
- lr = false
- coroutine.wrap(function()
- while game:GetService("RunService").Stepped:Wait() do
- if thepew and shotcount ~= 24 then
- shotcount += 1
- local muzzle = Instance.new("Part",script)
- muzzle.CanCollide = false
- muzzle.CanQuery = false
- muzzle.Anchored = true
- s.Parent = muzzle
- s.Parent = nil
- if shotcount >= 22 then
- s.PlaybackSpeed = Random.new():NextNumber(0.95,1.05) + (0.15 * (shotcount - 21))
- else
- s.PlaybackSpeed = Random.new():NextNumber(0.95,1.05)
- end
- tweee3:Play()
- if lr == true then
- muzzle.CFrame = part.CFrame * CFrame.new(0,-0.35,1.9)
- muzzle.Position = muzzle.Position + part.Velocity * owner:GetNetworkPing()
- tweee:Play()
- tweeee:Play()
- else
- muzzle.CFrame = part2.CFrame * CFrame.new(0,-0.35,1.9)
- muzzle.Position = muzzle.Position + part2.Velocity * owner:GetNetworkPing()
- tweee2:Play()
- tweeee2:Play()
- end
- muzzle.Transparency = 1
- local attachment0 = Instance.new("Attachment")
- attachment0.Parent = muzzle
- local attachment1 = Instance.new("Attachment")
- attachment1.Parent = workspace.Terrain
- attachment1.WorldCFrame = attachment0.WorldCFrame
- local params = RaycastParams.new()
- params.FilterDescendantsInstances = {owner.Character,script}
- params.FilterType = Enum.RaycastFilterType.Blacklist
- local res = workspace:Raycast(owner.Character.Head.Position + owner.Character.Head.Velocity * owner:GetNetworkPing(),owner.Character.Head.CFrame.lookVector * 5000, params)
- local muzzle2 = Instance.new("Part",script)
- muzzle2.CanQuery = false
- muzzle2.CanCollide = false
- muzzle2.Size = Vector3.new(0.1,0.1,0.1)
- muzzle2.Anchored = true
- muzzle2.Transparency = 1
- local pe = Instance.new("ParticleEmitter",muzzle2)
- pe.Texture = "rbxassetid://13191594"
- pe.Enabled = false
- pe.Speed = NumberRange.new(5,10)
- pe.Shape = "Cylinder"
- pe.ShapeStyle = "Volume"
- pe.ShapeInOut = "Outward"
- pe.LightEmission = 0.2
- pe.LightInfluence = 0.5
- pe.Size = NumberSequence.new{NumberSequenceKeypoint.new(0, 0.125),NumberSequenceKeypoint.new(1, 0.0625)}
- pe.Lifetime = NumberRange.new(0.5, 0.75)
- pe.Rate = 500
- pe.Drag = 2
- pe.LockedToPart = true
- pe.RotSpeed = NumberRange.new(0,0)
- pe.Color = ColorSequence.new(Color3.fromRGB(242, 191, 24))
- pe.SpreadAngle = Vector2.new(-20, 20)
- pe.EmissionDirection = Enum.NormalId.Back
- pe.Acceleration = Vector3.new(0,-50,0)
- game:GetService("Debris"):AddItem(muzzle2,1)
- local beam = Instance.new("Beam")
- beam.Width0 = 0.25
- beam.Width1 = 0.2
- local p = nil
- if res then
- p = CFrame.new(res.Position)
- if res.Instance:FindFirstAncestorWhichIsA("Model") and res.Instance:FindFirstAncestorWhichIsA("Model"):FindFirstChild("Humanoid") then
- res.Instance:FindFirstAncestorWhichIsA("Model"):FindFirstChild("Humanoid").Health -= 15
- muzzle2.CFrame = CFrame.new(res.Position) * CFrame.Angles(CFrame.new(muzzle.Position,res.Position):ToEulerAnglesXYZ()) * CFrame.Angles(0,math.rad(90),0)
- pe.Color = ColorSequence.new(Color3.fromRGB(222, 10, 7))
- else
- muzzle2.CFrame = CFrame.new(res.Position) * CFrame.Angles(CFrame.new(muzzle.Position,res.Position):ToEulerAnglesXYZ()) * CFrame.Angles(0,math.rad(90),0)
- pe.Color = ColorSequence.new(Color3.fromRGB(242, 191, 24))
- end
- else
- p = owner.Character.Head.CFrame * CFrame.new(0,0,-7000)
- muzzle2:Destroy()
- beam.Width1 = 0.125
- end
- beam.Attachment0 = attachment0
- beam.Attachment1 = attachment1
- beam.CurveSize0 = 0
- beam.CurveSize1 = 0
- beam.FaceCamera = true
- beam.LightInfluence = 0
- beam.Segments = 10
- beam.LightEmission = 1
- beam.Brightness = 0.8
- beam.Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(242, 191, 24)),ColorSequenceKeypoint.new(1, Color3.fromRGB(252, 227, 0))}
- beam.Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0, 0.9),NumberSequenceKeypoint.new(1, 0.9)}
- local billboard = Instance.new("BillboardGui", muzzle)
- billboard.Size = UDim2.new(2.5,0,2.5,0)
- local frame = Instance.new("ImageLabel", billboard)
- frame.BackgroundTransparency = 1
- frame.ImageTransparency = 0
- frame.Image = "http://www.roblox.com/asset/?id=11467328624"
- frame.Size = UDim2.new(1,0,1,0)
- local gg = {}
- gg.WorldCFrame = p
- local tweenInfoo = TweenInfo.new(0.13,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)
- local tttt = tweenService:Create(attachment1, tweenInfoo, gg)
- tttt:Play()
- coroutine.wrap(function()
- tttt.Completed:Wait()
- if pe ~= nil then
- pe:Emit(20)
- end
- end)()
- local gg = {}
- gg.Rotation = math.random(-50,50)
- gg.ImageTransparency = 1
- local tweenInfoo = TweenInfo.new(0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)
- local ttttt = tweenService:Create(frame, tweenInfoo, gg)
- ttttt:Play()
- local g = {}
- g.Width0 = 0.1
- g.Width1 = 0.1
- g.Brightness = 0.2
- local tweenInfo = TweenInfo.new(0.15,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)
- local t = tweenService:Create(beam, tweenInfo, g)
- coroutine.wrap(function()
- for i = -1,100,1 do
- wait(0.001)
- beam.Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0, (0.072 * i)),NumberSequenceKeypoint.new(1, (0.072 * i))}
- end
- end)()
- beam.Parent = muzzle
- coroutine.wrap(function()
- local gg = {}
- gg.CFrame = CFrame.new()
- local waittt = TweenInfo.new(0.3,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)
- local waitt = tweenService:Create(pppp, waittt, gg)
- waitt:Play()
- waitt.Completed:Wait()
- lr = not lr
- end)()
- local gg = {}
- gg.CFrame = CFrame.new()
- local waittt = TweenInfo.new(0.15,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)
- local waitt = tweenService:Create(pppp, waittt, gg)
- waitt:Play()
- waitt.Completed:Wait()
- t:Play()
- local gg = {}
- gg.CFrame = CFrame.new()
- local waittt = TweenInfo.new(0.15,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)
- local waitt = tweenService:Create(pppp, waittt, gg)
- waitt:Play()
- waitt.Completed:Wait()
- game:GetService("Debris"):AddItem(muzzle,0.3)
- elseif thepew and shotcount == 24 and not reload then
- reload = true
- tween:Play()
- tween4:Play()
- tween12:Play()
- tween42:Play()
- twee:Play()
- twee2:Play()
- end
- end
- end)()
- owner.Character.Humanoid.StateChanged:Connect(function(old, new)
- if tool.Parent == owner.Character then
- if new == Enum.HumanoidStateType.Seated or new == Enum.HumanoidStateType.PlatformStanding then
- w.Enabled = false
- w2.Enabled = false
- elseif (old == Enum.HumanoidStateType.Seated and new ~= Enum.HumanoidStateType.PlatformStanding) or (old == Enum.HumanoidStateType.PlatformStanding and new ~= Enum.HumanoidStateType.Seated) then
- w.Enabled = true
- w2.Enabled = true
- end
- end
- end)
- while task.wait() do
- if IKProfile:IsActive() then
- IKProfile:Update()
- end
- end
Add Comment
Please, Sign In to add comment