Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Made By : Nokideth")
- print("Edit By : Kermat161")
- print("Press e for best mates! \Updated/")
- Player = game:GetService("Players").LocalPlayer
- Character = Player.Character
- PlayerGui = Player.PlayerGui
- Backpack = Player.Backpack
- Torso = Character.Torso
- Head = Character.Head
- Humanoid = Character.Humanoid
- LeftArm = Character["Left Arm"]
- LeftLeg = Character["Left Leg"]
- RightArm = Character["Right Arm"]
- RightLeg = Character["Right Leg"]
- LS = Torso["Left Shoulder"]
- LH = Torso["Left Hip"]
- RS = Torso["Right Shoulder"]
- RH = Torso["Right Hip"]
- Face = Head.face
- Neck = Torso.Neck
- it = Instance.new
- attacktype = 1
- attacktype2 = 1
- vt = Vector3.new
- cf = CFrame.new
- cn = CFrame.new
- euler = CFrame.fromEulerAnglesXYZ
- angles = CFrame.Angles
- necko = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
- necko2 = cf(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
- LHC0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- LHC1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- RootPart = Character.HumanoidRootPart
- RootJoint = RootPart.RootJoint
- RootCF = euler(-1.57, 0, 3.14)
- attack = false
- attackdebounce = false
- trispeed = 0.2
- attackmode = "none"
- local idle = 0
- local Anim = "Idle"
- stance = false
- local ff = 2
- noleg = false
- evadecooldown = false
- Humanoid.Animator.Parent = nil
- equip = false
- local Effects = {}
- attackspeed = 0.14
- df = false
- Swing = 1
- local sine = 0
- local change = 1
- local val = 0
- local rs = game:GetService("RunService").RenderStepped
- Humanoid.WalkSpeed = 5
- Humanoid.JumpPower = 60
- Swing = 1
- cam = workspace.CurrentCamera
- local RbxUtility = LoadLibrary("RbxUtility")
- local Create = RbxUtility.Create
- Head.face.Texture = "rbxassetid://164958099"
- Fornite = Instance.new("Sound", Torso)
- Fornite.Volume = 5
- Fornite.TimePosition = 0
- Fornite.Pitch = 1
- Fornite.SoundId = "rbxassetid://1360395950"
- Fornite.Looped = true
- Fornite:Play()
- k = Fornite
- bestmatess = Instance.new("Sound", Torso)
- bestmatess.Volume = 5
- bestmatess.TimePosition = 0
- bestmatess.Pitch = 1
- bestmatess.SoundId = "rbxassetid://1890957836"
- bestmatess.Looped = true
- skidfield = Instance.new("ForceField", Character)
- skidfield.Visible = false
- Humanoid.Name = "Truegod"
- Humanoid.MaxHealth = 1.0E298
- Humanoid.Health = 1.0E298
- game:GetService("RunService"):BindToRenderStep("W0tT", 0, function()
- if Humanoid.Health > 0.1 and Humanoid.Health < 1.0E298 then
- Humanoid.MaxHealth = 1.0E298
- Humanoid.Health = 1.0E298
- end
- end)
- function so(id, par, vol, pit)
- coroutine.resume(coroutine.create(function()
- local sou = Instance.new("Sound", par or workspace)
- sou.Volume = vol
- sou.Pitch = pit or 1
- sou.SoundId = id
- sou:play()
- game:GetService("Debris"):AddItem(sou, 8)
- end))
- end
- RSH, LSH = nil, nil
- RW, LW = Instance.new("Weld"), Instance.new("Weld")
- RW.Name = "Right Shoulder"
- LW.Name = "Left Shoulder"
- LH = Torso["Left Hip"]
- RH = Torso["Right Hip"]
- TorsoColor = Torso.BrickColor
- function NoOutline(Part)
- Part.TopSurface, Part.BottomSurface, Part.LeftSurface, Part.RightSurface, Part.FrontSurface, Part.BackSurface = 10, 10, 10, 10, 10, 10
- end
- player = Player
- ch = Character
- RSH = ch.Torso["Right Shoulder"]
- LSH = ch.Torso["Left Shoulder"]
- RSH.Parent = nil
- LSH.Parent = nil
- RW.Name = "Right Shoulder"
- RW.Part0 = ch.Torso
- RW.C0 = cf(1.5, 0.5, 0)
- RW.C1 = cf(0, 0.5, 0)
- RW.Part1 = ch["Right Arm"]
- RW.Parent = ch.Torso
- LW.Name = "Left Shoulder"
- LW.Part0 = ch.Torso
- LW.C0 = cf(-1.5, 0.5, 0)
- LW.C1 = cf(0, 0.5, 0)
- LW.Part1 = ch["Left Arm"]
- LW.Parent = ch.Torso
- function newWeld(wp0, wp1, wc0x, wc0y, wc0z)
- local wld = Instance.new("Weld", wp1)
- wld.Part0 = wp0
- wld.Part1 = wp1
- wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
- end
- local rs = game:GetService("RunService").RenderStepped
- newWeld(RootPart, Torso, 0, -1, 0)
- Torso.Weld.C1 = CFrame.new(0, -1, 0)
- newWeld(Torso, LeftLeg, -0.5, -1, 0)
- LeftLeg.Weld.C1 = CFrame.new(0, 1, 0)
- newWeld(Torso, RightLeg, 0.5, -1, 0)
- RightLeg.Weld.C1 = CFrame.new(0, 1, 0)
- Player = game:GetService("Players").LocalPlayer
- Character = Player.Character
- mouse = Player:GetMouse()
- m = Instance.new("Model", Character)
- local weldBetween = function(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
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "Heartbeat"
- script:WaitForChild("Heartbeat")
- frame = 0.0125
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.Heartbeat:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.Heartbeat:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.Heartbeat:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- function swait(num)
- if num == 0 or num == nil then
- ArtificialHB.Event:wait()
- else
- for i = 0, num do
- ArtificialHB.Event:wait()
- end
- end
- end
- function RemoveOutlines(part)
- part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
- end
- function part(formfactor, parent, reflectance, transparency, brickcolor, name, size)
- local fp = it("Part")
- fp.formFactor = formfactor
- fp.Parent = parent
- fp.Reflectance = reflectance
- fp.Transparency = transparency
- fp.CanCollide = false
- fp.Locked = true
- fp.BrickColor = brickcolor
- fp.Name = name
- fp.Size = size
- fp.Position = Torso.Position
- NoOutline(fp)
- if fp.BrickColor == BrickColor.new("Dark indigo") then
- fp.Material = "Neon"
- elseif fp.BrickColor == BrickColor.new("Really black") then
- fp.BrickColor = BrickColor.new("Really black")
- fp.Material = "Metal"
- else
- fp.Material = "Glass"
- end
- fp:BreakJoints()
- return fp
- end
- function mesh(Mesh, part, meshtype, meshid, offset, scale)
- local mesh = it(Mesh)
- mesh.Parent = part
- if Mesh == "SpecialMesh" then
- mesh.MeshType = meshtype
- mesh.MeshId = meshid
- end
- mesh.Offset = offset
- mesh.Scale = scale
- return mesh
- end
- function weld(parent, part0, part1, c0)
- local weld = it("Weld")
- weld.Parent = parent
- weld.Part0 = part0
- weld.Part1 = part1
- weld.C0 = c0
- return weld
- end
- F1 = Instance.new("Folder", Character)
- F1.Name = "Effects Folder"
- F2 = Instance.new("Folder", F1)
- F2.Name = "Effects"
- function Triangle(a, b, c)
- end
- function MagicBlock(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
- prt.Anchored = true
- prt.CanCollide = false
- prt.CFrame = cframe
- prt.Name = "prt"
- msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 5)
- table.insert(Effects, {
- prt,
- "Block1",
- delay,
- x3,
- y3,
- z3
- })
- end
- function MagicCircle(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
- prt.Anchored = true
- prt.CanCollide = false
- prt.CFrame = cframe
- prt.Name = "prt"
- local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 5)
- table.insert(Effects, {
- prt,
- "Cylinder",
- delay,
- x3,
- y3,
- z3
- })
- end
- function MagicWave(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", vt(0, 0, 0), vt(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 5)
- table.insert(Effects, {
- prt,
- "Cylinder",
- delay,
- x3,
- y3,
- z3
- })
- end
- function MagicCylinder(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt(0.2, 0.2, 0.2))
- prt.Anchored = true
- prt.CFrame = cframe
- msh = mesh("SpecialMesh", prt, "Head", "", vt(0, 0, 0), vt(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 5)
- Effects[#Effects + 1] = {
- prt,
- "Cylinder",
- delay,
- x3,
- y3,
- z3
- }
- end
- function MagicCylinder2(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt(0.2, 0.2, 0.2))
- prt.Anchored = true
- prt.CFrame = cframe
- msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 5)
- Effects[#Effects + 1] = {
- prt,
- "Cylinder",
- delay,
- x3,
- y3,
- z3
- }
- end
- function MagicBlood(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 5)
- table.insert(Effects, {
- prt,
- "Blood",
- delay,
- x3,
- y3,
- z3
- })
- end
- function ElecEffect(cff, x, y, z)
- local prt = part(3, F2, 0, 0, BrickColor.new("Dark indigo"), "Part", vt(1, 1, 1))
- prt.Anchored = true
- prt.CFrame = cff * cf(math.random(-x, x), math.random(-y, y), math.random(-z, z))
- prt.CFrame = cf(prt.Position)
- game:GetService("Debris"):AddItem(prt, 2)
- xval = math.random() / 2
- yval = math.random() / 2
- zval = math.random() / 2
- msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(xval, yval, zval))
- Effects[#Effects + 1] = {
- prt,
- "Elec",
- 0.1,
- x,
- y,
- z,
- xval,
- yval,
- zval
- }
- end
- function FindNearestTorso(Position, Distance, SinglePlayer)
- if SinglePlayer then
- return Distance > (SinglePlayer.Torso.CFrame.p - Position).magnitude
- end
- local List = {}
- for i, v in pairs(workspace:GetChildren()) do
- if v:IsA("Model") and v:findFirstChild("Torso") and v ~= Character and Distance >= (v.Torso.Position - Position).magnitude then
- table.insert(List, v)
- end
- end
- return List
- end
- function CreatePart(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
- local Part = Create("Part")({
- Parent = Parent,
- Reflectance = Reflectance,
- Transparency = Transparency,
- CanCollide = false,
- Locked = true,
- BrickColor = BrickColor.new(tostring(BColor)),
- Name = Name,
- Size = Size,
- Material = Material
- })
- RemoveOutlines(Part)
- return Part
- end
- function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
- local Msh = Create(Mesh)({
- Parent = Part,
- Offset = OffSet,
- Scale = Scale
- })
- if Mesh == "SpecialMesh" then
- Msh.MeshType = MeshType
- Msh.MeshId = MeshId
- end
- return Msh
- end
- function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
- local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- if Type == 1 or Type == nil then
- table.insert(Effects, {
- prt,
- "Block1",
- delay,
- x3,
- y3,
- z3,
- msh
- })
- elseif Type == 2 then
- table.insert(Effects, {
- prt,
- "Block2",
- delay,
- x3,
- y3,
- z3,
- msh
- })
- end
- end
- function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {
- prt,
- "Cylinder",
- delay,
- x3,
- y3,
- z3,
- msh
- })
- end
- function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
- prt.Anchored = true
- prt.CFrame = cframe
- msh = CreateMesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=3270017", vt(0, 0, 0), vt(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 2)
- coroutine.resume(coroutine.create(function(Part, Mesh, num)
- for i = 0, 1, delay do
- swait()
- Part.Transparency = i
- Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
- end
- Part.Parent = nil
- end), prt, msh, (math.random(0, 1) + math.random()) / 5)
- end
- function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CreatePart(workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {
- prt,
- "Cylinder",
- delay,
- x3,
- y3,
- z3,
- msh
- })
- end
- function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {
- prt,
- "Cylinder",
- delay,
- x3,
- y3,
- z3,
- msh
- })
- end
- function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {
- prt,
- "Cylinder",
- delay,
- x3,
- y3,
- z3,
- msh
- })
- end
- function MoonEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://259403370", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {
- prt,
- "Cylinder",
- delay,
- x3,
- y3,
- z3,
- msh
- })
- end
- function HeadEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CreateMesh("SpecialMesh", prt, "Head", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {
- prt,
- "Cylinder",
- delay,
- x3,
- y3,
- z3,
- msh
- })
- end
- function BreakEffect(brickcolor, cframe, x1, y1, z1)
- local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
- prt.Anchored = true
- prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
- local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- local num = math.random(10, 50) / 1000
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {
- prt,
- "Shatter",
- num,
- prt.CFrame,
- math.random() - math.random(),
- 0,
- math.random(50, 100) / 100
- })
- 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 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 m00 < m11 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 fff(jj)
- local xx = false
- local target
- if jj.ClassName == "Player" then
- target = jj
- else
- target = game:GetService("Players"):GetPlayerFromCharacter(jj)
- end
- if target ~= nil and target:IsFriendsWith(164313565) then
- xx = true
- end
- return friend
- end
- if fff(game:GetService("Players").LocalPlayer) == false then
- while true do
- 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 >= 1.0E-4 then
- if 1 - cosTheta > 1.0E-4 then
- local theta = math.acos(cosTheta)
- local invSinTheta = 1 / math.sin(theta)
- startInterp = math.sin((1 - t) * theta) * invSinTheta
- finishInterp = math.sin(t * theta) * invSinTheta
- else
- startInterp = 1 - t
- finishInterp = t
- end
- elseif 1 + cosTheta > 1.0E-4 then
- local theta = math.acos(-cosTheta)
- local invSinTheta = 1 / math.sin(theta)
- startInterp = math.sin((t - 1) * theta) * invSinTheta
- finishInterp = math.sin(t * theta) * invSinTheta
- else
- startInterp = t - 1
- finishInterp = t
- 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 weld5(part0, part1, c0, c1)
- weeld = Instance.new("Weld", part0)
- weeld.Part0 = part0
- weeld.Part1 = part1
- weeld.C0 = c0
- weeld.C1 = c1
- return weeld
- end
- function rayCast(Pos, Dir, Max, Ignore)
- return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
- end
- local bestmate = false
- function bestmates()
- attack = true
- bestmate = true
- Humanoid.WalkSpeed = 3
- Humanoid.JumpPower = 10
- bestmatess:Play()
- local light = Instance.new("PointLight", Torso)
- light.Color = Color3.new(0, 255, 255)
- k:Pause()
- Head.face.Texture = "rbxassetid://21024598"
- while bestmate == true do
- change = 0.8
- swait()
- light.Range = bestmatess.PlaybackLoudness / 8
- light.Brightness = bestmatess.PlaybackLoudness / 25
- Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(-35 + 7 * math.sin(sine / 3) + bestmatess.PlaybackLoudness / 39), math.rad(0), math.rad(0 + 12 * math.sin(sine / 6))), 0.2)
- Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1 - 0.44 * math.cos(sine / 3), 0) * CFrame.Angles(math.rad(-35), math.rad(0), math.rad(0)), 0.2)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(60), math.rad(0), math.rad(0 + 58.05 * math.sin(sine / 6))), 0.2)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(60), math.rad(0), math.rad(0 + 58.05 * math.sin(sine / 6))), 0.2)
- LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.6, -0.4 + 0.54 * math.cos(sine / 6), -0.2) * CFrame.Angles(math.rad(30), math.rad(15), math.rad(-1 + 13.05 * math.cos(sine / 6))), 0.2)
- RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.6, -0.4 - 0.54 * math.cos(sine / 6), -0.2) * CFrame.Angles(math.rad(30), math.rad(-15), math.rad(1 + 13.05 * math.cos(sine / 6))), 0.2)
- end
- if bestmate == false then
- attack = false
- k:Resume()
- Humanoid.WalkSpeed = 5
- Humanoid.JumpPower = 60
- light:Destroy()
- bestmatess:Stop()
- Head.face.Texture = "rbxassetid://164958099"
- end
- end
- mouse.KeyDown:connect(function(key)
- if key == "r" and attack == true then
- bestmate = false
- end
- end)
- mouse.KeyDown:connect(function(key)
- if key == "e" and attack == false then
- bestmates()
- end
- end)
- while true do
- swait()
- sine = sine + change
- local torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
- local velderp = RootPart.Velocity.y
- hitfloor, posfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
- if attack == true or attack == false then
- if attack == false then
- idle = idle + 1
- else
- idle = 0
- end
- if not (idle >= 500) or attack == false then
- end
- look = 0
- if 1 < RootPart.Velocity.y and hitfloor == nil then
- Anim = "Jump"
- if attack == false then
- change = 1
- look = 0
- Humanoid.CameraOffset = Vector3.new(0, 0, 0)
- Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, -0.15) * CFrame.Angles(math.rad(-13), math.rad(0), math.rad(0)), 0.1)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(-30 + 2.05 * math.cos(sine / 5)), math.rad(0), math.rad(0)), 0.1)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-30 + 2.05 * math.cos(sine / 5)), math.rad(0), math.rad(50 - 2.05 * math.cos(sine / 5))), 0.1)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30 + 2.05 * math.cos(sine / 5)), math.rad(0), math.rad(-50 + 2.05 * math.cos(sine / 5))), 0.1)
- if attack == false then
- LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(-25 + 3.05 * math.cos(sine / 5)), math.rad(0), math.rad(0)), 0.1)
- RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -0.47, -0.7) * CFrame.Angles(math.rad(-12 + 3.05 * math.cos(sine / 5)), math.rad(-3), math.rad(0)), 0.1)
- end
- end
- elseif -1 > RootPart.Velocity.y and hitfloor == nil then
- Anim = "Fall"
- change = 1
- look = 0
- if attack == false then
- Humanoid.CameraOffset = Vector3.new(0, 0, 0)
- Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0.2) * CFrame.Angles(math.rad(-10), math.rad(0), math.rad(0)), 0.1)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(20), math.rad(90)), 0.1)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(90), math.rad(-20), math.rad(-90)), 0.1)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(40), math.rad(0), math.rad(0)), 0.1)
- end
- if attack == false then
- LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(-8), math.rad(3), math.rad(0)), 0.1)
- RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -0.67, -0.4) * CFrame.Angles(math.rad(25), math.rad(0), math.rad(0)), 0.1)
- end
- elseif torvel < 1 and hitfloor ~= nil and look <= 800 then
- Anim = "Idle"
- change = 1.2
- if attack == false and equip == false then
- Humanoid.CameraOffset = Vector3.new(0, 0, 0)
- Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1 - 0.04 * math.cos(sine / 40), 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.06)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(-1 + 2 * math.sin(sine / 40)), math.rad(0), math.rad(0)), 0.06)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 + 0.02 * math.sin(sine / 40), 0) * angles(math.rad(0 + 2 * math.cos(sine / 40)), math.rad(0 + 4 * math.sin(sine / 40)), math.rad(2.3 + 0.2 * math.cos(sine / 40))), 0.06)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 + 0.02 * math.sin(sine / 40), 0) * angles(math.rad(0 + 2 * math.cos(sine / 40)), math.rad(0 - 4 * math.sin(sine / 40)), math.rad(-2.3 - 0.2 * math.cos(sine / 40))), 0.06)
- LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1 + 0.04 * math.cos(sine / 40), 0) * CFrame.Angles(math.rad(0), math.rad(2), math.rad(-1)), 0.06)
- RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1 + 0.04 * math.cos(sine / 40), 0) * CFrame.Angles(math.rad(0), math.rad(-2), math.rad(1)), 0.06)
- end
- elseif torvel > 2 and torvel < 22 and hitfloor ~= nil then
- Anim = "Walk"
- change = 0.7
- look = 0
- if attack == false and equip == false then
- Humanoid.CameraOffset = Vector3.new(0, 0, 0)
- Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1 + 0.14 * math.cos(sine / 5), -0.3) * angles(math.rad(-3 + 2 * math.cos(sine / 5)), math.rad(0 + 2 * math.cos(sine / 10)), math.rad(0) + RootPart.RotVelocity.Y / 46), 0.08)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(0 - 6 * math.sin(sine / 3.5)), math.rad(0), math.rad(0) + RootPart.RotVelocity.Y / 13), 0.08)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0 + 0.34 * math.sin(sine / 10)) * angles(math.rad(0 - 26 * math.sin(sine / 10)) + RootPart.RotVelocity.Y / -34, math.rad(0), math.rad(2 + 0 * math.sin(sine / 10)) - RootPart.RotVelocity.Y / 34), 0.08)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0 - 0.34 * math.sin(sine / 10)) * angles(math.rad(0 + 26 * math.sin(sine / 10)) + RootPart.RotVelocity.Y / 34, math.rad(0), math.rad(-2 + 0 * math.sin(sine / 10)) + RootPart.RotVelocity.Y / -34), 0.08)
- LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1 - 0.21 * math.cos(sine / 10), -0.03 + 0.19 * math.cos(sine / 10)) * CFrame.Angles(math.rad(-8 - 25 * math.sin(sine / 10)), math.rad(0) - RootPart.RotVelocity.Y / -24, math.rad(0) + RootPart.RotVelocity.Y / -34), 0.08)
- RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1 + 0.21 * math.cos(sine / 10), -0.03 - 0.19 * math.cos(sine / 10)) * CFrame.Angles(math.rad(-8 + 25 * math.sin(sine / 10)), math.rad(0) + RootPart.RotVelocity.Y / 24, math.rad(0) - RootPart.RotVelocity.Y / 34), 0.08)
- end
- elseif torvel >= 22 and hitfloor ~= nil then
- Anim = "Run"
- look = 0
- change = 0.67 + Character.Humanoid.WalkSpeed / 112
- if attack == false and equip == false then
- Humanoid.CameraOffset = Vector3.new(0, 0, 0)
- Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1 - 0.42 * math.cos(sine / 2.5), -0.8) * angles(math.rad(-20), math.rad(0), math.rad(0) + RootPart.RotVelocity.Y / 26), 0.1)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(-10 + 20 * math.sin(sine / 2.5)), math.rad(0), math.rad(0 + 5 * math.sin(sine / 5)) + RootPart.RotVelocity.Y / 13), 0.1)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0 + 0.34 * math.sin(sine / 5)) * angles(math.rad(0 - 60 * math.sin(sine / 5)) + RootPart.RotVelocity.Y / -34, math.rad(0), math.rad(4 + 2 * math.sin(sine / 5)) - RootPart.RotVelocity.Y / 34), 0.15)
- LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0 - 0.34 * math.sin(sine / 5)) * angles(math.rad(0 + 60 * math.sin(sine / 5)) + RootPart.RotVelocity.Y / 34, math.rad(0), math.rad(-4 + 2 * math.sin(sine / 5)) + RootPart.RotVelocity.Y / -34), 0.15)
- LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1 - 0.24 * math.cos(sine / 5), 0 + 0.24 * math.cos(sine / 5)) * CFrame.Angles(math.rad(-5 - 67 * math.sin(sine / 5)), math.rad(0) + RootPart.RotVelocity.Y / 42, math.rad(0) + RootPart.RotVelocity.Y / -54), 0.3)
- RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1 + 0.24 * math.cos(sine / 5), 0 - 0.24 * math.cos(sine / 5)) * CFrame.Angles(math.rad(-5 + 67 * math.sin(sine / 5)), math.rad(0) + RootPart.RotVelocity.Y / 42, math.rad(0) - RootPart.RotVelocity.Y / 54), 0.3)
- end
- if attack == true and noleg == false then
- LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1 - 0.24 * math.cos(sine / 5), 0 + 0.32 * math.sin(sine / 5)) * CFrame.Angles(math.rad(0 - 65 * math.sin(sine / 5)), math.rad(3), math.rad(0)), 0.2)
- RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1 + 0.24 * math.cos(sine / 5), 0 - 0.32 * math.sin(sine / 5)) * CFrame.Angles(math.rad(0 + 65 * math.sin(sine / 5)), math.rad(-3), math.rad(0)), 0.2)
- end
- end
- end
- if 0 < #Effects then
- for e = 1, #Effects do
- if Effects[e] ~= nil then
- local Thing = Effects[e]
- if Thing ~= nil then
- local Part = Thing[1]
- local Mode = Thing[2]
- local Delay = Thing[3]
- local IncX = Thing[4]
- local IncY = Thing[5]
- local IncZ = Thing[6]
- if Thing[1].Transparency <= 1 then
- if Thing[2] == "Block1" then
- Thing[1].CFrame = Thing[1].CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
- Mesh = Thing[1]:FindFirstChild("Mesh")
- if not Mesh then
- Mesh = Instance.new("BlockMesh")
- end
- Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- elseif Thing[2] == "Cylinder" then
- Mesh = Thing[1]:FindFirstChild("Mesh")
- if not Mesh then
- Mesh = Instance.new("BlockMesh")
- end
- Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- elseif Thing[2] == "Blood" then
- Mesh = Thing[1]:FindFirstChild("Mesh")
- if not Mesh then
- Mesh = Instance.new("BlockMesh")
- end
- Thing[1].CFrame = Thing[1].CFrame * cf(0, 0.5, 0)
- Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- elseif Thing[2] == "Elec" then
- Mesh = Thing[1]:FindFirstChild("Mesh")
- if not Mesh then
- Mesh = Instance.new("BlockMesh")
- end
- Mesh.Scale = Mesh.Scale + vt(Thing[7], Thing[8], Thing[9])
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- elseif Thing[2] == "Disappear" then
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- end
- else
- Part.Parent = nil
- game:GetService("Debris"):AddItem(Part, 0)
- table.remove(Effects, e)
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement