Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- local chil = workspace:GetChildren()
- for i,v in pairs(chil) do
- if not (v==script or v:IsA("Camera") or v:IsA("Terrain") or game:GetService("Players"):GetPlayerFromCharacter(v)~=nil) then
- v:Destroy()
- end
- end
- Camera0 = Instance.new("Camera")
- Part1 = Instance.new("Part")
- Model2 = Instance.new("Model")
- Model3 = Instance.new("Model")
- Part4 = Instance.new("Part")
- SpecialMesh5 = Instance.new("SpecialMesh")
- BillboardGui6 = Instance.new("BillboardGui")
- Frame7 = Instance.new("Frame")
- Frame8 = Instance.new("Frame")
- Script9 = Instance.new("Script")
- Frame10 = Instance.new("Frame")
- TextLabel11 = Instance.new("TextLabel")
- Script12 = Instance.new("Script")
- Decal13 = Instance.new("Decal")
- Part14 = Instance.new("Part")
- SpecialMesh15 = Instance.new("SpecialMesh")
- Script16 = Instance.new("Script")
- Part17 = Instance.new("Part")
- Decal18 = Instance.new("Decal")
- Motor6D19 = Instance.new("Motor6D")
- Motor6D20 = Instance.new("Motor6D")
- Motor6D21 = Instance.new("Motor6D")
- Motor6D22 = Instance.new("Motor6D")
- Motor6D23 = Instance.new("Motor6D")
- Part24 = Instance.new("Part")
- Part25 = Instance.new("Part")
- Part26 = Instance.new("Part")
- Part27 = Instance.new("Part")
- Humanoid28 = Instance.new("Humanoid")
- Model29 = Instance.new("Model")
- Model30 = Instance.new("Model")
- Part31 = Instance.new("Part")
- Motor6D32 = Instance.new("Motor6D")
- Script33 = Instance.new("Script")
- Script34 = Instance.new("Script")
- ModuleScript35 = Instance.new("ModuleScript")
- ModuleScript36 = Instance.new("ModuleScript")
- Script37 = Instance.new("Script")
- StringValue38 = Instance.new("StringValue")
- Script39 = Instance.new("Script")
- LocalScript40 = Instance.new("LocalScript")
- StringValue41 = Instance.new("StringValue")
- Animation42 = Instance.new("Animation")
- NumberValue43 = Instance.new("NumberValue")
- StringValue44 = Instance.new("StringValue")
- Animation45 = Instance.new("Animation")
- StringValue46 = Instance.new("StringValue")
- Animation47 = Instance.new("Animation")
- StringValue48 = Instance.new("StringValue")
- Animation49 = Instance.new("Animation")
- StringValue50 = Instance.new("StringValue")
- Animation51 = Instance.new("Animation")
- StringValue52 = Instance.new("StringValue")
- Animation53 = Instance.new("Animation")
- StringValue54 = Instance.new("StringValue")
- Animation55 = Instance.new("Animation")
- StringValue56 = Instance.new("StringValue")
- Animation57 = Instance.new("Animation")
- Camera0.Parent = mas
- Camera0.CFrame = CFrame.new(22.1343784, 17.2319031, -26.1501656, -0.542224884, -0.259428352, 0.799180269, -0, 0.951140821, 0.308757484, -0.840233445, 0.167415991, -0.515732169)
- Camera0.CoordinateFrame = CFrame.new(22.1343784, 17.2319031, -26.1501656, -0.542224884, -0.259428352, 0.799180269, -0, 0.951140821, 0.308757484, -0.840233445, 0.167415991, -0.515732169)
- Camera0.Focus = CFrame.new(20.2108402, 16.4887581, -24.9088554, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Camera0.focus = CFrame.new(20.2108402, 16.4887581, -24.9088554, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part1.Name = "Baseplate"
- Part1.Parent = mas
- Part1.CFrame = CFrame.new(0, -10, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part1.Position = Vector3.new(0, -10, 0)
- Part1.Color = Color3.new(0.227451, 0.490196, 0.0823529)
- Part1.Size = Vector3.new(512, 20, 512)
- Part1.Anchored = true
- Part1.BrickColor = BrickColor.new("Camo")
- Part1.Locked = true
- Part1.Material = Enum.Material.Grass
- Part1.brickColor = BrickColor.new("Camo")
- Part1.FormFactor = Enum.FormFactor.Symmetric
- Part1.formFactor = Enum.FormFactor.Symmetric
- Model2.Name = "VTabs"
- Model2.Parent = mas
- Model3.Name = "Rainbow Noob"
- Model3.Parent = mas
- Model3.PrimaryPart = Part4
- Part4.Name = "Head"
- Part4.Parent = Model3
- Part4.CFrame = CFrame.new(-6.15512848, 4.50046158, -11.473012, 0.999999464, 0.000386848697, 0.000969587942, -0.000386940024, 1.00000119, 9.46386717e-05, -0.000969551271, -9.50139438e-05, 0.999999523)
- Part4.Orientation = Vector3.new(-0.00999999978, 0.0599999987, -0.0199999996)
- Part4.Position = Vector3.new(-6.15512848, 4.50046158, -11.473012)
- Part4.Rotation = Vector3.new(-0.00999999978, 0.0599999987, -0.0199999996)
- Part4.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Part4.Size = Vector3.new(2, 1, 1)
- Part4.BackParamA = -99999
- Part4.BackParamB = 99999
- Part4.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part4.BottomParamA = -99999
- Part4.BottomParamB = 99999
- Part4.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part4.BrickColor = BrickColor.new("Bright yellow")
- Part4.CustomPhysicalProperties = 0.699999988, 2, 0, 1, 1
- Part4.FrontParamA = -99999
- Part4.FrontParamB = 99999
- Part4.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part4.LeftParamA = -99999
- Part4.LeftParamB = 99999
- Part4.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part4.Material = Enum.Material.SmoothPlastic
- Part4.RightParamA = -99999
- Part4.RightParamB = 99999
- Part4.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part4.TopParamA = -99999
- Part4.TopParamB = 99999
- Part4.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part4.brickColor = BrickColor.new("Bright yellow")
- Part4.FormFactor = Enum.FormFactor.Symmetric
- Part4.formFactor = Enum.FormFactor.Symmetric
- SpecialMesh5.Parent = Part4
- SpecialMesh5.Scale = Vector3.new(1.25, 1.25, 1.25)
- BillboardGui6.Parent = Part4
- BillboardGui6.Size = UDim2.new(50, 0, 5, 0)
- BillboardGui6.Active = true
- BillboardGui6.MaxDistance = 9.9999998430675e+17
- BillboardGui6.StudsOffset = Vector3.new(0, 6, 0)
- Frame7.Parent = BillboardGui6
- Frame7.Size = UDim2.new(1, 0, 1, 0)
- Frame7.BackgroundColor = BrickColor.new("Really black")
- Frame7.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame7.BorderColor = BrickColor.new("Really black")
- Frame7.BorderColor3 = Color3.new(0.0313726, 0.0313726, 0.0313726)
- Frame7.BorderSizePixel = 2
- Frame8.Name = "HPBar"
- Frame8.Parent = Frame7
- Frame8.Size = UDim2.new(0, 0, 1, 0)
- Frame8.BackgroundColor = BrickColor.new("Turquoise")
- Frame8.BackgroundColor3 = Color3.new(0.529412, 0.776471, 0.72549)
- Frame8.BorderColor = BrickColor.new("Really black")
- Frame8.BorderColor3 = Color3.new(0, 0, 0)
- Frame8.BorderSizePixel = 4
- Script9.Parent = Frame8
- table.insert(cors,sandbox(Script9,function()
- while wait() do
- script.Parent:TweenSize(UDim2.new(script.Parent.Parent.Parent.Parent.Parent.Humanoid.Health/script.Parent.Parent.Parent.Parent.Parent.Humanoid.MaxHealth,0,1,0),nil,1,0.5,true)
- end
- end))
- Frame10.Name = "shade"
- Frame10.Parent = Frame8
- Frame10.Position = UDim2.new(0, 0, 0.5, 0)
- Frame10.Size = UDim2.new(1, 0, 0.5, 0)
- Frame10.BackgroundColor = BrickColor.new("Really black")
- Frame10.BackgroundColor3 = Color3.new(0, 0, 0)
- Frame10.BackgroundTransparency = 0.75
- Frame10.BorderSizePixel = 0
- TextLabel11.Parent = Frame7
- TextLabel11.Size = UDim2.new(1, 0, 1, 0)
- TextLabel11.BackgroundColor = BrickColor.new("Institutional white")
- TextLabel11.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel11.BackgroundTransparency = 1
- TextLabel11.Font = Enum.Font.Cartoon
- TextLabel11.FontSize = Enum.FontSize.Size14
- TextLabel11.Text = "Name"
- TextLabel11.TextColor = BrickColor.new("Institutional white")
- TextLabel11.TextColor3 = Color3.new(1, 1, 1)
- TextLabel11.TextScaled = true
- TextLabel11.TextSize = 14
- TextLabel11.TextStrokeColor3 = Color3.new(1, 0.666667, 1)
- TextLabel11.TextStrokeTransparency = 0
- TextLabel11.TextWrap = true
- TextLabel11.TextWrapped = true
- Script12.Parent = TextLabel11
- table.insert(cors,sandbox(Script12,function()
- while wait() do
- script.Parent.Text = string.upper(script.Parent.Parent.Parent.Parent.Parent.Name).. " | " ..math.floor(script.Parent.Parent.Parent.Parent.Parent.Humanoid.Health)
- end
- end))
- Decal13.Name = "Cartoony guy"
- Decal13.Parent = Part4
- Decal13.Texture = "http://www.roblox.com/asset/?id=192467476"
- Part14.Name = "Handle"
- Part14.Parent = Part4
- Part14.CFrame = CFrame.new(-6.13871098, 5.11358404, -11.4352522, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- Part14.Orientation = Vector3.new(0, 180, 0)
- Part14.Position = Vector3.new(-6.13871098, 5.11358404, -11.4352522)
- Part14.Rotation = Vector3.new(-180, 0, -180)
- Part14.Size = Vector3.new(2, 0.800000012, 2)
- Part14.BottomSurface = Enum.SurfaceType.Smooth
- Part14.TopSurface = Enum.SurfaceType.Smooth
- Part14.FormFactor = Enum.FormFactor.Plate
- Part14.formFactor = Enum.FormFactor.Plate
- SpecialMesh15.Parent = Part14
- SpecialMesh15.MeshId = "http://www.roblox.com/asset/?id=1028713"
- SpecialMesh15.TextureId = "rbxassetid://128627289"
- SpecialMesh15.MeshType = Enum.MeshType.FileMesh
- Script16.Name = "HatScript"
- Script16.Parent = Part14
- table.insert(cors,sandbox(Script16,function()
- --[[Made by SuperZ590]]--
- debounce = true
- function onTouched(hit)
- if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
- debounce = false
- h = Instance.new("Hat")
- p = Instance.new("Part")
- h.Name = "GreenTopHat"
- p.Parent = h
- p.Position = hit.Parent:findFirstChild("Head").Position
- p.Name = "Handle"
- p.formFactor = script.Parent.formFactor
- p.Size = Vector3.new(1, 1, 1)
- p.BottomSurface = 0
- p.TopSurface = 0
- p.Locked = true
- script.Parent.Mesh:clone().Parent = p
- h.Parent = hit.Parent
- h.AttachmentForward = Vector3.new(-0, -0, -1)
- h.AttachmentPos = Vector3.new(0, -0.25, 0)
- h.AttachmentRight = Vector3.new(1, 0, 0)
- h.AttachmentUp = Vector3.new(0, 1, 0)
- wait(5)
- debounce = true
- end
- end
- script.Parent.Touched:connect(onTouched)
- --[[Made by SuperZ590]]--
- end))
- Part17.Name = "Torso"
- Part17.Parent = Model3
- Part17.CFrame = CFrame.new(-6.15570879, 3.00045991, -11.4728699, 0.999999464, 0.000386848697, 0.000969587942, -0.000386940024, 1.00000119, 9.46386717e-05, -0.000969551271, -9.50139438e-05, 0.999999523)
- Part17.Orientation = Vector3.new(-0.00999999978, 0.0599999987, -0.0199999996)
- Part17.Position = Vector3.new(-6.15570879, 3.00045991, -11.4728699)
- Part17.Rotation = Vector3.new(-0.00999999978, 0.0599999987, -0.0199999996)
- Part17.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- Part17.Size = Vector3.new(2, 2, 1)
- Part17.BackParamA = -99999
- Part17.BackParamB = 99999
- Part17.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part17.BottomParamA = -99999
- Part17.BottomParamB = 99999
- Part17.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part17.BrickColor = BrickColor.new("Bright blue")
- Part17.CustomPhysicalProperties = 0.699999988, 2, 0, 1, 1
- Part17.FrontParamA = -99999
- Part17.FrontParamB = 99999
- Part17.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part17.LeftParamA = -99999
- Part17.LeftParamB = 99999
- Part17.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part17.Material = Enum.Material.SmoothPlastic
- Part17.RightParamA = -99999
- Part17.RightParamB = 99999
- Part17.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part17.TopParamA = -99999
- Part17.TopParamB = 99999
- Part17.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part17.brickColor = BrickColor.new("Bright blue")
- Part17.FormFactor = Enum.FormFactor.Symmetric
- Part17.formFactor = Enum.FormFactor.Symmetric
- Decal18.Name = "roblox"
- Decal18.Parent = Part17
- Motor6D19.Name = "Right Shoulder"
- Motor6D19.Parent = Part17
- Motor6D19.MaxVelocity = 0.10000000149012
- Motor6D19.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D19.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D19.Part0 = Part17
- Motor6D19.Part1 = Part25
- Motor6D19.part1 = Part25
- Motor6D20.Name = "Left Shoulder"
- Motor6D20.Parent = Part17
- Motor6D20.MaxVelocity = 0.10000000149012
- Motor6D20.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D20.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D20.Part0 = Part17
- Motor6D20.Part1 = Part24
- Motor6D20.part1 = Part24
- Motor6D21.Name = "Right Hip"
- Motor6D21.Parent = Part17
- Motor6D21.MaxVelocity = 0.10000000149012
- Motor6D21.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D21.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D21.Part0 = Part17
- Motor6D21.Part1 = Part27
- Motor6D21.part1 = Part27
- Motor6D22.Name = "Left Hip"
- Motor6D22.Parent = Part17
- Motor6D22.MaxVelocity = 0.10000000149012
- Motor6D22.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D22.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D22.Part0 = Part17
- Motor6D22.Part1 = Part26
- Motor6D22.part1 = Part26
- Motor6D23.Name = "Neck"
- Motor6D23.Parent = Part17
- Motor6D23.MaxVelocity = 0.10000000149012
- Motor6D23.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D23.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D23.Part0 = Part17
- Motor6D23.Part1 = Part4
- Motor6D23.part1 = Part4
- Part24.Name = "Left Arm"
- Part24.Parent = Model3
- Part24.CFrame = CFrame.new(-7.65570784, 3.00104022, -11.4714155, 0.999999464, 0.000386848697, 0.000969587942, -0.000386940024, 1.00000119, 9.46386717e-05, -0.000969551271, -9.50139438e-05, 0.999999523)
- Part24.Orientation = Vector3.new(-0.00999999978, 0.0599999987, -0.0199999996)
- Part24.Position = Vector3.new(-7.65570784, 3.00104022, -11.4714155)
- Part24.Rotation = Vector3.new(-0.00999999978, 0.0599999987, -0.0199999996)
- Part24.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Part24.Size = Vector3.new(1, 2, 1)
- Part24.BackParamA = -99999
- Part24.BackParamB = 99999
- Part24.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part24.BottomParamA = -99999
- Part24.BottomParamB = 99999
- Part24.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part24.BrickColor = BrickColor.new("Bright yellow")
- Part24.CustomPhysicalProperties = 0.699999988, 2, 0, 1, 1
- Part24.FrontParamA = -99999
- Part24.FrontParamB = 99999
- Part24.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part24.LeftParamA = -99999
- Part24.LeftParamB = 99999
- Part24.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part24.Material = Enum.Material.SmoothPlastic
- Part24.RightParamA = -99999
- Part24.RightParamB = 99999
- Part24.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part24.TopParamA = -99999
- Part24.TopParamB = 99999
- Part24.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part24.brickColor = BrickColor.new("Bright yellow")
- Part24.FormFactor = Enum.FormFactor.Symmetric
- Part24.formFactor = Enum.FormFactor.Symmetric
- Part25.Name = "Right Arm"
- Part25.Parent = Model3
- Part25.CFrame = CFrame.new(-4.65570974, 2.9998796, -11.4743242, 0.999999464, 0.000386848697, 0.000969587942, -0.000386940024, 1.00000119, 9.46386717e-05, -0.000969551271, -9.50139438e-05, 0.999999523)
- Part25.Orientation = Vector3.new(-0.00999999978, 0.0599999987, -0.0199999996)
- Part25.Position = Vector3.new(-4.65570974, 2.9998796, -11.4743242)
- Part25.Rotation = Vector3.new(-0.00999999978, 0.0599999987, -0.0199999996)
- Part25.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Part25.Size = Vector3.new(1, 2, 1)
- Part25.BackParamA = -99999
- Part25.BackParamB = 99999
- Part25.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part25.BottomParamA = -99999
- Part25.BottomParamB = 99999
- Part25.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part25.BrickColor = BrickColor.new("Bright yellow")
- Part25.CustomPhysicalProperties = 0.699999988, 2, 0, 1, 1
- Part25.FrontParamA = -99999
- Part25.FrontParamB = 99999
- Part25.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part25.LeftParamA = -99999
- Part25.LeftParamB = 99999
- Part25.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part25.Material = Enum.Material.SmoothPlastic
- Part25.RightParamA = -99999
- Part25.RightParamB = 99999
- Part25.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part25.TopParamA = -99999
- Part25.TopParamB = 99999
- Part25.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part25.brickColor = BrickColor.new("Bright yellow")
- Part25.FormFactor = Enum.FormFactor.Symmetric
- Part25.formFactor = Enum.FormFactor.Symmetric
- Part26.Name = "Left Leg"
- Part26.Parent = Model3
- Part26.CFrame = CFrame.new(-6.65648222, 1.000651, -11.4721947, 0.999999464, 0.000386848697, 0.000969587942, -0.000386940024, 1.00000119, 9.46386717e-05, -0.000969551271, -9.50139438e-05, 0.999999523)
- Part26.Orientation = Vector3.new(-0.00999999978, 0.0599999987, -0.0199999996)
- Part26.Position = Vector3.new(-6.65648222, 1.000651, -11.4721947)
- Part26.Rotation = Vector3.new(-0.00999999978, 0.0599999987, -0.0199999996)
- Part26.Color = Color3.new(0.643137, 0.741176, 0.278431)
- Part26.Size = Vector3.new(1, 2, 1)
- Part26.BackParamA = -99999
- Part26.BackParamB = 99999
- Part26.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part26.BottomParamA = -99999
- Part26.BottomParamB = 99999
- Part26.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part26.BrickColor = BrickColor.new("Br. yellowish green")
- Part26.CustomPhysicalProperties = 0.699999988, 2, 0, 1, 1
- Part26.FrontParamA = -99999
- Part26.FrontParamB = 99999
- Part26.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part26.LeftParamA = -99999
- Part26.LeftParamB = 99999
- Part26.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part26.Material = Enum.Material.SmoothPlastic
- Part26.RightParamA = -99999
- Part26.RightParamB = 99999
- Part26.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part26.TopParamA = -99999
- Part26.TopParamB = 99999
- Part26.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part26.brickColor = BrickColor.new("Br. yellowish green")
- Part26.FormFactor = Enum.FormFactor.Symmetric
- Part26.formFactor = Enum.FormFactor.Symmetric
- Part27.Name = "Right Leg"
- Part27.Parent = Model3
- Part27.CFrame = CFrame.new(-5.6564827, 1.00026417, -11.4731646, 0.999999464, 0.000386848697, 0.000969587942, -0.000386940024, 1.00000119, 9.46386717e-05, -0.000969551271, -9.50139438e-05, 0.999999523)
- Part27.Orientation = Vector3.new(-0.00999999978, 0.0599999987, -0.0199999996)
- Part27.Position = Vector3.new(-5.6564827, 1.00026417, -11.4731646)
- Part27.Rotation = Vector3.new(-0.00999999978, 0.0599999987, -0.0199999996)
- Part27.Color = Color3.new(0.643137, 0.741176, 0.278431)
- Part27.Size = Vector3.new(1, 2, 1)
- Part27.BackParamA = -99999
- Part27.BackParamB = 99999
- Part27.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part27.BottomParamA = -99999
- Part27.BottomParamB = 99999
- Part27.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part27.BrickColor = BrickColor.new("Br. yellowish green")
- Part27.CustomPhysicalProperties = 0.699999988, 2, 0, 1, 1
- Part27.FrontParamA = -99999
- Part27.FrontParamB = 99999
- Part27.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part27.LeftParamA = -99999
- Part27.LeftParamB = 99999
- Part27.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part27.Material = Enum.Material.SmoothPlastic
- Part27.RightParamA = -99999
- Part27.RightParamB = 99999
- Part27.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part27.TopParamA = -99999
- Part27.TopParamB = 99999
- Part27.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part27.brickColor = BrickColor.new("Br. yellowish green")
- Part27.FormFactor = Enum.FormFactor.Symmetric
- Part27.formFactor = Enum.FormFactor.Symmetric
- Humanoid28.Parent = Model3
- Humanoid28.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
- Humanoid28.Health = 899999989760
- Humanoid28.HealthDisplayDistance = 0
- Humanoid28.JumpPower = 60
- Humanoid28.LeftLeg = Part26
- Humanoid28.MaxHealth = 899999989760
- Humanoid28.MaxSlopeAngle = 89.900001525879
- Humanoid28.NameDisplayDistance = 0
- Humanoid28.NameOcclusion = Enum.NameOcclusion.EnemyOcclusion
- Humanoid28.RightLeg = Part27
- Humanoid28.Torso = Part31
- Humanoid28.WalkSpeed = 25
- Humanoid28.maxHealth = 899999989760
- Model29.Name = "Status"
- Model29.Parent = Humanoid28
- Model30.Name = "AvalibleSpawns"
- Model30.Parent = Model29
- Part31.Name = "HumanoidRootPart"
- Part31.Parent = Model3
- Part31.CFrame = CFrame.new(-6.15570879, 3.00045991, -11.4728699, 0.999999464, 0.000386848697, 0.000969587942, -0.000386940024, 1.00000119, 9.46386717e-05, -0.000969551271, -9.50139438e-05, 0.999999523)
- Part31.Orientation = Vector3.new(-0.00999999978, 0.0599999987, -0.0199999996)
- Part31.Position = Vector3.new(-6.15570879, 3.00045991, -11.4728699)
- Part31.Rotation = Vector3.new(-0.00999999978, 0.0599999987, -0.0199999996)
- Part31.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- Part31.Transparency = 1
- Part31.Size = Vector3.new(2, 2, 1)
- Part31.BackParamA = -99999
- Part31.BackParamB = 99999
- Part31.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part31.BottomParamA = -99999
- Part31.BottomParamB = 99999
- Part31.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part31.BrickColor = BrickColor.new("Bright blue")
- Part31.CanCollide = false
- Part31.CustomPhysicalProperties = 0.699999988, 2, 0, 1, 1
- Part31.FrontParamA = -99999
- Part31.FrontParamB = 99999
- Part31.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part31.LeftParamA = -99999
- Part31.LeftParamB = 99999
- Part31.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part31.Material = Enum.Material.SmoothPlastic
- Part31.RightParamA = -99999
- Part31.RightParamB = 99999
- Part31.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part31.TopParamA = -99999
- Part31.TopParamB = 99999
- Part31.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part31.brickColor = BrickColor.new("Bright blue")
- Part31.FormFactor = Enum.FormFactor.Symmetric
- Part31.formFactor = Enum.FormFactor.Symmetric
- Motor6D32.Name = "RootJoint"
- Motor6D32.Parent = Part31
- Motor6D32.MaxVelocity = 0.10000000149012
- Motor6D32.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D32.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D32.Part0 = Part31
- Motor6D32.Part1 = Part17
- Motor6D32.part1 = Part17
- Script33.Name = "AttackingScript"
- Script33.Parent = Model3
- table.insert(cors,sandbox(Script33,function()
- --//====================================================\\--
- --|| GUNJOURER BY SHACKLUSTER
- --\\====================================================//--
- wait(0.2)
- --Player = game:GetService("Players").LocalPlayer
- --PlayerGui = Player.PlayerGui
- Cam = workspace.CurrentCamera
- --Backpack = Player.Backpack
- Character = script.Parent
- Humanoid = Character.Humanoid
- Mouse = nil -- Player:GetMouse()
- RootPart = Character["HumanoidRootPart"]
- Torso = Character["Torso"]
- Head = Character["Head"]
- RightArm = Character["Right Arm"]
- LeftArm = Character["Left Arm"]
- RightLeg = Character["Right Leg"]
- LeftLeg = Character["Left Leg"]
- RootJoint = RootPart["RootJoint"]
- Neck = Torso["Neck"]
- RightShoulder = Torso["Right Shoulder"]
- LeftShoulder = Torso["Left Shoulder"]
- RightHip = Torso["Right Hip"]
- LeftHip = Torso["Left Hip"]
- IT = Instance.new
- CF = CFrame.new
- VT = Vector3.new
- RAD = math.rad
- C3 = Color3.new
- UD2 = UDim2.new
- BRICKC = BrickColor.new
- ANGLES = CFrame.Angles
- EULER = CFrame.fromEulerAnglesXYZ
- COS = math.cos
- ACOS = math.acos
- SIN = math.sin
- ASIN = math.asin
- ABS = math.abs
- MRANDOM = math.random
- FLOOR = math.floor
- --//=================================\\
- --|| USEFUL VALUES
- --\\=================================//
- Animation_Speed = 3
- Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
- local Speed = 35
- local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
- local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
- local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
- local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
- local DAMAGEMULTIPLIER = 1
- local ANIM = "Idle"
- local ATTACK = false
- local EQUIPPED = false
- local HOLD = false
- local COMBO = 1
- local Rooted = false
- local SINE = 0
- local KEYHOLD = false
- local CHANGE = 2 / Animation_Speed
- local WALKINGANIM = false
- local VALUE1 = false
- local VALUE2 = false
- local ROBLOXIDLEANIMATION = IT("Animation")
- ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
- ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
- --ROBLOXIDLEANIMATION.Parent = Humanoid
- --local WEAPONGUI = IT("ScreenGui", PlayerGui)
- --WEAPONGUI.Name = "GUNJOURER_GUI_SHACKLUSTER"
- local Effects = IT("Folder", Character)
- Effects.Name = "Effects"
- local ANIMATOR = Humanoid.Animator
- local ANIMATE = Character.Animate
- local UNANCHOR = true
- local TRIPWIRE = false
- --//=================================\\
- --\\=================================//
- --//=================================\\
- --|| SAZERENOS' ARTIFICIAL HEARTBEAT
- --\\=================================//
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "ArtificialHB"
- script:WaitForChild("ArtificialHB")
- frame = Frame_Speed
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.ArtificialHB:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- ArtificialHB:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- ArtificialHB:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- --//=================================\\
- --\\=================================//
- --//=================================\\
- --|| SOME FUNCTIONS
- --\\=================================//
- function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
- return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
- end
- function PositiveAngle(NUMBER)
- if NUMBER >= 0 then
- NUMBER = 0
- end
- return NUMBER
- end
- function NegativeAngle(NUMBER)
- if NUMBER <= 0 then
- NUMBER = 0
- end
- return NUMBER
- end
- function Swait(NUMBER)
- if NUMBER == 0 or NUMBER == nil then
- ArtificialHB.Event:wait()
- else
- for i = 1, NUMBER do
- ArtificialHB.Event:wait()
- end
- end
- end
- function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
- local NEWMESH = IT(MESH)
- if MESH == "SpecialMesh" then
- NEWMESH.MeshType = MESHTYPE
- if MESHID ~= "nil" and MESHID ~= "" then
- NEWMESH.MeshId = ""..MESHID
- end
- if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
- NEWMESH.TextureId = ""..TEXTUREID
- end
- end
- NEWMESH.Offset = OFFSET or VT(0, 0, 0)
- NEWMESH.Scale = SCALE
- NEWMESH.Parent = PARENT
- return NEWMESH
- end
- function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
- local NEWPART = IT("Part")
- NEWPART.formFactor = FORMFACTOR
- NEWPART.Reflectance = REFLECTANCE
- NEWPART.Transparency = TRANSPARENCY
- NEWPART.CanCollide = false
- NEWPART.Locked = true
- NEWPART.Anchored = true
- if ANCHOR == false then
- NEWPART.Anchored = false
- end
- NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
- NEWPART.Name = NAME
- NEWPART.Size = SIZE
- NEWPART.Position = Torso.Position
- NEWPART.Material = MATERIAL
- NEWPART:BreakJoints()
- NEWPART.Parent = PARENT
- return NEWPART
- end
- local function weldBetween(a, b)
- local weldd = Instance.new("ManualWeld")
- weldd.Part0 = a
- weldd.Part1 = b
- weldd.C0 = CFrame.new()
- weldd.C1 = b.CFrame:inverse() * a.CFrame
- weldd.Parent = a
- return weldd
- end
- function QuaternionFromCFrame(cf)
- local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
- local trace = m00 + m11 + m22
- if trace > 0 then
- local s = math.sqrt(1 + trace)
- local recip = 0.5 / s
- return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
- else
- local i = 0
- if m11 > m00 then
- i = 1
- end
- if m22 > (i == 0 and m00 or m11) then
- i = 2
- end
- if i == 0 then
- local s = math.sqrt(m00 - m11 - m22 + 1)
- local recip = 0.5 / s
- return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
- elseif i == 1 then
- local s = math.sqrt(m11 - m22 - m00 + 1)
- local recip = 0.5 / s
- return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
- elseif i == 2 then
- local s = math.sqrt(m22 - m00 - m11 + 1)
- local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
- end
- end
- end
- function QuaternionToCFrame(px, py, pz, x, y, z, w)
- local xs, ys, zs = x + x, y + y, z + z
- local wx, wy, wz = w * xs, w * ys, w * zs
- local xx = x * xs
- local xy = x * ys
- local xz = x * zs
- local yy = y * ys
- local yz = y * zs
- local zz = z * zs
- return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
- end
- function QuaternionSlerp(a, b, t)
- local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
- local startInterp, finishInterp;
- if cosTheta >= 0.0001 then
- if (1 - cosTheta) > 0.0001 then
- local theta = ACOS(cosTheta)
- local invSinTheta = 1 / SIN(theta)
- startInterp = SIN((1 - t) * theta) * invSinTheta
- finishInterp = SIN(t * theta) * invSinTheta
- else
- startInterp = 1 - t
- finishInterp = t
- end
- else
- if (1 + cosTheta) > 0.0001 then
- local theta = ACOS(-cosTheta)
- local invSinTheta = 1 / SIN(theta)
- startInterp = SIN((t - 1) * theta) * invSinTheta
- finishInterp = SIN(t * theta) * invSinTheta
- else
- startInterp = t - 1
- finishInterp = t
- end
- end
- return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
- end
- function Clerp(a, b, t)
- local qa = {QuaternionFromCFrame(a)}
- local qb = {QuaternionFromCFrame(b)}
- local ax, ay, az = a.x, a.y, a.z
- local bx, by, bz = b.x, b.y, b.z
- local _t = 1 - t
- return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
- end
- function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
- local frame = IT("Frame")
- frame.BackgroundTransparency = TRANSPARENCY
- frame.BorderSizePixel = BORDERSIZEPIXEL
- frame.Position = POSITION
- frame.Size = SIZE
- frame.BackgroundColor3 = COLOR
- frame.BorderColor3 = BORDERCOLOR
- frame.Name = NAME
- frame.Parent = PARENT
- return frame
- end
- function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
- local label = IT("TextLabel")
- label.BackgroundTransparency = 1
- label.Size = UD2(1, 0, 1, 0)
- label.Position = UD2(0, 0, 0, 0)
- label.TextColor3 = TEXTCOLOR
- label.TextStrokeTransparency = STROKETRANSPARENCY
- label.TextTransparency = TRANSPARENCY
- label.FontSize = TEXTFONTSIZE
- label.Font = TEXTFONT
- label.BorderSizePixel = BORDERSIZEPIXEL
- label.TextScaled = false
- label.Text = TEXT
- label.Name = NAME
- label.Parent = PARENT
- return label
- end
- function NoOutlines(PART)
- PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
- end
- function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
- local NEWWELD = IT(TYPE)
- NEWWELD.Part0 = PART0
- NEWWELD.Part1 = PART1
- NEWWELD.C0 = C0
- NEWWELD.C1 = C1
- NEWWELD.Parent = PARENT
- return NEWWELD
- end
- local S = IT("Sound")
- function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
- local NEWSOUND = nil
- coroutine.resume(coroutine.create(function()
- NEWSOUND = S:Clone()
- NEWSOUND.Parent = PARENT
- NEWSOUND.Volume = VOLUME
- NEWSOUND.Pitch = PITCH
- NEWSOUND.SoundId = "rbxassetid://"..ID
- NEWSOUND:play()
- if DOESLOOP == true then
- NEWSOUND.Looped = true
- else
- repeat wait(1) until NEWSOUND.Playing == false
- NEWSOUND:remove()
- end
- end))
- return NEWSOUND
- end
- function CFrameFromTopBack(at, top, back)
- local right = top:Cross(back)
- return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
- end
- --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
- function WACKYEFFECT(Table)
- local TYPE = (Table.EffectType or "Sphere")
- local SIZE = (Table.Size or VT(1,1,1))
- local ENDSIZE = (Table.Size2 or VT(0,0,0))
- local TRANSPARENCY = (Table.Transparency or 0)
- local ENDTRANSPARENCY = (Table.Transparency2 or 1)
- local CFRAME = (Table.CFrame or Torso.CFrame)
- local MOVEDIRECTION = (Table.MoveToPos or nil)
- local ROTATION1 = (Table.RotationX or 0)
- local ROTATION2 = (Table.RotationY or 0)
- local ROTATION3 = (Table.RotationZ or 0)
- local MATERIAL = (Table.Material or "Neon")
- local COLOR = (Table.Color or C3(1,1,1))
- local TIME = (Table.Time or 45)
- local SOUNDID = (Table.SoundID or nil)
- local SOUNDPITCH = (Table.SoundPitch or nil)
- local SOUNDVOLUME = (Table.SoundVolume or nil)
- local USEBOOMERANGMATH = (Table.UseBoomerangMath or false)
- local BOOMERANG = (Table.Boomerang or 0)
- local SIZEBOOMERANG = (Table.SizeBoomerang or 0)
- coroutine.resume(coroutine.create(function()
- local PLAYSSOUND = false
- local SOUND = nil
- local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
- if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
- PLAYSSOUND = true
- SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
- end
- EFFECT.Color = COLOR
- local MSH = nil
- if TYPE == "Sphere" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
- elseif TYPE == "Block" or TYPE == "Box" then
- MSH = IT("BlockMesh",EFFECT)
- MSH.Scale = SIZE
- elseif TYPE == "Wave" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
- elseif TYPE == "Ring" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
- elseif TYPE == "Slash" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
- elseif TYPE == "Round Slash" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
- elseif TYPE == "Swirl" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "168892432", "", SIZE, VT(0,0,0))
- elseif TYPE == "Skull" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
- elseif TYPE == "Crystal" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
- end
- if MSH ~= nil then
- local BOOMR1 = 1+BOOMERANG/50
- local BOOMR2 = 1+SIZEBOOMERANG/50
- local MOVESPEED = nil
- if MOVEDIRECTION ~= nil then
- if USEBOOMERANGMATH == true then
- MOVESPEED = ((CFRAME.p - MOVEDIRECTION).Magnitude/TIME)*BOOMR1
- else
- MOVESPEED = ((CFRAME.p - MOVEDIRECTION).Magnitude/TIME)
- end
- end
- local GROWTH = nil
- if USEBOOMERANGMATH == true then
- GROWTH = (SIZE - ENDSIZE)*(BOOMR2+1)
- else
- GROWTH = (SIZE - ENDSIZE)
- end
- local TRANS = TRANSPARENCY - ENDTRANSPARENCY
- if TYPE == "Block" then
- EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
- else
- EFFECT.CFrame = CFRAME
- end
- if USEBOOMERANGMATH == true then
- for LOOP = 1, TIME+1 do
- Swait()
- MSH.Scale = MSH.Scale - (VT((GROWTH.X)*((1 - (LOOP/TIME)*BOOMR2)),(GROWTH.Y)*((1 - (LOOP/TIME)*BOOMR2)),(GROWTH.Z)*((1 - (LOOP/TIME)*BOOMR2)))*BOOMR2)/TIME
- if TYPE == "Wave" then
- MSH.Offset = VT(0,0,-MSH.Scale.Z/8)
- end
- EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
- if TYPE == "Block" then
- EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
- else
- EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
- end
- if MOVEDIRECTION ~= nil then
- local ORI = EFFECT.Orientation
- EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-(MOVESPEED)*((1 - (LOOP/TIME)*BOOMR1)))
- EFFECT.CFrame = CF(EFFECT.Position)*ANGLES(RAD(ORI.X),RAD(ORI.Y),RAD(ORI.Z))
- end
- end
- else
- for LOOP = 1, TIME+1 do
- Swait()
- MSH.Scale = MSH.Scale - GROWTH/TIME
- if TYPE == "Wave" then
- MSH.Offset = VT(0,0,-MSH.Scale.Z/8)
- end
- EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
- if TYPE == "Block" then
- EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
- else
- EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
- end
- if MOVEDIRECTION ~= nil then
- local ORI = EFFECT.Orientation
- EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
- EFFECT.CFrame = CF(EFFECT.Position)*ANGLES(RAD(ORI.X),RAD(ORI.Y),RAD(ORI.Z))
- end
- end
- end
- EFFECT.Transparency = 1
- if PLAYSSOUND == false then
- EFFECT:remove()
- else
- repeat Swait() until EFFECT:FindFirstChildOfClass("Sound") == nil
- EFFECT:remove()
- end
- else
- if PLAYSSOUND == false then
- EFFECT:remove()
- else
- repeat Swait() until EFFECT:FindFirstChildOfClass("Sound") == nil
- EFFECT:remove()
- end
- end
- end))
- end
- function MakeForm(PART,TYPE)
- if TYPE == "Cyl" then
- local MSH = IT("CylinderMesh",PART)
- elseif TYPE == "Ball" then
- local MSH = IT("SpecialMesh",PART)
- MSH.MeshType = "Sphere"
- elseif TYPE == "Wedge" then
- local MSH = IT("SpecialMesh",PART)
- MSH.MeshType = "Wedge"
- end
- end
- Debris = game:GetService("Debris")
- function CastProperRay(StartPos, EndPos, Distance, Ignore)
- local DIRECTION = CF(StartPos,EndPos).lookVector
- return Raycast(StartPos, DIRECTION, Distance, Ignore)
- end
- function OhnoItsAShotgun()
- local SHOOTgun = CreatePart(3, Effects, "Fabric", 0, 1, BRICKC("Black"), "OhNoItsAShotgun", VT(0.25, 0.5, 5), true)
- CreateMesh("SpecialMesh", SHOOTgun, "FileMesh", "3835506", "72012859", VT(0.9, 1.13, 1), VT(0,-0.3,0))
- return SHOOTgun
- end
- function CamShake(SHAKE,TIMER)
- coroutine.resume(coroutine.create(function()
- local FADER = SHAKE/TIMER
- for i = 1, TIMER do
- wait()
- Humanoid.CameraOffset = VT(MRANDOM(-(SHAKE-(FADER*i)),(SHAKE-(FADER*i)))/10,MRANDOM(-(SHAKE-(FADER*i)),(SHAKE-(FADER*i)))/10,MRANDOM(-(SHAKE-(FADER*i)),(SHAKE-(FADER*i)))/10)
- end
- Humanoid.CameraOffset = VT(0,0,0)
- end))
- end
- --//=================================\\
- --|| GUIS AND MISC
- --\\=================================//
- --[[
- local SKILLTEXTCOLOR = C3(1,1,1)
- local SKILLFONT = "SciFi"
- local SKILLTEXTSIZE = 4]]--
- --local ATTACKS = {"Conjour - C","Aerial Bombardament - V","Point Blank - B","Tripwire - F","Mend - M"}
- --[[for i = 1, #ATTACKS do
- local SKILLFRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.74, 0, 0.97-(0.04*i), 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill Frame")
- local SKILLTEXT = CreateLabel(SKILLFRAME, "["..ATTACKS[i].."]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Skill text")
- SKILLTEXT.TextXAlignment = "Right"
- SKILLTEXT.Rotation = i*3
- end]]--
- local BMUSIC = IT("Sound",RootPart)
- local VOLUME = 99
- local PITCH = 1
- local SONGID = 390409627
- --[[local HEALTHBAR = CreateFrame(WEAPONGUI, 0.5, 1, UD2(1-0.20, 0, 0.75, 0), UD2(0.20, 0, 0.02, 0), C3(0,0,0), C3(0, 0, 0),"Health Bar")
- local HEALTHCOVER = CreateFrame(HEALTHBAR, 0, 0, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), BRICKC"Shamrock".Color, C3(0, 0, 0),"Health Cover")
- local HEALTHTEXT = CreateLabel(HEALTHBAR, Humanoid.Health.."/"..Humanoid.MaxHealth, SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "HP")
- Character.Health:remove()
- HEALTHBAR.Rotation = (#ATTACKS*3)+3
- local WHOAMI = CreateFrame(WEAPONGUI, 1, 1, UD2(1-0.26, 0, 0.69, 0), UD2(0.26, 0, 0.02, 0), C3(0,0,0), C3(0, 0, 0),"Ban")
- WHOAMI.Rotation = (#ATTACKS*3)+3
- CreateLabel(WHOAMI, "Gunjourer", SKILLTEXTCOLOR, SKILLTEXTSIZE+4, SKILLFONT, 0, 2, 0, "Yes")]]--
- Humanoid.Died:Connect(function()
- RootPart:remove()
- --CreateSound(160718677, Head, 4, 1, false)
- --BMUSIC:remove()
- Effects:remove()
- --WEAPONGUI:remove()
- end)
- local GRUNTS = {1146556975,1146556706,1278006076}
- function showhealth()
- local showhp = coroutine.wrap(function()
- for i,v in pairs(game.Players:GetChildren()) do
- if v.PlayerGui:FindFirstChild("hpbarboss")~= nil then
- v.PlayerGui:FindFirstChild("hpbarboss"):destroy()
- end
- local naeeym2 = Instance.new("ScreenGui",v.PlayerGui)
- naeeym2.Name = "hpbarboss"
- local bar = Instance.new("Frame",naeeym2)
- bar.Position = UDim2.new(0,0,0.9,0)
- bar.Size = UDim2.new(1,0,0.1,0)
- bar.BackgroundColor3 = Color3.new(0.01,0.01,0.01)
- bar.BorderColor3 = Color3.new(0,0,0)
- bar.BorderSizePixel = 3
- bar.BackgroundTransparency = 0.5
- local curhp = Instance.new("Frame",bar)
- curhp.Size = UDim2.new(Humanoid.Health/Humanoid.MaxHealth,0,1,0)
- curhp.BackgroundColor3 = Color3.new(0.75,0,0)
- curhp.BorderSizePixel = 0
- curhp.BackgroundTransparency = 0.25
- local shd = Instance.new("Frame",curhp)
- shd.Position = UDim2.new(0,0,0.5,0)
- shd.Size = UDim2.new(1,0,0.5,0)
- shd.BackgroundColor3 = Color3.new(0,0,0)
- shd.BorderSizePixel = 0
- shd.BackgroundTransparency = 0.75
- local tecks2 = Instance.new("TextLabel",naeeym2)
- tecks2.BackgroundTransparency = 1
- tecks2.Font = "SciFi"
- tecks2.TextScaled = true
- tecks2.TextStrokeTransparency = 0
- tecks2.TextColor3 = Color3.new(1,1,1)
- tecks2.TextStrokeColor3 = Color3.new(0,0,0)
- tecks2.Position = UDim2.new(0,0,0.9,0)
- tecks2.Size = UDim2.new(1,0,0.1,0)
- tecks2.Text = math.floor(Humanoid.Health).. " | " ..math.floor(Humanoid.MaxHealth)
- local txt = Instance.new("TextLabel",naeeym2)
- txt.BackgroundTransparency = 1
- txt.Font = "SciFi"
- txt.TextSize = 60
- txt.TextScaled = true
- txt.TextStrokeTransparency = 0.75
- txt.TextColor3 = Color3.new(0,0,0)
- txt.TextStrokeColor3 = Color3.new(1,1,1)
- txt.Position = UDim2.new(0,0,0.9,0)
- txt.Size = UDim2.new(1,0,0.1,0)
- txt.Text = string.upper(script.Parent.Name)
- txt.TextXAlignment = "Left"
- wait(2)
- naeeym2:Destroy()
- end
- end)
- showhp()
- end
- --//=================================\\
- --|| DAMAGING
- --\\=================================//
- function ApplyDamage(Humanoid,Damage)
- Damage = Damage * DAMAGEMULTIPLIER
- if Humanoid.Health < 2000 then
- if Humanoid.Health - Damage > 0 then
- Humanoid.Health = Humanoid.Health - Damage
- else
- Humanoid.Parent:BreakJoints()
- end
- else
- Humanoid.Parent:BreakJoints()
- end
- end
- function PAW_HAHA(LOC,AIMTO,OUCH)
- WACKYEFFECT({Time = 25, EffectType = "Block", Size = VT(0,0,0), Size2 = VT(1.4,1.4,1.4), Transparency = 0, Transparency2 = 1, CFrame = CF(LOC), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"New Yeller".Color, SoundID = 138083993, SoundPitch = MRANDOM(8,12)/13, SoundVolume = 2})
- for i = 1, 4 do
- local POS1 = CF(LOC,AIMTO)*CF(0,0,-45).p
- local AIMPOS = CF(LOC,POS1) * CF(0,0,-45) * ANGLES(RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360)))*CF(0,0,MRANDOM(5,75)/10).p
- local HIT,POS = CastProperRay(LOC,AIMPOS,1000,Character)
- local DISTANCE = (POS - LOC).Magnitude
- if HIT then
- local HUM = nil
- if HIT.Parent:FindFirstChildOfClass("Humanoid") then
- HUM = HIT.Parent:FindFirstChildOfClass("Humanoid")
- elseif HIT.Parent.Parent:FindFirstChildOfClass("Humanoid") then
- HUM = HIT.Parent.Parent:FindFirstChildOfClass("Humanoid")
- end
- if HUM then
- ApplyDamage(HUM,OUCH+MRANDOM(-3,3))
- end
- end
- WACKYEFFECT({Time = 20, EffectType = "Block", Size = VT(0,0,0), Size2 = VT(1,1,1), Transparency = 0, Transparency2 = 1, CFrame = CF(POS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"New Yeller".Color, SoundID = nil, SoundPitch = 1, SoundVolume = 4})
- WACKYEFFECT({Time = 20, EffectType = "Box", Size = VT(0,0,DISTANCE), Size2 = VT(0.7,0.7,DISTANCE), Transparency = 0.6, Transparency2 = 1, CFrame = CF(LOC,POS)*CF(0,0,-DISTANCE/2), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"New Yeller".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
- end
- end
- --//=================================\\
- --|| ATTACK FUNCTIONS AND STUFF
- --\\=================================//
- function Conjour()
- local SHOOT = OhnoItsAShotgun()
- local CFRAME = CF(RootPart.Position) * ANGLES(RAD(0), RAD(MRANDOM(0,360)), RAD(0))*CF(0,MRANDOM(15,25)/3,MRANDOM(15,25)/3)
- local ORI = 90
- SHOOT.CFrame = CF(CFRAME.p,Mouse.Hit.p) * ANGLES(RAD(0), RAD(ORI), RAD(0))
- local GOODRIDDANCE = false
- CreateSound(233856115, SHOOT, 2, (MRANDOM(8,12)/10)+0.3, false)
- coroutine.resume(coroutine.create(function()
- repeat
- SHOOT.CFrame = Clerp(SHOOT.CFrame,CF(CFRAME.p,Mouse.Hit.p) * ANGLES(RAD(ORI), RAD(0), RAD(0)),0.25)
- Swait()
- until GOODRIDDANCE == true
- SHOOT.CFrame = SHOOT.CFrame * ANGLES(RAD(45), RAD(0), RAD(0))
- SHOOT.CanCollide = true
- SHOOT.Anchored = false
- SHOOT.Parent = workspace
- local bv = Instance.new("BodyVelocity",SHOOT)
- bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
- bv.velocity = CF(SHOOT.Position,SHOOT.CFrame*CF(0,2.5,2).p).lookVector*45
- Debris:AddItem(bv,0.1)
- wait(5)
- for i = 1, 45 do
- Swait()
- SHOOT.Transparency = SHOOT.Transparency + 1/45
- end
- SHOOT:remove()
- end))
- for i = 1, 15 do
- Swait()
- SHOOT.Transparency = SHOOT.Transparency - 1/15
- ORI = ORI - 3
- end
- for i = 1, 15 do
- Swait()
- ORI = ORI - 3
- end
- wait(MRANDOM(2,8)/10)
- PAW_HAHA(SHOOT.CFrame*CF(0,0,-SHOOT.Size.Z/2).p,Mouse.Hit.p,14)
- CamShake(4,4)
- GOODRIDDANCE = true
- end
- function Aerial_Bombardament()
- local HITFLOOR,HITPOS = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
- if HITFLOOR then
- ATTACK = true
- Rooted = true
- local bv = Instance.new("BodyVelocity")
- bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
- bv.velocity = CF(RootPart.Position,RootPart.CFrame*CF(0,1.5,-2).p).lookVector*175
- bv.Parent = RootPart
- local GYRO = IT("BodyGyro",RootPart)
- GYRO.D = 2
- GYRO.P = 20000
- GYRO.MaxTorque = VT(0,4000000,0)
- GYRO.CFrame = CF(RootPart.Position,RootPart.CFrame*CF(0,0,-5).p)
- CreateSound(145486992,Torso,10,0.85,false)
- for i=0, 0.05, 0.1 / Animation_Speed do
- Swait()
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(65), RAD(0), RAD(-10)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-35), RAD(0), RAD(10)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(50), RAD(-20), RAD(25)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(15), RAD(20), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- if ANIM == "Fall" or ANIM == "Jump" then
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.4, -0.6) * ANGLES(RAD(1), RAD(90), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
- else
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(-5), RAD(80), RAD(0)) * ANGLES(RAD(-4), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- end
- bv:Remove()
- local E = 360/15
- for i = 1, 15 do
- Swait()
- WACKYEFFECT({Time = 10, EffectType = "Wave", Size = VT(8,1,8), Size2 = VT(2,15,2), Transparency = 0.9, Transparency2 = 1, CFrame = CF(RootPart.Position,HITPOS) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(i*E), RAD(0), RAD(0)), 2 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(5), RAD(15), RAD(90)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(-5), RAD(-90)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.4, -0.6) * ANGLES(RAD(-35), RAD(90), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- WACKYEFFECT({EffectType = "Sphere", Size = VT(5,5,5), Size2 = VT(20,20,20), Transparency = 0.5, Transparency2 = 1, CFrame = CF(Torso.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(17/255,17/255,17/255), SoundID = nil, SoundPitch = nil, SoundVolume = nil, UseBoomerangMath = false, Boomerang = 0, SizeBoomerang = 0})
- for i = 1, 15 do
- coroutine.resume(coroutine.create(function()
- Conjour()
- end))
- end
- local LANDED = nil
- local POS = nil
- coroutine.resume(coroutine.create(function()
- repeat
- Swait()
- RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(-15), RAD(0), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-35 - 4 * COS(SINE / 6)), RAD(0), RAD(45 + 10 * COS(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-35 - 4 * COS(SINE / 6)), RAD(0), RAD(-45 - 10 * COS(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -0.7) * ANGLES(RAD(-25 + 5 * SIN(SINE / 12)), RAD(90), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.8, -0.3) * ANGLES(RAD(-10), RAD(-80), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
- until LANDED ~= nil
- end))
- repeat
- Swait()
- local HITFLOOR,HITPOS = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4.2, Character)
- if HITFLOOR then
- LANDED = HITFLOOR
- POS = HITPOS
- end
- until LANDED ~= nil
- GYRO:remove()
- CamShake(6,3)
- CreateSound(765590102, Torso, 2, (MRANDOM(8,12)/10)+0.3, false)
- ATTACK = false
- Rooted = false
- end
- end
- function Point_Blank()
- ATTACK = true
- Rooted = true
- local HIT = nil
- local HUMAN = nil
- local ROOT = nil
- CreateSound(145486992,Torso,10,0.85,false)
- for i=0, 0.5, 0.1 / Animation_Speed do
- Swait()
- if HIT ~= nil then
- break
- end
- for index, CHILD in pairs(workspace:GetDescendants()) do
- if CHILD.ClassName == "Model" and CHILD ~= Character then
- local HUM = CHILD:FindFirstChildOfClass("Humanoid")
- if HUM then
- local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
- if TORSO and HUM.Health > 0 then
- if (TORSO.Position - RootPart.CFrame*CF(0,0,-2).p).Magnitude <= 2 then
- ROOT = TORSO
- HUMAN = HUM
- HIT = CHILD
- end
- end
- end
- end
- end
- RootPart.CFrame = Clerp(RootPart.CFrame, RootPart.CFrame, 0.07) * CF(0,0,-1)
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.75) * ANGLES(RAD(45), RAD(0), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-45), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.5) * ANGLES(RAD(135), RAD(0), RAD(12)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(-10), RAD(80), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(-5), RAD(-80), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- if HIT then
- local bv = Instance.new("BodyVelocity")
- bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
- bv.velocity = CF(RootPart.Position,RootPart.CFrame*CF(0,1.5,2).p).lookVector*75
- bv.Parent = RootPart
- Debris:AddItem(bv,0.1)
- coroutine.resume(coroutine.create(function()
- local GUNS = {}
- for i = 1, 4 do
- local SHOOT = OhnoItsAShotgun()
- local CFRAME = CF(ROOT.Position) * ANGLES(RAD(0), RAD(MRANDOM(0,360)), RAD(0))*CF(0,MRANDOM(15,25)/3,MRANDOM(15,25)/3)
- SHOOT.CFrame = CF(CFRAME.p,ROOT.Position)
- CreateSound(233856115, SHOOT, 2, (MRANDOM(8,12)/10)+0.3, false)
- table.insert(GUNS,SHOOT)
- end
- for i = 1, 25 do
- Swait()
- for E = 1, #GUNS do
- GUNS[E].Transparency = GUNS[E].Transparency - 1/25
- end
- end
- wait(0.1)
- CamShake(8,15)
- for E = 1, #GUNS do
- local SHOOT = GUNS[E]
- coroutine.resume(coroutine.create(function()
- PAW_HAHA(SHOOT.CFrame*CF(0,0,-SHOOT.Size.Z/2).p,SHOOT.CFrame*CF(0,0,-15).p,17)
- SHOOT.CFrame = SHOOT.CFrame * ANGLES(RAD(45), RAD(0), RAD(0))
- SHOOT.CanCollide = true
- SHOOT.Anchored = false
- SHOOT.Parent = workspace
- local bv = Instance.new("BodyVelocity",SHOOT)
- bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
- bv.velocity = CF(SHOOT.Position,SHOOT.CFrame*CF(0,2.5,2).p).lookVector*45
- Debris:AddItem(bv,0.1)
- wait(5)
- for i = 1, 45 do
- Swait()
- SHOOT.Transparency = SHOOT.Transparency + 1/45
- end
- end))
- wait()
- end
- end))
- CreateSound(GRUNTS[MRANDOM(1,#GRUNTS)], Torso, 6, 1.1, false)
- for i=0, 1, 0.1 / Animation_Speed do
- Swait()
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.1, -0.1) * ANGLES(RAD(-20), RAD(0), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(-10), RAD(80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(-10), RAD(-80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- end
- ATTACK = false
- Rooted = false
- end
- function Tripwire()
- ATTACK = true
- Rooted = true
- TRIPWIRE = true
- coroutine.resume(coroutine.create(function()
- repeat
- Swait()
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.1, -0.1) * ANGLES(RAD(-10), RAD(0), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1, 0.5, -0.5) * ANGLES(RAD(0), RAD(0), RAD(-100)) * ANGLES(RAD(20), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-15), RAD(5), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(-10), RAD(80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(-10), RAD(-80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed)
- until ATTACK == false
- end))
- local SHOOT = OhnoItsAShotgun()
- local CFRAME = CF(-1.5,0,1.5) * ANGLES(RAD(0), RAD(45), RAD(0))
- SHOOT.CFrame = Torso.CFrame*CFRAME
- coroutine.resume(coroutine.create(function()
- repeat
- SHOOT.CFrame = Clerp(SHOOT.CFrame,Torso.CFrame*CFRAME,0.1)
- Swait()
- until HOLD == true
- TRIPWIRE = false
- local LOC = SHOOT.CFrame*CF(0,3,0).p
- for i = 1, 15 do
- Swait()
- SHOOT.Transparency = SHOOT.Transparency - 1/15
- SHOOT.CFrame = Clerp(SHOOT.CFrame,CF(LOC,Mouse.Hit.p),0.3)
- end
- SHOOT.Transparency = 0
- for i = 1, 2 do
- Swait()
- SHOOT.CFrame = Clerp(SHOOT.CFrame,CF(LOC,Mouse.Hit.p),0.5)
- end
- PAW_HAHA(SHOOT.CFrame*CF(0,0,-SHOOT.Size.Z/2).p,Mouse.Hit.p,10)
- CamShake(8,9)
- SHOOT.CFrame = SHOOT.CFrame * ANGLES(RAD(45), RAD(0), RAD(0))
- SHOOT.CanCollide = true
- SHOOT.Anchored = false
- SHOOT.Parent = workspace
- local bv = Instance.new("BodyVelocity",SHOOT)
- bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
- bv.velocity = CF(SHOOT.Position,SHOOT.CFrame*CF(0,2.5,2).p).lookVector*45
- Debris:AddItem(bv,0.1)
- wait(5)
- for i = 1, 45 do
- Swait()
- SHOOT.Transparency = SHOOT.Transparency + 1/45
- end
- end))
- CreateSound(233856115, SHOOT, 1.2, (MRANDOM(8,12)/10)-0.3, false)
- for i = 1, 15 do
- Swait()
- SHOOT.Transparency = SHOOT.Transparency - 1/150
- end
- ATTACK = false
- Rooted = false
- end
- function Mend()
- if Humanoid.Health < Humanoid.MaxHealth - 150 then
- ATTACK = true
- Rooted = true
- for i=0, 0.25, 0.1 / Animation_Speed do
- Swait()
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -1) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-25)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-5), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-5), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, 0.2, -1) * ANGLES(RAD(-25), RAD(90), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.5, -0.5) * ANGLES(RAD(-90), RAD(-90), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- local LOOP = 0
- repeat
- LOOP = LOOP + 1
- Swait()
- Humanoid.Health = Humanoid.Health + 1
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -1) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1, 0.5, -0.4) * ANGLES(RAD(55), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1, 0.5, -0.7 - 0.4 * SIN(LOOP / 4)) * ANGLES(RAD(50 + 25 * COS(LOOP / 4)), RAD(0), RAD(65)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, 0, -1) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.5, -0.5) * ANGLES(RAD(-90), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
- until KEYHOLD == false or Humanoid.Health == Humanoid.MaxHealth
- for i=0, 0.15, 0.1 / Animation_Speed do
- Swait()
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -1) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(-25)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-5), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-5), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, 0.2, -1) * ANGLES(RAD(-25), RAD(90), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1.5, -0.5) * ANGLES(RAD(-90), RAD(-90), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- ATTACK = false
- Rooted = false
- end
- end
- function Taunt()
- ATTACK = true
- Rooted = true
- local L = CreateSound(1278007556,Head,8,1.1,false)
- L.EmitterSize = 25
- for i = 1, 20 do
- Swait()
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.1, -0.1) * ANGLES(RAD(-10), RAD(0), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1, 0.5, -0.5) * ANGLES(RAD(0), RAD(0), RAD(-110)) * ANGLES(RAD(20), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1, 0.3, -0.35) * ANGLES(RAD(0), RAD(0), RAD(80)) * ANGLES(RAD(20), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(-10), RAD(80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(-10), RAD(-80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- for i = 1, 40 do
- Swait()
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, -0.17, -0.075 + 0.1 * SIN(i / 3)) * ANGLES(RAD(5), RAD(0), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-3), RAD(15 * SIN(i / 1.5)), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.45, 0.6 - 0.1 * SIN(i / 3), 0) * ANGLES(RAD(15), RAD(-5), RAD(120)) * ANGLES(RAD(0), RAD(180), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.45, 0.6 - 0.1 * SIN(i / 3), 0) * ANGLES(RAD(15), RAD(5), RAD(-120)) * ANGLES(RAD(0), RAD(180), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.1 * SIN(i / 3), 0) * ANGLES(RAD(5), RAD(80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.1 * SIN(i / 3), 0) * ANGLES(RAD(5), RAD(-80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- ATTACK = false
- Rooted = false
- end
- function DoubleJump()
- ATTACK = true
- Rooted = false
- Torso.Velocity = Vector3.new(Torso.Velocity.X,125,Torso.Velocity.Z)
- CreateSound(159882477, Head, 4, 1, false)
- CreateSound(1112042117, Torso, 2, 1, false)
- local E = 360/12
- for i=1, 12 do
- Swait()
- RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(i*E), RAD(0), RAD(0)), 2.5 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(-90)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(90)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, 0, -0.5) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, 0, -0.5) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
- end
- ATTACK = false
- Rooted = false
- end
- --//=================================\\
- --|| ASSIGN THINGS TO KEYS
- --\\=================================//
- function MouseDown(Mouse)
- HOLD = true
- if ATTACK == false then
- end
- end
- function MouseUp(Mouse)
- HOLD = false
- end
- local READYTODOUBLE = false
- local DOUBLED = false
- --[[function KeyDown(Key)
- KEYHOLD = true
- if Key == "c" and ATTACK == false then
- Conjour()
- end
- if Key == "v" and ATTACK == false then
- Aerial_Bombardament()
- end
- if Key == "b" and ATTACK == false then
- Point_Blank()
- end
- if Key == "f" and ATTACK == false and TRIPWIRE == false and ANIM == "Idle" then
- Tripwire()
- end
- if Key == "m" and ATTACK == false then
- Mend()
- end
- if Key == "t" and ATTACK == false then
- Taunt()
- end
- if string.byte(Key) == 32 and READYTODOUBLE == true and ATTACK == false and Humanoid.Jump == true and DOUBLED == false then
- READYTODOUBLE = false
- DOUBLED = true
- DoubleJump()
- end
- end
- function KeyUp(Key)
- KEYHOLD = false
- end
- Mouse.Button1Down:connect(function(NEWKEY)
- MouseDown(NEWKEY)
- end)
- Mouse.Button1Up:connect(function(NEWKEY)
- MouseUp(NEWKEY)
- end)
- Mouse.KeyDown:connect(function(NEWKEY)
- KeyDown(NEWKEY)
- end)
- Mouse.KeyUp:connect(function(NEWKEY)
- KeyUp(NEWKEY)
- end)]]--
- --//=================================\\
- --\\=================================//
- function unanchor()
- for _, c in pairs(Character:GetChildren()) do
- if c:IsA("BasePart") and c ~= RootPart then
- c.Anchored = false
- end
- end
- if UNANCHOR == true then
- RootPart.Anchored = false
- else
- RootPart.Anchored = true
- end
- end
- --//=================================\\
- --|| WRAP THE WHOLE SCRIPT UP
- --\\=================================//
- coroutine.resume(coroutine.create(function()
- wait(1)
- local randat = math.random(1,4)
- while true do
- Swait(math.random(20,100))
- if ATTACK == false then
- if randat == 1 then
- Aerial_Bombardament()
- elseif randat == 2 then
- Point_Blank()
- elseif randat == 3 then
- Tripwire()
- elseif randat == 4 and Humanoid.Health < Humanoid.MaxHealth then
- Mend()
- end
- end
- randat = math.random(1,4)
- end
- end))
- Humanoid.Changed:connect(function(Jump)
- if Jump == "Jump" and (Disable_Jump == true) then
- Humanoid.Jump = false
- elseif Jump == "Jump" and (Disable_Jump == false) and DOUBLED == false then
- wait(0.1)
- READYTODOUBLE = true
- end
- end)
- while true do
- Swait()
- --script.Parent = WEAPONGUI
- ANIMATE.Parent = nil
- for _,v in next, Humanoid:GetPlayingAnimationTracks() do
- v:Stop();
- end
- SINE = SINE + CHANGE
- local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
- local TORSOVERTICALVELOCITY = RootPart.Velocity.y
- local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
- local WALKSPEEDVALUE = 8 / (Humanoid.WalkSpeed / 16)
- if ANIM == "Walk" and TORSOVELOCITY > 1 then
- RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0.1 * COS(SINE / (WALKSPEEDVALUE/2))) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
- Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
- RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.25 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10+50 * COS(SINE / WALKSPEEDVALUE))), 0.6 / Animation_Speed)
- LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.25 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-10+50 * COS(SINE / WALKSPEEDVALUE))), 0.6 / Animation_Speed)
- elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
- RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
- Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
- RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.7 / Animation_Speed)
- LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.7 / Animation_Speed)
- end
- if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
- ANIM = "Jump"
- if ATTACK == false then
- RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(-25), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(25 + 10 * COS(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(-25 - 10 * COS(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.4, -0.6) * ANGLES(RAD(1), RAD(90), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
- ANIM = "Fall"
- if ATTACK == false then
- RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(35 - 4 * COS(SINE / 6)), RAD(0), RAD(45 + 10 * COS(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(35 - 4 * COS(SINE / 6)), RAD(0), RAD(-45 - 10 * COS(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -0.7) * ANGLES(RAD(-25 + 5 * SIN(SINE / 12)), RAD(90), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.8, -0.3) * ANGLES(RAD(-10), RAD(-80), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
- ANIM = "Idle"
- DOUBLED = false
- READYTODOUBLE = false
- if ATTACK == false then
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.1, -0.1 + 0.05 * SIN(SINE / 12)) * ANGLES(RAD(-10), RAD(0), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5 - 2.5 * SIN(SINE / 12)), RAD(7 * COS(SINE / 24)), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1, 0.5 + 0.05 * SIN(SINE / 12), -0.5) * ANGLES(RAD(0), RAD(0), RAD(-100)) * ANGLES(RAD(20), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1, 0.3 + 0.05 * SIN(SINE / 12), -0.35) * ANGLES(RAD(0), RAD(0), RAD(70)) * ANGLES(RAD(20), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(-10), RAD(80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(-10), RAD(-80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
- ANIM = "Walk"
- DOUBLED = false
- READYTODOUBLE = false
- if ATTACK == false then
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.05) * ANGLES(RAD(15), RAD(0), RAD(-7 * COS(SINE / (WALKSPEEDVALUE)))), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 1 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(7 * COS(SINE / (WALKSPEEDVALUE)))), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-15), RAD(-5), RAD(5)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-15), RAD(5), RAD(-5)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 / Animation_Speed)
- end
- end
- unanchor()
- if Rooted == false then
- Disable_Jump = false
- Humanoid.WalkSpeed = Speed
- elseif Rooted == true then
- Disable_Jump = true
- Humanoid.WalkSpeed = 0
- end
- BMUSIC.SoundId = "rbxassetid://"..SONGID
- BMUSIC.Looped = true
- BMUSIC.Pitch = PITCH
- BMUSIC.Volume = VOLUME
- BMUSIC.Playing = true
- if BMUSIC.Parent ~= RootPart then
- BMUSIC = IT("Sound",RootPart)
- end
- --Humanoid.Name = "NONHUM"
- --HEALTHCOVER:TweenSize(UD2(1 * (Humanoid.Health / Humanoid.MaxHealth), 0, 1, 0), "Out", "Quad", 0.1, 0.1)
- --HEALTHTEXT.Text = math.ceil(Humanoid.Health).."/"..Humanoid.MaxHealth
- end
- --//=================================\\
- --\\=================================//
- --//====================================================\\--
- --|| END OF SCRIPT
- --\\====================================================//--
- end))
- Script34.Name = "ragdollDeath"
- Script34.Parent = Model3
- table.insert(cors,sandbox(Script34,function()
- repeat wait() until script.Parent:IsA("Model")
- local char = script.Parent
- local R6 = require(script:WaitForChild("R6"))
- local R15 = require(script:WaitForChild("R15"))
- local plr = game:GetService("Players"):GetPlayerFromCharacter(char)
- local hum = char:WaitForChild("Humanoid")
- local autoLoads = game:GetService("Players").CharacterAutoLoads
- local function setNetworkOwner()
- for i, bp in pairs(char:GetChildren()) do
- if bp:IsA("BasePart") and bp:CanSetNetworkOwnership() then
- bp:SetNetworkOwner(plr)
- end
- end
- end
- hum.Died:Connect(function()
- if hum.RigType == Enum.HumanoidRigType.R6 then
- R6(char)
- setNetworkOwner()
- if autoLoads == true then
- delay(3, function()
- if not plr.Character then
- plr:LoadCharacter()
- end
- end)
- end
- else
- R15(char)
- setNetworkOwner()
- if autoLoads == true then
- delay(3, function()
- if not plr.Character then
- plr:LoadCharacter()
- end
- end)
- end
- end
- end)
- end))
- ModuleScript35.Name = "R6"
- ModuleScript35.Parent = Script34
- table.insert(cors,sandbox(ModuleScript35,function()
- -- RAGDOLL A R6 CHARACTER.
- local function getAttachment0(attachmentName, char)
- for _,child in next,char:GetChildren() do
- local attachment = child:FindFirstChild(attachmentName)
- if attachment then
- return attachment
- end
- end
- end
- local function ragdollPlayer(char)
- local head = char["Head"]
- local hum = char:WaitForChild("Humanoid")
- local leftarm = char["Left Arm"]
- local leftleg = char["Left Leg"]
- local rightleg = char["Right Leg"]
- local rightarm = char["Right Arm"]
- local torso = char.Torso
- hum.PlatformStand = true
- local root =char:FindFirstChild("HumanoidRootPart")
- if root ~= nil then
- root:Destroy()
- end
- local rootA =Instance.new("Attachment")
- local HeadA = Instance.new("Attachment")
- local LeftArmA = Instance.new("Attachment")
- local LeftLegA = Instance.new("Attachment")
- local RightArmA = Instance.new("Attachment")
- local RightLegA = Instance.new("Attachment")
- local TorsoA = Instance.new("Attachment")
- local TorsoA1 = Instance.new("Attachment")
- local TorsoA2 = Instance.new("Attachment")
- local TorsoA3 = Instance.new("Attachment")
- local TorsoA4 = Instance.new("Attachment")
- local TorsoA5 = Instance.new("Attachment")
- local function set1()
- HeadA.Name = "HeadA"
- HeadA.Parent = head
- HeadA.Position = Vector3.new(0, -0.5, 0)
- HeadA.Rotation = Vector3.new(0, 0, 0)
- HeadA.Axis = Vector3.new(1, 0, 0)
- HeadA.SecondaryAxis = Vector3.new(0, 1, 0)
- LeftArmA.Name = "LeftArmA"
- LeftArmA.Parent = leftarm
- LeftArmA.Position = Vector3.new(0.5, 1, 0)
- LeftArmA.Rotation = Vector3.new(0, 0, 0)
- LeftArmA.Axis = Vector3.new(1, 0, 0)
- LeftArmA.SecondaryAxis = Vector3.new(0, 1, 0)
- LeftLegA.Name = "LeftLegA"
- LeftLegA.Parent = leftleg
- LeftLegA.Position = Vector3.new(0, 1, 0)
- LeftLegA.Rotation = Vector3.new(0, 0, 0)
- LeftLegA.Axis = Vector3.new(1, 0, 0)
- LeftLegA.SecondaryAxis = Vector3.new(0, 1, 0)
- RightArmA.Name = "RightArmA"
- RightArmA.Parent = rightarm
- RightArmA.Position = Vector3.new(-0.5, 1, 0)
- RightArmA.Rotation = Vector3.new(0, 0, 0)
- RightArmA.Axis = Vector3.new(1, 0, 0)
- RightArmA.SecondaryAxis = Vector3.new(0, 1, 0)
- RightLegA.Name = "RightLegA"
- RightLegA.Parent = rightleg
- RightLegA.Position = Vector3.new(0, 1, 0)
- RightLegA.Rotation = Vector3.new(0, 0, 0)
- RightLegA.Axis = Vector3.new(1, 0, 0)
- RightLegA.SecondaryAxis = Vector3.new(0, 1, 0)
- rootA.Name= "rootA"
- rootA.Parent = root
- rootA.Position = Vector3.new(0, 0, 0)
- rootA.Rotation = Vector3.new(0, 90, 0)
- rootA.Axis = Vector3.new(0, 0, -1)
- rootA.SecondaryAxis = Vector3.new(0, 1, 0)
- end
- local function set2()
- TorsoA.Name = "TorsoA"
- TorsoA.Parent = torso
- TorsoA.Position = Vector3.new(0.5, -1, 0)
- TorsoA.Rotation = Vector3.new(0, 0, 0)
- TorsoA.Axis = Vector3.new(1, 0, 0)
- TorsoA.SecondaryAxis = Vector3.new(0, 1, 0)
- TorsoA1.Name = "TorsoA1"
- TorsoA1.Parent = torso
- TorsoA1.Position = Vector3.new(-0.5, -1, 0)
- TorsoA1.Rotation = Vector3.new(0, 0, 0)
- TorsoA1.Axis = Vector3.new(1, 0, 0)
- TorsoA1.SecondaryAxis = Vector3.new(0, 1, 0)
- TorsoA2.Name = "TorsoA2"
- TorsoA2.Parent = torso
- TorsoA2.Position = Vector3.new(-1, 1, 0)
- TorsoA2.Rotation = Vector3.new(0, 0, 0)
- TorsoA2.Axis = Vector3.new(1, 0, 0)
- TorsoA2.SecondaryAxis = Vector3.new(0, 1, 0)
- TorsoA3.Name = "TorsoA3"
- TorsoA3.Parent = torso
- TorsoA3.Position = Vector3.new(1, 1, 0)
- TorsoA3.Rotation = Vector3.new(0, 0, 0)
- TorsoA3.Axis = Vector3.new(1, 0, 0)
- TorsoA3.SecondaryAxis = Vector3.new(0, 1, 0)
- TorsoA4.Name = "TorsoA4"
- TorsoA4.Parent = torso
- TorsoA4.Position = Vector3.new(0, 1, 0)
- TorsoA4.Rotation = Vector3.new(0, 0, 0)
- TorsoA4.Axis = Vector3.new(1, 0, 0)
- TorsoA4.SecondaryAxis = Vector3.new(0, 1, 0)
- TorsoA5.Name = "TorsoA5"
- TorsoA5.Parent = torso
- TorsoA5.Position = Vector3.new(0, 0, 0)
- TorsoA5.Rotation = Vector3.new(0, 90, 0)
- TorsoA5.Axis = Vector3.new(0, 0, -1)
- TorsoA5.SecondaryAxis = Vector3.new(0, 1, 0)
- end
- spawn(set1)
- spawn(set2)
- --[[
- local HA = Instance.new("HingeConstraint")
- HA.Parent = head
- HA.Attachment0 = HeadA
- HA.Attachment1 = TorsoA4
- HA.Enabled = true
- HA.LimitsEnabled=true
- HA.LowerAngle=0
- HA.UpperAngle=0
- --]]
- local LAT = Instance.new("BallSocketConstraint")
- LAT.Parent = leftarm
- LAT.Attachment0 = LeftArmA
- LAT.Attachment1 = TorsoA2
- LAT.Enabled = true
- LAT.LimitsEnabled=true
- LAT.UpperAngle=90
- local RAT = Instance.new("BallSocketConstraint")
- RAT.Parent = rightarm
- RAT.Attachment0 = RightArmA
- RAT.Attachment1 = TorsoA3
- RAT.Enabled = true
- RAT.LimitsEnabled=false
- RAT.UpperAngle=90
- local HA = Instance.new("BallSocketConstraint")
- HA.Parent = head
- HA.Attachment0 = HeadA
- HA.Attachment1 = TorsoA4
- HA.Enabled = true
- HA.LimitsEnabled = true
- HA.TwistLimitsEnabled = true
- HA.UpperAngle = 74
- local TLL = Instance.new("BallSocketConstraint")
- TLL.Parent = torso
- TLL.Attachment0 = TorsoA1
- TLL.Attachment1 = LeftLegA
- TLL.Enabled = true
- TLL.LimitsEnabled=true
- TLL.UpperAngle=90
- local TRL = Instance.new("BallSocketConstraint")
- TRL.Parent = torso
- TRL.Attachment0 = TorsoA
- TRL.Attachment1 = RightLegA
- TRL.Enabled = true
- TRL.LimitsEnabled=true
- TRL.UpperAngle=90
- local RTA = Instance.new("BallSocketConstraint")
- RTA.Parent = root
- RTA.Attachment0 = rootA
- RTA.Attachment1 = TorsoA5
- RTA.Enabled = true
- RTA.LimitsEnabled=true
- RTA.UpperAngle=0
- head.Velocity = head.CFrame.p * CFrame.new(0, -41, 0).p
- for _,child in next,char:GetChildren() do
- if child:IsA("Accoutrement") then
- for _,part in next,child:GetChildren() do
- if part:IsA("BasePart") then
- part.Parent = char
- child:remove()
- local attachment1 = part:FindFirstChildOfClass("Attachment")
- local attachment0 = getAttachment0(attachment1.Name, char)
- if attachment0 and attachment1 then
- local constraint = Instance.new("HingeConstraint")
- constraint.Attachment0 = attachment0
- constraint.Attachment1 = attachment1
- constraint.LimitsEnabled = true
- constraint.UpperAngle = 0
- constraint.LowerAngle = 0
- constraint.Parent = char
- end
- end
- end
- end
- end
- end
- return ragdollPlayer
- end))
- ModuleScript36.Name = "R15"
- ModuleScript36.Parent = Script34
- table.insert(cors,sandbox(ModuleScript36,function()
- local function recurse(root,callback,i)
- i= i or 0
- for _,v in pairs(root:GetChildren()) do
- i = i + 1
- callback(i,v)
- if #v:GetChildren() > 0 then
- i = recurse(v,callback,i)
- end
- end
- return i
- end
- local function ragdollPlayer(character)
- local function ragdollJoint(part0, part1, attachmentName, className, properties)
- attachmentName = attachmentName.."RigAttachment"
- local constraint = Instance.new(className.."Constraint")
- constraint.Attachment0 = part0:FindFirstChild(attachmentName)
- constraint.Attachment1 = part1:FindFirstChild(attachmentName)
- constraint.Name = "RagdollConstraint"..part1.Name
- for _,propertyData in next,properties or {} do
- constraint[propertyData[1]] = propertyData[2]
- end
- constraint.Parent = character
- end
- local function getAttachment0(attachmentName)
- local attachment = character:FindFirstChild(attachmentName, true)
- if attachment then
- return attachment
- end
- end
- local camera = workspace.CurrentCamera
- if camera.CameraSubject == character.Humanoid then--If developer isn't controlling camera
- camera.CameraSubject = character.UpperTorso
- end
- --Make it so ragdoll can't collide with invisible HRP, but don't let HRP fall through map and be destroyed in process
- character.HumanoidRootPart.Anchored = true
- character.HumanoidRootPart.CanCollide = false
- --Helps to fix constraint spasms
- recurse(character, function(_,v)
- if v:IsA("Attachment") then
- v.Axis = Vector3.new(0, 1, 0)
- v.SecondaryAxis = Vector3.new(0, 0, 1)
- v.Rotation = Vector3.new(0, 0, 0)
- end
- end)
- ragdollJoint(character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
- {"LimitsEnabled",true};
- {"UpperAngle",5};
- })
- ragdollJoint(character.UpperTorso, character.Head, "Neck", "BallSocket", {
- {"LimitsEnabled",true};
- {"UpperAngle",15};
- })
- local handProperties = {
- {"LimitsEnabled", true};
- {"UpperAngle",0};
- {"LowerAngle",0};
- }
- ragdollJoint(character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
- ragdollJoint(character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
- local shinProperties = {
- {"LimitsEnabled", true};
- {"UpperAngle", 0};
- {"LowerAngle", -75};
- }
- ragdollJoint(character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
- ragdollJoint(character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
- local footProperties = {
- {"LimitsEnabled", true};
- {"UpperAngle", 15};
- {"LowerAngle", -45};
- }
- ragdollJoint(character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
- ragdollJoint(character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
- --TODO fix ability for socket to turn backwards whenn ConeConstraints are shipped
- ragdollJoint(character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
- ragdollJoint(character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
- ragdollJoint(character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
- ragdollJoint(character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
- ragdollJoint(character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
- ragdollJoint(character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
- for _,child in next,character:GetChildren() do
- if child:IsA("Accoutrement") then
- for _,part in next,child:GetChildren() do
- if part:IsA("BasePart") then
- part.Parent = character
- child:remove()
- local attachment1 = part:FindFirstChildOfClass("Attachment")
- local attachment0 = getAttachment0(attachment1.Name, character)
- if attachment0 and attachment1 then
- local constraint = Instance.new("HingeConstraint")
- constraint.Attachment0 = attachment0
- constraint.Attachment1 = attachment1
- constraint.LimitsEnabled = true
- constraint.UpperAngle = 0
- constraint.LowerAngle = 0
- constraint.Parent = part
- end
- end
- end
- end
- end
- end
- return ragdollPlayer
- end))
- Script37.Name = "Follow"
- Script37.Parent = Model3
- table.insert(cors,sandbox(Script37,function()
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 1000
- local temp = nil
- local detecttea = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- detecttea = temp2:findFirstChild("enemyteam")
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChildOfClass("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (detecttea == nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- --wait(math.random(0,5)/10)
- while true do
- wait(0.5)
- local target = findNearestTorso(script.Parent.Torso.Position)
- if target ~= nil then
- script.Parent.Humanoid:MoveTo(target.Position, target)
- end
- end
- end))
- StringValue38.Name = "enemyteam"
- StringValue38.Parent = Model3
- Script39.Name = "Health"
- Script39.Parent = Model3
- table.insert(cors,sandbox(Script39,function()
- -- Gradually regenerates the Humanoid's Health over time.
- local REGEN_RATE = 1/100 -- Regenerate this fraction of MaxHealth per second.
- local REGEN_STEP = 1 -- Wait this long between each regeneration step.
- --------------------------------------------------------------------------------
- local Character = script.Parent
- local Humanoid = Character:WaitForChild'Humanoid'
- --------------------------------------------------------------------------------
- while true do
- while Humanoid.Health < Humanoid.MaxHealth do
- local dt = wait(REGEN_STEP)
- local dh = dt*REGEN_RATE*Humanoid.MaxHealth
- Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
- end
- Humanoid.HealthChanged:Wait()
- end
- end))
- LocalScript40.Name = "Animate"
- LocalScript40.Parent = Model3
- table.insert(cors,sandbox(LocalScript40,function()
- local Figure = script.Parent
- local Torso = Figure:WaitForChild("Torso")
- local RightShoulder = Torso:WaitForChild("Right Shoulder")
- local LeftShoulder = Torso:WaitForChild("Left Shoulder")
- local RightHip = Torso:WaitForChild("Right Hip")
- local LeftHip = Torso:WaitForChild("Left Hip")
- local Neck = Torso:WaitForChild("Neck")
- local Humanoid = Figure:WaitForChild("Humanoid")
- local pose = "Standing"
- local currentAnim = ""
- local currentAnimInstance = nil
- local currentAnimTrack = nil
- local currentAnimKeyframeHandler = nil
- local currentAnimSpeed = 1.0
- local animTable = {}
- local animNames = {
- idle = {
- { id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
- { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
- },
- walk = {
- { id = "http://www.roblox.com/asset/?id=180426354", weight = 10 }
- },
- run = {
- { id = "run.xml", weight = 10 }
- },
- jump = {
- { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
- },
- fall = {
- { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
- },
- climb = {
- { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
- },
- sit = {
- { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
- },
- toolnone = {
- { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
- },
- toolslash = {
- { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
- -- { id = "slash.xml", weight = 10 }
- },
- toollunge = {
- { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
- },
- wave = {
- { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
- },
- point = {
- { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
- },
- dance1 = {
- { id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
- },
- dance2 = {
- { id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
- },
- dance3 = {
- { id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
- },
- laugh = {
- { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
- },
- cheer = {
- { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
- },
- }
- local dances = {"dance1", "dance2", "dance3"}
- -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
- local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
- function configureAnimationSet(name, fileList)
- if (animTable[name] ~= nil) then
- for _, connection in pairs(animTable[name].connections) do
- connection:disconnect()
- end
- end
- animTable[name] = {}
- animTable[name].count = 0
- animTable[name].totalWeight = 0
- animTable[name].connections = {}
- -- check for config values
- local config = script:FindFirstChild(name)
- if (config ~= nil) then
- -- print("Loading anims " .. name)
- table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
- table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
- local idx = 1
- for _, childPart in pairs(config:GetChildren()) do
- if (childPart:IsA("Animation")) then
- table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
- animTable[name][idx] = {}
- animTable[name][idx].anim = childPart
- local weightObject = childPart:FindFirstChild("Weight")
- if (weightObject == nil) then
- animTable[name][idx].weight = 1
- else
- animTable[name][idx].weight = weightObject.Value
- end
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
- -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
- idx = idx + 1
- end
- end
- end
- -- fallback to defaults
- if (animTable[name].count <= 0) then
- for idx, anim in pairs(fileList) do
- animTable[name][idx] = {}
- animTable[name][idx].anim = Instance.new("Animation")
- animTable[name][idx].anim.Name = name
- animTable[name][idx].anim.AnimationId = anim.id
- animTable[name][idx].weight = anim.weight
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
- -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
- end
- end
- end
- -- Setup animation objects
- function scriptChildModified(child)
- local fileList = animNames[child.Name]
- if (fileList ~= nil) then
- configureAnimationSet(child.Name, fileList)
- end
- end
- script.ChildAdded:connect(scriptChildModified)
- script.ChildRemoved:connect(scriptChildModified)
- for name, fileList in pairs(animNames) do
- configureAnimationSet(name, fileList)
- end
- -- ANIMATION
- -- declarations
- local toolAnim = "None"
- local toolAnimTime = 0
- local jumpAnimTime = 0
- local jumpAnimDuration = 0.3
- local toolTransitionTime = 0.1
- local fallTransitionTime = 0.3
- local jumpMaxLimbVelocity = 0.75
- -- functions
- function stopAllAnimations()
- local oldAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
- oldAnim = "idle"
- end
- currentAnim = ""
- currentAnimInstance = nil
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop()
- currentAnimTrack:Destroy()
- currentAnimTrack = nil
- end
- return oldAnim
- end
- function setAnimationSpeed(speed)
- if speed ~= currentAnimSpeed then
- currentAnimSpeed = speed
- currentAnimTrack:AdjustSpeed(currentAnimSpeed)
- end
- end
- function keyFrameReachedFunc(frameName)
- if (frameName == "End") then
- local repeatAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
- repeatAnim = "idle"
- end
- local animSpeed = currentAnimSpeed
- playAnimation(repeatAnim, 0.0, Humanoid)
- setAnimationSpeed(animSpeed)
- end
- end
- -- Preload animations
- function playAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- -- switch animation
- if (anim ~= currentAnimInstance) then
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop(transitionTime)
- currentAnimTrack:Destroy()
- end
- currentAnimSpeed = 1.0
- -- load it to the humanoid; get AnimationTrack
- currentAnimTrack = humanoid:LoadAnimation(anim)
- currentAnimTrack.Priority = Enum.AnimationPriority.Core
- -- play the animation
- currentAnimTrack:Play(transitionTime)
- currentAnim = animName
- currentAnimInstance = anim
- -- set up keyframe name triggers
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
- end
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- local toolAnimName = ""
- local toolAnimTrack = nil
- local toolAnimInstance = nil
- local currentToolAnimKeyframeHandler = nil
- function toolKeyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- playToolAnimation(toolAnimName, 0.0, Humanoid)
- end
- end
- function playToolAnimation(animName, transitionTime, humanoid, priority)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- if (toolAnimInstance ~= anim) then
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- transitionTime = 0
- end
- -- load it to the humanoid; get AnimationTrack
- toolAnimTrack = humanoid:LoadAnimation(anim)
- if priority then
- toolAnimTrack.Priority = priority
- end
- -- play the animation
- toolAnimTrack:Play(transitionTime)
- toolAnimName = animName
- toolAnimInstance = anim
- currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
- end
- end
- function stopToolAnimations()
- local oldAnim = toolAnimName
- if (currentToolAnimKeyframeHandler ~= nil) then
- currentToolAnimKeyframeHandler:disconnect()
- end
- toolAnimName = ""
- toolAnimInstance = nil
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- toolAnimTrack = nil
- end
- return oldAnim
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- function onRunning(speed)
- if speed > 0.01 then
- playAnimation("walk", 0.1, Humanoid)
- if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
- setAnimationSpeed(speed / 14.5)
- end
- pose = "Running"
- else
- if emoteNames[currentAnim] == nil then
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- end
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- playAnimation("jump", 0.1, Humanoid)
- jumpAnimTime = jumpAnimDuration
- pose = "Jumping"
- end
- function onClimbing(speed)
- playAnimation("climb", 0.1, Humanoid)
- setAnimationSpeed(speed / 12.0)
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- if (jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- end
- pose = "FreeFall"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- pose = "PlatformStanding"
- end
- function onSwimming(speed)
- if speed > 0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function getTool()
- for _, kid in ipairs(Figure:GetChildren()) do
- if kid.className == "Tool" then return kid end
- end
- return nil
- end
- function getToolAnim(tool)
- for _, c in ipairs(tool:GetChildren()) do
- if c.Name == "toolanim" and c.className == "StringValue" then
- return c
- end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
- return
- end
- if (toolAnim == "Slash") then
- playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
- return
- end
- if (toolAnim == "Lunge") then
- playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
- return
- end
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder:SetDesiredAngle(3.14 /2)
- LeftShoulder:SetDesiredAngle(-3.14 /2)
- RightHip:SetDesiredAngle(3.14 /2)
- LeftHip:SetDesiredAngle(-3.14 /2)
- end
- local lastTick = 0
- function move(time)
- local amplitude = 1
- local frequency = 1
- local deltaTime = time - lastTick
- lastTick = time
- local climbFudge = 0
- local setAngles = false
- if (jumpAnimTime > 0) then
- jumpAnimTime = jumpAnimTime - deltaTime
- end
- if (pose == "FreeFall" and jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- elseif (pose == "Seated") then
- playAnimation("sit", 0.5, Humanoid)
- return
- elseif (pose == "Running") then
- playAnimation("walk", 0.1, Humanoid)
- elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
- -- print("Wha " .. pose)
- stopAllAnimations()
- amplitude = 0.1
- frequency = 1
- setAngles = true
- end
- if (setAngles) then
- local desiredAngle = amplitude * math.sin(time * frequency)
- RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
- LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
- RightHip:SetDesiredAngle(-desiredAngle)
- LeftHip:SetDesiredAngle(-desiredAngle)
- end
- -- Tool Animation handling
- local tool = getTool()
- if tool and tool:FindFirstChild("Handle") then
- local animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- stopToolAnimations()
- toolAnim = "None"
- toolAnimInstance = nil
- toolAnimTime = 0
- end
- end
- -- connect events
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(onJumping)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.GettingUp:connect(onGettingUp)
- Humanoid.FreeFalling:connect(onFreeFall)
- Humanoid.FallingDown:connect(onFallingDown)
- Humanoid.Seated:connect(onSeated)
- Humanoid.PlatformStanding:connect(onPlatformStanding)
- Humanoid.Swimming:connect(onSwimming)
- -- setup emote chat hook
- game:GetService("Players").LocalPlayer.Chatted:connect(function(msg)
- local emote = ""
- if msg == "/e dance" then
- emote = dances[math.random(1, #dances)]
- elseif (string.sub(msg, 1, 3) == "/e ") then
- emote = string.sub(msg, 4)
- elseif (string.sub(msg, 1, 7) == "/emote ") then
- emote = string.sub(msg, 8)
- end
- if (pose == "Standing" and emoteNames[emote] ~= nil) then
- playAnimation(emote, 0.1, Humanoid)
- end
- end)
- -- main program
- -- initialize to idle
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- while Figure.Parent ~= nil do
- local _, time = wait(0.1)
- move(time)
- end
- end))
- StringValue41.Name = "idle"
- StringValue41.Parent = LocalScript40
- Animation42.Name = "Animation1"
- Animation42.Parent = StringValue41
- Animation42.AnimationId = "rbxassetid://2656767647"
- NumberValue43.Name = "Weight"
- NumberValue43.Parent = Animation42
- NumberValue43.Value = 9
- StringValue44.Name = "walk"
- StringValue44.Parent = LocalScript40
- Animation45.Name = "WalkAnim"
- Animation45.Parent = StringValue44
- Animation45.AnimationId = "rbxassetid://2661699907"
- StringValue46.Name = "run"
- StringValue46.Parent = LocalScript40
- Animation47.Name = "RunAnim"
- Animation47.Parent = StringValue46
- Animation47.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- StringValue48.Name = "jump"
- StringValue48.Parent = LocalScript40
- Animation49.Name = "JumpAnim"
- Animation49.Parent = StringValue48
- Animation49.AnimationId = "http://www.roblox.com/asset/?id=125750702"
- StringValue50.Name = "climb"
- StringValue50.Parent = LocalScript40
- Animation51.Name = "ClimbAnim"
- Animation51.Parent = StringValue50
- Animation51.AnimationId = "http://www.roblox.com/asset/?id=180436334"
- StringValue52.Name = "toolnone"
- StringValue52.Parent = LocalScript40
- Animation53.Name = "ToolNoneAnim"
- Animation53.Parent = StringValue52
- Animation53.AnimationId = "http://www.roblox.com/asset/?id=182393478"
- StringValue54.Name = "fall"
- StringValue54.Parent = LocalScript40
- Animation55.Name = "FallAnim"
- Animation55.Parent = StringValue54
- Animation55.AnimationId = "http://www.roblox.com/asset/?id=180436148"
- StringValue56.Name = "sit"
- StringValue56.Parent = LocalScript40
- Animation57.Name = "SitAnim"
- Animation57.Parent = StringValue56
- Animation57.AnimationId = "http://www.roblox.com/asset/?id=178130996"
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement