Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --FE Template
- if (game:GetService('RunService'):IsServer()) then return error('This script cannot be ran server-sided, please use hl/',0); end;
- local remote = NS ([=[
- wait(2)
- wait(1/60)
- warn([[Autumn 2019 Base
- Mainly made by Lunnekoo (For all the base and all that), Then also "Made" by LocalPlayer
- EzConvert by Drahazar
- ]])
- --- its obs smooth af do not touch
- ---- Sources and functions might be taken from others
- plr = owner
- char = plr.Character
- hum = char.Humanoid
- local cam = game.Workspace.CurrentCamera
- flyingmode = false
- Camera = cam
- local CamInterrupt = false
- local TwoD = false
- local TargetInfo = {nil, nil}
- cam.CameraType = "Custom"
- t = char.Torso
- h = char.Head
- ra = char["Right Arm"]
- la = char["Left Arm"]
- rl = char["Right Leg"]
- ll = char["Left Leg"]
- tors = char.Torso
- lleg = char["Left Leg"]
- root = char.HumanoidRootPart
- hed = char.Head
- rleg = char["Right Leg"]
- rarm = char["Right Arm"]
- larm = char["Left Arm"]
- radian = math.rad
- random = math.random
- Vec3 = Vector3.new
- Inst = Instance.new
- cFrame = CFrame.new
- Euler = CFrame.fromEulerAnglesXYZ
- vt = Vector3.new
- bc = BrickColor.new
- br = BrickColor.random
- it = Instance.new
- cf = CFrame.new
- Face = hed.face
- local DerpzMusic = Instance.new("Sound",char.Torso)
- DerpzMusic.SoundId = "rbxassetid://3229553339"
- DerpzMusic.Name = "DerpzMusic"
- DerpzMusic.Volume = 10
- DerpzMusic.Pitch = 1
- DerpzMusic.Looped = true
- DerpzMusic:Play()
- --Face changing functions
- function Neutral() --okthen
- Face.Texture = "rbxassetid://2755423294"
- end
- function Upset() --cri
- Face.Texture = "rbxassetid://2755479427"
- end
- function Happy() --HHHHHHHHHHHHHHHHHHHHHHHH
- Face.Texture = "rbxassetid://2755423620"
- end
- function Determined() --It'S NOt oVEr uNtIl iT'S OveR
- Face.Texture = "rbxassetid://2755480100"
- end
- function Insane() --hahahhahah
- Face.Texture = "rbxassetid://2755481010"
- end
- function Sleeping() --Yes, I did make a sleeping face.
- Face.Texture = "rbxassetid://3009289203"
- end
- function HappyMemey() --c:
- Face.Texture = "rbxassetid://3988001776"
- end
- --Face changing functions
- --Focus
- function FocusOnPlayer()
- for i,v in pairs(game:GetService("Players"):GetChildren()) do
- local var = script.Focus.Focus1:Clone()
- var.Parent = v.PlayerGui
- var.Disabled = false
- end
- end
- function FocusSideways()
- for i,v in pairs(game:GetService("Players"):GetChildren()) do
- local var = script.Focus.Focus2:Clone()
- var.Parent = v.PlayerGui
- var.Disabled = false
- end
- end
- function TestThingy() --WIP, But I don't mind
- for i,v in pairs(game:GetService("Players"):GetChildren()) do
- local var = script.Focus.asd:Clone()
- var.Parent = v.PlayerGui
- var.Disabled = false
- end
- end
- function ZoomInOnFace() --ZOOOOOOM
- for i,v in pairs(game:GetService("Players"):GetChildren()) do
- local var = script.Focus.ZoomIn:Clone()
- var.Parent = v.PlayerGui
- var.Disabled = false
- end
- end
- --Focus
- --Shaking
- function shakes(power,length)
- for i,v in pairs(game:GetService("Players"):GetChildren()) do
- local var = script.Shaker:Clone()
- var.Parent = v.Character
- local pw = var.Shakeval
- local lgth = var.MultLength
- pw.Value = power/2
- lgth.Value = length
- var.Disabled = false
- game:GetService("Debris"):AddItem(var, length+4)
- end
- end
- function localshakes(power,length)
- local var = script.Shaker:Clone()
- var.Parent = plr.Character
- local pw = var.Shakeval
- local lgth = var.MultLength
- pw.Value = power/2
- lgth.Value = length
- var.Disabled = false
- game:GetService("Debris"):AddItem(var, length+4)
- end
- function CameraEnshaking(power,length)
- for i,v in pairs(game:GetService("Players"):GetChildren()) do
- local var = script.Shaker:Clone()
- var.Parent = v.Character
- local pw = var.Shakeval
- local lgth = var.MultLength
- pw.Value = power/2
- lgth.Value = length
- var.Disabled = false
- game:GetService("Debris"):AddItem(var, length+4)
- end
- end
- --Shaking
- local Booleans = {
- CamFollow = true,
- GyroUse = true
- }
- function lerp(object, newCFrame, alpha)
- return object:lerp(newCFrame, alpha)
- end
- local Directer = Inst("BodyGyro", root)
- Directer.MaxTorque = Vec3(0, 0, 0)
- Directer.P = 600000
- local CPart = Inst("Part")
- CPart.Anchored = true
- CPart.CanCollide = false
- CPart.Locked = true
- CPart.Transparency = 1
- local rainbowmode = false
- local chaosmode = false
- aerrtee = 0
- local mutedtog = false
- local NewInstance = function(instance,parent,properties)
- local inst = Instance.new(instance,parent)
- if(properties)then
- for i,v in next, properties do
- pcall(function() inst[i] = v end)
- end
- end
- return inst;
- end
- MAINRUINCOLOR = BrickColor.new("Navy blue")
- function Create(ty)
- return function(data)
- local obj = Instance.new(ty)
- for k, v in pairs(data) do
- if type(k) == 'number' then
- v.Parent = obj
- else
- obj[k] = v
- end
- end
- return obj
- end
- end
- CFuncs = {
- ["Part"] = {
- Create = function(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;
- };
- ["Mesh"] = {
- Create = function(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;
- };
- ["Mesh"] = {
- Create = function(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;
- };
- ["Weld"] = {
- Create = function(Parent, Part0, Part1, C0, C1)
- local Weld = Create("Weld"){
- Parent = Parent,
- Part0 = Part0,
- Part1 = Part1,
- C0 = C0,
- C1 = C1,
- }
- return Weld
- end;
- };
- ["Sound"] = {
- Create = function(id, par, vol, pit)
- coroutine.resume(coroutine.create(function()
- local S = Create("Sound"){
- Volume = vol,
- Name = "EffectSoundo",
- Pitch = pit or 1,
- SoundId = id,
- Parent = par or workspace,
- }
- wait()
- S:play()
- game:GetService("Debris"):AddItem(S, 10)
- end))
- end;
- };
- ["TimeSound"] = {
- Create = function(id, par, vol, pit, timepos)
- coroutine.resume(coroutine.create(function()
- local S = Create("Sound"){
- Volume = vol,
- Name = "EffectSoundo",
- Pitch = pit or 1,
- SoundId = id,
- TimePosition = timepos,
- Parent = par or workspace,
- }
- wait()
- S:play()
- game:GetService("Debris"):AddItem(S, 10)
- end))
- end;
- };
- ["EchoSound"] = {
- Create = function(id, par, vol, pit, timepos,delays,echodelay,fedb,dryl)
- coroutine.resume(coroutine.create(function()
- local Sas = Create("Sound"){
- Volume = vol,
- Name = "EffectSoundo",
- Pitch = pit or 1,
- SoundId = id,
- TimePosition = timepos,
- Parent = par or workspace,
- }
- local E = Create("EchoSoundEffect"){
- Delay = echodelay,
- Name = "Echo",
- Feedback = fedb,
- DryLevel = dryl,
- Parent = Sas,
- }
- wait()
- Sas:play()
- game:GetService("Debris"):AddItem(Sas, delays)
- end))
- end;
- };
- ["LongSound"] = {
- Create = function(id, par, vol, pit)
- coroutine.resume(coroutine.create(function()
- local S = Create("Sound"){
- Volume = vol,
- Pitch = pit or 1,
- SoundId = id,
- Parent = par or workspace,
- }
- wait()
- S:play()
- game:GetService("Debris"):AddItem(S, 60)
- end))
- end;
- };
- ["ParticleEmitter"] = {
- Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
- local fp = Create("ParticleEmitter"){
- Parent = Parent,
- Color = ColorSequence.new(Color1, Color2),
- LightEmission = LightEmission,
- Size = Size,
- Texture = Texture,
- Transparency = Transparency,
- ZOffset = ZOffset,
- Acceleration = Accel,
- Drag = Drag,
- LockedToPart = LockedToPart,
- VelocityInheritance = VelocityInheritance,
- EmissionDirection = EmissionDirection,
- Enabled = Enabled,
- Lifetime = LifeTime,
- Rate = Rate,
- Rotation = Rotation,
- RotSpeed = RotSpeed,
- Speed = Speed,
- VelocitySpread = VelocitySpread,
- }
- return fp
- end;
- };
- CreateTemplate = {
- };
- }
- New = function(Object, Parent, Name, Data)
- local Object = Instance.new(Object)
- for Index, Value in pairs(Data or {}) do
- Object[Index] = Value
- end
- Object.Parent = Parent
- Object.Name = Name
- return Object
- end
- function CreateParta(parent,transparency,reflectance,material,brickcolor)
- local p = Instance.new("Part")
- p.TopSurface = 0
- p.BottomSurface = 0
- p.Parent = parent
- p.Size = Vector3.new(0.1,0.1,0.1)
- p.Transparency = transparency
- p.Reflectance = reflectance
- p.CanCollide = false
- p.Locked = true
- p.BrickColor = brickcolor
- p.Material = material
- return p
- end
- function CreateMesh(parent,meshtype,x1,y1,z1)
- local mesh = Instance.new("SpecialMesh",parent)
- mesh.MeshType = meshtype
- mesh.Scale = Vector3.new(x1*10,y1*10,z1*10)
- return mesh
- end
- function CreateSpecialMesh(parent,meshid,x1,y1,z1)
- local mesh = Instance.new("SpecialMesh",parent)
- mesh.MeshType = "FileMesh"
- mesh.MeshId = meshid
- mesh.Scale = Vector3.new(x1,y1,z1)
- return mesh
- end
- function CreateSpecialGlowMesh(parent,meshid,x1,y1,z1)
- local mesh = Instance.new("SpecialMesh",parent)
- mesh.MeshType = "FileMesh"
- mesh.MeshId = meshid
- mesh.TextureId = "http://www.roblox.com/asset/?id=269748808"
- mesh.Scale = Vector3.new(x1,y1,z1)
- mesh.VertexColor = Vector3.new(parent.BrickColor.r, parent.BrickColor.g, parent.BrickColor.b)
- return mesh
- end
- function CreateWeld(parent,part0,part1,C1X,C1Y,C1Z,C1Xa,C1Ya,C1Za,C0X,C0Y,C0Z,C0Xa,C0Ya,C0Za)
- local weld = Instance.new("Weld")
- weld.Parent = parent
- weld.Part0 = part0
- weld.Part1 = part1
- weld.C1 = CFrame.new(C1X,C1Y,C1Z)*CFrame.Angles(C1Xa,C1Ya,C1Za)
- weld.C0 = CFrame.new(C0X,C0Y,C0Z)*CFrame.Angles(C0Xa,C0Ya,C0Za)
- return weld
- end
- --------------
- --------------
- local sorb = CreateParta(m,1,1,"SmoothPlastic",BrickColor.random())
- CreateWeld(sorb,rarm,sorb,0,1,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0))
- local sorb2 = CreateParta(m,1,1,"SmoothPlastic",BrickColor.random())
- CreateWeld(sorb2,larm,sorb2,0,1,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0))
- local handlex = CreateParta(m,1,1,"Neon",BrickColor.Random())
- CreateMesh(handlex,"Brick",0,0,0)
- local handlexweld = CreateWeld(handlex,rarm,handlex,0,0.5,-1.05,math.rad(-30),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0))
- ------
- function RemoveOutlines(part)
- part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
- 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
- })
- Part.CustomPhysicalProperties = PhysicalProperties.new(0.001, 0.001, 0.001, 0.001, 0.001)
- RemoveOutlines(Part)
- return Part
- end
- function CreateMesha(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 CreateWeld(Parent, Part0, Part1, C0, C1)
- local Weld = Create("Weld")({
- Parent = Parent,
- Part0 = Part0,
- Part1 = Part1,
- C0 = C0,
- C1 = C1
- })
- return Weld
- end
- Player = plr
- Character=Player.Character
- PlayerGui=Player.PlayerGui
- Backpack=Player.Backpack
- Torso=Character.Torso
- Head=Character.Head
- Humanoid=Character.Humanoid
- m=Instance.new('Model',Character)
- 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
- vt=Vector3.new
- cf=CFrame.new
- euler=CFrame.fromEulerAnglesXYZ
- angles=CFrame.Angles
- cloaked=false
- 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
- deb=false
- equipped=true
- hand=false
- MMouse=nil
- combo=0
- mana=0
- trispeed=.2
- attackmode='none'
- local idle=0
- local Anim="Idle"
- local Effects={}
- local gun=false
- local shoot=false
- local sine = 0
- local change = 1
- local toggleTag = true
- local txt = Instance.new("BillboardGui", Head)
- txt.Adornee = nil
- txt.Name = "NameDetect"
- txt.Size = UDim2.new(4, 0, 1.2, 0)
- txt.StudsOffset = Vector3.new(-8, 5.333333333333333, 0)
- local text = Instance.new("TextLabel", txt)
- text.Size = UDim2.new(5, 0, 3.5, 0)
- text.FontSize = "Size8"
- text.TextScaled = true
- text.TextTransparency = 0
- text.BackgroundTransparency = 1
- text.TextTransparency = 0
- text.TextStrokeTransparency = 0
- text.Font = "Arcade"
- text.TextStrokeColor3 = Color3.fromRGB(0,0,100)
- text.TextColor3 = Color3.fromRGB(0,0,255)
- text.Text = "Derpz"
- --GUI STUFF
- gui = script.Main
- gui.Parent = plr.PlayerGui
- MainFrame = gui.Main
- --save shoulders
- RSH, LSH=nil, nil
- --welds
- 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
- 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) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
- 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) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
- LW.C1=cf(0, 0.5, 0)
- LW.Part1=ch["Left Arm"]
- LW.Parent=ch.Torso
- local Stats=Instance.new("BoolValue")
- Stats.Name="Stats"
- Stats.Parent=Character
- local Atk=Instance.new("NumberValue")
- Atk.Name="Damage"
- Atk.Parent=Stats
- Atk.Value=1
- local Def=Instance.new("NumberValue")
- Def.Name="Defense"
- Def.Parent=Stats
- Def.Value=1
- local Speed=Instance.new("NumberValue")
- Speed.Name="Speed"
- Speed.Parent=Stats
- Speed.Value=1
- local Mvmt=Instance.new("NumberValue")
- Mvmt.Name="Movement"
- Mvmt.Parent=Stats
- Mvmt.Value=1
- local donum=0
- 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)
- fp.Material="SmoothPlastic"
- 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
- if meshid~="nil" then
- mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
- end
- 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
- local Color1=Torso.BrickColor
- local bodvel=Instance.new("BodyVelocity")
- local bg=Instance.new("BodyGyro")
- --------- SazEreno's Artificial HB --------------
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "ArtificialHB"
- script:WaitForChild("ArtificialHB")
- Frame_Speed = 1 / 60
- 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
- script.ArtificialHB:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.ArtificialHB:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- wait()
- --[Head movement core]
- local Ang = CFrame.Angles
- local aSin = math.asin
- local aTan = math.atan
- --[Constants]:
- local Cam = cam
- local Plr = plr
- local Mouse = mouse
- local Body = Plr.Character
- local Head = hed
- local Hum = hum
- local Core = Body:WaitForChild("HumanoidRootPart")
- local IsR6 = (Hum.RigType.Value==0)
- local Trso = (IsR6 and Body:WaitForChild("Torso")) or Body:WaitForChild("UpperTorso")
- local Neck = (IsR6 and Trso:WaitForChild("Neck")) or Head:WaitForChild("Neck")
- local Waist = (not IsR6 and Trso:WaitForChild("Waist"))
- local MseGuide = true
- local TurnCharacterToMouse = false
- local HeadHorFactor = 1
- local HeadVertFactor = 0.6
- local BodyHorFactor = 0.5
- local BodyVertFactor = 0.4
- local UpdateSpeed = 0.1
- local NeckOrgnC0 = Neck.C0
- local WaistOrgnC0 = (not IsR6 and Waist.C0)
- --[Setup]:
- Neck.MaxVelocity = 1/3
- -- Activation]:
- if TurnCharacterToMouse == true then
- MseGuide = true
- HeadHorFactor = 0
- BodyHorFactor = 0
- end
- remote = Instance.new 'RemoteFunction';
- remote.Parent = script;
- remote.OnServerInvoke = function (player, request, ...)
- if (player ~= owner) then
- return error ('You cannot invoke this remote', 0);
- end;
- if (request == 1) then
- ob1d()
- end
- if (request == 2) then
- local k = ...;
- key(k)
- end;
- if (request == 3) then
- end
- if (request == 4) then
- end;
- if (request == 5) then
- end;
- if (request == 6) then
- local k = ...;
- key2(k)
- end;
- end
- remote.Name = 'ServerRemote';
- function getMouseHit()
- return remote:InvokeClient (owner, 1);
- end;
- game:GetService("RunService").Stepped:Connect(function()
- local CamCF = Cam.CoordinateFrame
- if ((IsR6 and Body["Torso"]) or Body["UpperTorso"])~=nil and Body["Head"]~=nil then
- local TrsoLV = Trso.CFrame.lookVector
- local HdPos = Head.CFrame.p
- if IsR6 and Neck or Neck and Waist then
- if UpdateSpeed == 0.1 then
- local Dist = nil;
- local Diff = nil;
- if not MseGuide then
- Dist = (Head.CFrame.p-CamCF.p).magnitude
- Diff = Head.CFrame.Y-CamCF.Y
- if not IsR6 then
- Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang((aSin(Diff/Dist)*HeadVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor, 0), UpdateSpeed/2)
- Waist.C0 = Waist.C0:lerp(WaistOrgnC0*Ang((aSin(Diff/Dist)*BodyVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*BodyHorFactor, 0), UpdateSpeed/2)
- else
- Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang(-(aSin(Diff/Dist)*HeadVertFactor), 0, -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor),UpdateSpeed/2)
- end
- else
- local Point = getMouseHit()
- Dist = (Head.CFrame.p-Point).magnitude
- Diff = Head.CFrame.Y-Point.Y
- if not IsR6 then
- Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang(-(aTan(Diff/Dist)*HeadVertFactor), (((HdPos-Point).Unit):Cross(TrsoLV)).Y*HeadHorFactor, 0), UpdateSpeed/2)
- Waist.C0 = Waist.C0:lerp(WaistOrgnC0*Ang(-(aTan(Diff/Dist)*BodyVertFactor), (((HdPos-Point).Unit):Cross(TrsoLV)).Y*BodyHorFactor, 0), UpdateSpeed/2)
- else
- Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang((aTan(Diff/Dist)*HeadVertFactor), 0, (((HdPos-Point).Unit):Cross(TrsoLV)).Y*HeadHorFactor), UpdateSpeed/2)
- end
- end
- end
- end
- end
- if TurnCharacterToMouse == true then
- Hum.AutoRotate = false
- Core.CFrame = Core.CFrame:lerp(CFrame.new(Core.Position, Vector3.new(getMouseHit().x, Core.Position.Y, getMouseHit().z)), UpdateSpeed / 2)
- else
- Hum.AutoRotate = true
- end
- end)
- ------------------
- function swait(num)
- if num == 0 or num == nil then
- ArtificialHB.Event:wait()
- else
- for i = 1, num do
- ArtificialHB.Event:wait()
- end
- end
- end
- -------- RAINBOW LEAVE IT TO ME
- local r = 255
- local g = 0
- local b = 0
- coroutine.resume(coroutine.create(function()
- while wait() do
- for i = 0, 254/5 do
- swait()
- g = g + 5
- end
- for i = 0, 254/5 do
- swait()
- r = r - 5
- end
- for i = 0, 254/5 do
- swait()
- b = b + 5
- end
- for i = 0, 254/5 do
- swait()
- g = g - 5
- end
- for i = 0, 254/5 do
- swait()
- r = r + 5
- end
- for i = 0, 254/5 do
- swait()
- b = b - 5
- end
- end
- end))
- so = function(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
- swait()
- sou:play()
- game:GetService("Debris"):AddItem(sou,6)
- end))
- 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 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 = 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
- else
- if (1+cosTheta) > 0.0001 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
- 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
- local function CFrameFromTopBack(at, top, back)
- local right = top:Cross(back)
- return CFrame.new(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
- function Triangle(a, b, c)
- local edg1 = (c-a):Dot((b-a).unit)
- local edg2 = (a-b):Dot((c-b).unit)
- local edg3 = (b-c):Dot((a-c).unit)
- if edg1 <= (b-a).magnitude and edg1 >= 0 then
- a, b, c = a, b, c
- elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
- a, b, c = b, c, a
- elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
- a, b, c = c, a, b
- else
- assert(false, "unreachable")
- end
- local len1 = (c-a):Dot((b-a).unit)
- local len2 = (b-a).magnitude - len1
- local width = (a + (b-a).unit*len1 - c).magnitude
- local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
- local list = {}
- if len1 > 0.01 then
- local w1 = Instance.new('WedgePart', m)
- game:GetService("Debris"):AddItem(w1,5)
- w1.Material = "SmoothPlastic"
- w1.FormFactor = 'Custom'
- w1.BrickColor = BrickColor.new("Really red")
- w1.Transparency = 0
- w1.Reflectance = 0
- w1.Material = "SmoothPlastic"
- w1.CanCollide = false
- local l1 = Instance.new("PointLight",w1)
- l1.Color = Color3.new(170,0,0)
- NoOutline(w1)
- local sz = Vector3.new(0.2, width, len1)
- w1.Size = sz
- local sp = Instance.new("SpecialMesh",w1)
- sp.MeshType = "Wedge"
- sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
- w1:BreakJoints()
- w1.Anchored = true
- w1.Parent = workspace
- w1.Transparency = 0.7
- table.insert(Effects,{w1,"Disappear",.01})
- w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
- table.insert(list,w1)
- end
- if len2 > 0.01 then
- local w2 = Instance.new('WedgePart', m)
- game:GetService("Debris"):AddItem(w2,5)
- w2.Material = "SmoothPlastic"
- w2.FormFactor = 'Custom'
- w2.BrickColor = BrickColor.new("Really red")
- w2.Transparency = 0
- w2.Reflectance = 0
- w2.Material = "SmoothPlastic"
- w2.CanCollide = false
- local l2 = Instance.new("PointLight",w2)
- l2.Color = Color3.new(170,0,0)
- NoOutline(w2)
- local sz = Vector3.new(0.2, width, len2)
- w2.Size = sz
- local sp = Instance.new("SpecialMesh",w2)
- sp.MeshType = "Wedge"
- sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
- w2:BreakJoints()
- w2.Anchored = true
- w2.Parent = workspace
- w2.Transparency = 0.7
- table.insert(Effects,{w2,"Disappear",.01})
- w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
- table.insert(list,w2)
- end
- return unpack(list)
- end
- function getAttachment0(character, attachmentName)
- for _,child in next,character:GetChildren() do
- local attachment = child:FindFirstChild(attachmentName)
- if attachment then
- return attachment
- end
- end
- end
- 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
- function ArtificialHitbox(Part)
- local HITBOX = CreatePart(3, Part, "Metal", 0, 1, "Really black", "Hitbox", Part.Size/2, false)
- HITBOX.CanCollide = true
- HITBOX.CFrame = Part.CFrame
- weldBetween(Part,HITBOX)
- end
- function ragdollJoint(character, 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
- function R15Ragdoll(character,KeepArms)
- character:BreakJoints()
- coroutine.resume(coroutine.create(function()
- 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)
- for _,child in next,character:GetChildren() do
- if child:IsA("Accoutrement") then
- for _,part in next,child:GetChildren() do
- if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
- local attachment1 = part:FindFirstChildOfClass("Attachment")
- local attachment0 = getAttachment0(character,attachment1.Name)
- 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 = character
- end
- ArtificialHitbox(part)
- elseif part.Name == "HumanoidRootPart" then
- part:remove()
- end
- end
- end
- end
- ragdollJoint(character,character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
- {"LimitsEnabled",true};
- {"UpperAngle",5};
- })
- if character:FindFirstChild("Head") then
- ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "BallSocket", {
- {"LimitsEnabled",true};
- {"UpperAngle",15};
- })
- end
- local handProperties = {
- {"LimitsEnabled", true};
- {"UpperAngle",0};
- {"LowerAngle",0};
- }
- ragdollJoint(character,character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
- ragdollJoint(character,character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
- local shinProperties = {
- {"LimitsEnabled", true};
- {"UpperAngle", 0};
- {"LowerAngle", -75};
- }
- ragdollJoint(character,character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
- ragdollJoint(character,character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
- local footProperties = {
- {"LimitsEnabled", true};
- {"UpperAngle", 15};
- {"LowerAngle", -45};
- }
- ragdollJoint(character,character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
- ragdollJoint(character,character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
- if KeepArms == true then
- ragdollJoint(character,character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
- ragdollJoint(character,character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
- ragdollJoint(character,character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
- ragdollJoint(character,character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
- end
- ragdollJoint(character,character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
- ragdollJoint(character,character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
- game:GetService("Debris"):AddItem(character,50)
- end))
- end
- function Ragdoll(Character2,CharTorso,KeepArms)
- coroutine.resume(coroutine.create(function()
- Character2:BreakJoints()
- local hum = Character2:findFirstChild("Humanoid")
- hum:remove()
- local function Scan(ch)
- local e
- for e = 1,#ch do
- Scan(ch[e]:GetChildren())
- if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
- ch[e]:remove()
- end
- end
- end
- local NEWHUM = Instance.new("Humanoid")
- NEWHUM.Name = "Corpse"
- NEWHUM.Health = 0
- NEWHUM.MaxHealth = 0
- NEWHUM.PlatformStand = true
- NEWHUM.Parent = Character2
- NEWHUM.DisplayDistanceType = "None"
- local ch = Character2:GetChildren()
- local i
- for i = 1,#ch do
- if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
- ch[i]:remove()
- end
- end
- local Torso2 = Character2.Torso
- local movevector = Vector3.new()
- if Torso2 then
- movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector
- local Head = Character2:FindFirstChild("Head")
- if Head then
- local Neck = Instance.new("Weld")
- Neck.Name = "Neck"
- Neck.Part0 = Torso2
- Neck.Part1 = Head
- Neck.C0 = CFrame.new(0, 1.5, 0)
- Neck.C1 = CFrame.new()
- Neck.Parent = Torso2
- end
- local Limb = Character2:FindFirstChild("Right Arm")
- if Limb and KeepArms == true then
- Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "RightShoulder"
- Joint.Part0 = Torso2
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.Parent = Torso2
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character2
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- local Limb = Character2:FindFirstChild("Left Arm")
- if Limb and KeepArms == true then
- Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "LeftShoulder"
- Joint.Part0 = Torso2
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.Parent = Torso2
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character2
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- local Limb = Character2:FindFirstChild("Right Leg")
- if Limb then
- Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "RightHip"
- Joint.Part0 = Torso2
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.Parent = Torso2
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character2
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- local Limb = Character2:FindFirstChild("Left Leg")
- if Limb then
- Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "LeftHip"
- Joint.Part0 = Torso2
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.Parent = Torso2
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character2
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- --[
- local Bar = Instance.new("Part")
- Bar.TopSurface = 0
- Bar.BottomSurface = 0
- Bar.formFactor = "Symmetric"
- Bar.Size = Vector3.new(1, 1, 1)
- Bar.Transparency = 1
- Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0)
- Bar.Parent = Character2
- local Weld = Instance.new("Weld")
- Weld.Part0 = Torso2
- Weld.Part1 = Bar
- Weld.C0 = CFrame.new(0, 0.5, 0)
- Weld.Parent = Torso2
- --]]
- end
- Character2.Parent = workspace
- game:GetService("Debris"):AddItem(Character2,90)
- return Character2,Torso2
- end))
- end
- function Damagefunc(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
- if hit.Parent == nil then
- return
- end
- local h = hit.Parent:FindFirstChildOfClass("Humanoid")
- for _, v in pairs(hit.Parent:children()) do
- if v:IsA("Humanoid") then
- h = v
- end
- end
- if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Head") ~= nil then
- if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then
- return
- end
- c = Instance.new("ObjectValue")
- c.Name = "creator"
- c.Value = Player
- c.Parent = h
- game:GetService("Debris"):AddItem(c, 0.5)
- if HitSound ~= nil and HitPitch ~= nil then
- CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
- end
- local Damage = math.random(minim, maxim)
- local blocked = false
- local block = hit.Parent:findFirstChild("Block")
- if block ~= nil and block.className == "IntValue" and block.Value > 0 then
- blocked = true
- block.Value = block.Value - 1
- print(block.Value)
- end
- if blocked == false then
- HitHealth = h.Health
- h.MaxHealth = 60
- if char:FindFirstChild("ur screwed now") then
- h.Health = h.Health - Damage*16500
- else
- h.Health = h.Health - Damage
- end
- if HitHealth ~= h.Health and HitHealth ~= 0 and 0 >= h.Health then
- print("gained kill")
- if h.Parent:FindFirstChild("Torso") then
- h.Parent:FindFirstChild("Torso").CFrame = h.Parent:FindFirstChild("Torso").CFrame * angles(math.rad(2), math.rad(0), math.rad(0))
- Ragdoll(h.Parent,Torso,true)
- elseif h.Parent:FindFirstChild("UpperTorso") then
- R15Ragdoll(h.Parent,true)
- end
- end
- ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color)
- else
- h.Health = h.Health - Damage*16500
- ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color)
- end
- if Type == "Knockdown" then
- local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
- hum.PlatformStand = true
- coroutine.resume(coroutine.create(function(HHumanoid)
- swait(1)
- if hum.Name ~= "Corpse" then
- HHumanoid.PlatformStand = false
- else
- end
- end), hum)
- local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit
- local bodvol = Create("BodyVelocity")({
- velocity = angle * knockback,
- P = 5000,
- maxForce = Vector3.new(8000, 8000, 8000),
- Parent = hit
- })
- local rl = Create("BodyAngularVelocity")({
- P = 3000,
- maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
- angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
- Parent = hit
- })
- game:GetService("Debris"):AddItem(bodvol, 0.5)
- game:GetService("Debris"):AddItem(rl, 0.5)
- elseif Type == "Normal" then
- local vp = Create("BodyVelocity")({
- P = 500,
- maxForce = Vector3.new(math.huge, 0, math.huge),
- velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
- })
- if knockback > 0 then
- vp.Parent = hit.Parent.Head
- end
- game:GetService("Debris"):AddItem(vp, 0.5)
- elseif Type == "Up" then
- local bodyVelocity = Create("BodyVelocity")({
- velocity = Vector3.new(0, 20, 0),
- P = 5000,
- maxForce = Vector3.new(8000, 8000, 8000),
- Parent = hit
- })
- game:GetService("Debris"):AddItem(bodyVelocity, 0.5)
- local bodyVelocity = Create("BodyVelocity")({
- velocity = Vector3.new(0, 20, 0),
- P = 5000,
- maxForce = Vector3.new(8000, 8000, 8000),
- Parent = hit
- })
- game:GetService("Debris"):AddItem(bodyVelocity, 1)
- elseif Type == "Leech" then
- local hum = hit.Parent.Humanoid
- if hum ~= nil then
- for i = 0, 2 do
- -- Effects.Sphere.Create(BrickColor.new("Bright red"), hit.Parent.Torso.CFrame * cn(0, 0, 0) * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 15, 1, 0, 5, 0, 0.02)
- end
- Humanoid.Health = Humanoid.Health + 10
- end
- elseif Type == "UpKnock" then
- local hum = hit.Parent.Humanoid
- hum.PlatformStand = true
- if hum ~= nil then
- hitr = true
- end
- coroutine.resume(coroutine.create(function(HHumanoid)
- swait(5)
- HHumanoid.PlatformStand = false
- hitr = false
- end), hum)
- local bodyVelocity = Create("BodyVelocity")({
- velocity = Vector3.new(0, 20, 0),
- P = 5000,
- maxForce = Vector3.new(8000, 8000, 8000),
- Parent = hit
- })
- game:GetService("Debris"):AddItem(bodyVelocity, 0.5)
- local bodyVelocity = Create("BodyVelocity")({
- velocity = Vector3.new(0, 20, 0),
- P = 5000,
- maxForce = Vector3.new(8000, 8000, 8000),
- Parent = hit
- })
- game:GetService("Debris"):AddItem(bodyVelocity, 1)
- elseif Type == "Snare" then
- local bp = Create("BodyPosition")({
- P = 2000,
- D = 100,
- maxForce = Vector3.new(math.huge, math.huge, math.huge),
- position = hit.Parent.Torso.Position,
- Parent = hit.Parent.Torso
- })
- game:GetService("Debris"):AddItem(bp, 1)
- elseif Type == "Slashnare" then
- -- Effects.Block.Create(BrickColor.new("Pastel Blue"), hit.Parent.Torso.CFrame * cn(0, 0, 0), 15*4, 15*4, 15*4, 3*4, 3*4, 3*4, 0.07)
- for i = 1, math.random(4, 5) do
- -- Effects.Sphere.Create(BrickColor.new("Teal"), hit.Parent.Torso.CFrame * cn(math.random(-5, 5), math.random(-5, 5), math.random(-5, 5)) * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 15, 1, 0, 5, 0, 0.02)
- end
- local bp = Create("BodyPosition")({
- P = 2000,
- D = 100,
- maxForce = Vector3.new(math.huge, math.huge, math.huge),
- position = hit.Parent.Torso.Position,
- Parent = hit.Parent.Torso
- })
- game:GetService("Debris"):AddItem(bp, 1)
- elseif Type == "Spike" then
- -- CreateBigIceSword(hit.Parent.Torso.CFrame)
- local bp = Create("BodyPosition")({
- P = 2000,
- D = 100,
- maxForce = Vector3.new(math.huge, math.huge, math.huge),
- position = hit.Parent.Torso.Position,
- Parent = hit.Parent.Torso
- })
- game:GetService("Debris"):AddItem(bp, 1)
- elseif Type == "Freeze" then
- local BodPos = Create("BodyPosition")({
- P = 50000,
- D = 1000,
- maxForce = Vector3.new(math.huge, math.huge, math.huge),
- position = hit.Parent.Torso.Position,
- Parent = hit.Parent.Torso
- })
- local BodGy = Create("BodyGyro")({
- maxTorque = Vector3.new(400000, 400000, 400000) * math.huge,
- P = 20000,
- Parent = hit.Parent.Torso,
- cframe = hit.Parent.Torso.CFrame
- })
- hit.Parent.Torso.Anchored = true
- coroutine.resume(coroutine.create(function(Part)
- swait(1.5)
- Part.Anchored = false
- end), hit.Parent.Torso)
- game:GetService("Debris"):AddItem(BodPos, 3)
- game:GetService("Debris"):AddItem(BodGy, 3)
- end
- local debounce = Create("BoolValue")({
- Name = "DebounceHit",
- Parent = hit.Parent,
- Value = true
- })
- game:GetService("Debris"):AddItem(debounce, Delay)
- c = Instance.new("ObjectValue")
- c.Name = "creator"
- c.Value = Player
- c.Parent = h
- game:GetService("Debris"):AddItem(c, 0.5)
- 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 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
- })
- Part.CustomPhysicalProperties = PhysicalProperties.new(0.001, 0.001, 0.001, 0.001, 0.001)
- RemoveOutlines(Part)
- return Part
- end
- function ShowDamage(Pos, Text, Time, Color)
- coroutine.resume(coroutine.create(function()
- local Rate = 0.03333333333333333
- local Pos = Pos or Vector3.new(0, 0, 0)
- local Text = Text or ""
- local Color = Color or Color3.new(1, 0, 1)
- local EffectPart = CreatePart(Character, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
- EffectPart.Anchored = true
- EffectPart.CFrame = CFrame.new(Pos)
- local BillboardGui = Create("BillboardGui")({
- Size = UDim2.new(6, 0, 6, 0),
- Adornee = EffectPart,
- Parent = EffectPart,
- AlwaysOnTop=true,
- Active=true
- })
- local TextLabel = Create("TextLabel")({
- BackgroundTransparency = 1,
- AnchorPoint=Vector2.new(.5,.5),
- Position = UDim2.new(.5, 0, .5, 0),
- Size = UDim2.new(1, 0, 1, 0),
- Text = Text,
- TextColor3 = MAINRUINCOLOR.Color,
- TextStrokeColor3 = Color3.new(0,0,0),
- TextStrokeTransparency=0,
- TextScaled = true,
- Font = "Arcade",
- Parent = BillboardGui,
- ZIndex=4,
- })
- local raise=.2
- local rot=math.random(-10,10)/15
- local aaa=math.random(-360,360)
- local bbb=math.random(-360,360)
- for aaa=0,2.7,.01 do
- swait()
- raise=raise-.008
- TextLabel.Rotation = TextLabel.Rotation+rot
- TextLabel.TextTransparency=aaa
- TextLabel.TextStrokeTransparency=aaa
- EffectPart.Position=EffectPart.Position+Vector3.new(0,raise,0)
- end
- wait(3)
- BillboardGui:Remove()
- EffectPart:Remove()
- end))
- end
- function MagniDamage(Part, magni, mindam, maxdam, knock, Type)
- for _, c in pairs(workspace:children()) do
- local hum = c:findFirstChildOfClass("Humanoid")
- if hum ~= nil then
- local head = c:findFirstChild("Head")
- if head ~= nil then
- local targ = head.Position - Part.Position
- local mag = targ.magnitude
- if magni >= mag and c.Name ~= Player.Name then
- Damagefunc(head, head, mindam, maxdam, knock, Type, RootPart, 0.1, "rbxassetid://231917784", 1)
- end
- end
- end
- end
- end
- function MagniDamageWithEffect(Part, magni, mindam, maxdam, knock, Type)
- for _, c in pairs(workspace:children()) do
- local hum = c:findFirstChild("Humanoid")
- if hum ~= nil then
- local head = c:findFirstChild("Torso")
- if head ~= nil then
- local targ = head.Position - Part.Position
- local mag = targ.magnitude
- if magni >= mag and c.Name ~= Player.Name then
- --MagicBlock(BrickColor.new("Pastel light blue"),head.CFrame,5,5,5,1,1,1,0.05)
- Damagefunc(head, head, mindam, maxdam, knock, Type, RootPart, 0.1, "rbxassetid://231917784", 1)
- end
- end
- end
- end
- end
- function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
- return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
- end
- function SkullEffect(brickcolor,cframe,x1,y1,z1,delay)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=4770583",vt(0,0,0),vt(x1,y1,z1))
- --http://www.roblox.com/asset/?id=4770560
- game:GetService("Debris"):AddItem(prt,2)
- CF=prt.CFrame
- coroutine.resume(coroutine.create(function(Part,Mesh,TehCF)
- for i=0,1,0.2 do
- wait()
- Part.CFrame=CF*cf(0,0,-0.4)
- end
- for i=0,1,delay do
- wait()
- --Part.CFrame=CF*cf((math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5)
- Mesh.Scale=Mesh.Scale
- end
- for i=0,1,0.1 do
- wait()
- Part.Transparency=i
- end
- Part.Parent=nil
- end),prt,msh,CF)
- end
- function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.Material = "Neon"
- prt.CFrame=cframe
- prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,5)
- coroutine.resume(coroutine.create(function(Part,Mesh)
- for i=0,1,delay do
- swait()
- Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- Part.Transparency=i
- Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
- end
- Part.Parent=nil
- end),prt,msh)
- end
- function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype)
- local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.Material = "Neon"
- prt.CFrame=cframe
- msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,5)
- coroutine.resume(coroutine.create(function(Part,Mesh)
- local rtype = rottype
- for i=0,1,delay do
- swait()
- if rtype == 1 then
- prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
- elseif rtype == 2 then
- prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
- end
- Part.Transparency=i
- Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
- end
- Part.Parent=nil
- end),prt,msh)
- end
- function MagicSphere(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.CFrame=cframe
- prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,5)
- coroutine.resume(coroutine.create(function(Part,Mesh)
- for i=0,1,delay do
- wait()
- Part.Transparency=i
- Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
- end
- Part.Parent=nil
- end),prt,msh)
- end
- function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype)
- local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.Material = "Neon"
- prt.CFrame=cframe
- msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,5)
- coroutine.resume(coroutine.create(function(Part,Mesh)
- local rtype = rottype
- for i=0,1,delay do
- swait()
- if rtype == 1 then
- prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
- elseif rtype == 2 then
- prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
- end
- Part.Transparency=i
- Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
- end
- Part.Parent=nil
- end),prt,msh)
- end
- function MagicShock(brickcolor,cframe,x1,y1,x3,y3,delay,rottype)
- local prt=part(3,char,1,1,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.Material = "Neon"
- prt.CFrame=cframe
- local dec = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt)
- local dec2 = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt)
- msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01))
- game:GetService("Debris"):AddItem(prt,5)
- coroutine.resume(coroutine.create(function(Part,Mesh)
- local rtype = rottype
- for i=0,1,delay do
- swait()
- if rtype == 1 then
- prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
- elseif rtype == 2 then
- prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
- end
- dec.Transparency=i
- dec2.Transparency=i
- Mesh.Scale=Mesh.Scale+vt(x3,y3,0)
- end
- Part.Parent=nil
- end),prt,msh)
- end
- function MagicShockAlt(brickcolor,cframe,x1,y1,x3,y3,delay,rottype)
- local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.Material = "Neon"
- prt.CFrame=cframe
- msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01))
- game:GetService("Debris"):AddItem(prt,5)
- coroutine.resume(coroutine.create(function(Part,Mesh)
- local rtype = rottype
- for i=0,1,delay do
- swait()
- if rtype == 1 then
- prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
- elseif rtype == 2 then
- prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
- end
- prt.Transparency=i
- Mesh.Scale=Mesh.Scale+vt(x3,y3,0)
- end
- Part.Parent=nil
- end),prt,msh)
- end
- function MagicShockAltCircle(brickcolor,cframe,x1,z1,x3,z3,delay,rottype)
- local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.Material = "Neon"
- prt.CFrame=cframe
- msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,1,z1))
- game:GetService("Debris"):AddItem(prt,5)
- coroutine.resume(coroutine.create(function(Part,Mesh)
- local rtype = rottype
- for i=0,1,delay do
- swait()
- if rtype == 1 then
- prt.CFrame = prt.CFrame*CFrame.Angles(0,0.1,0)
- elseif rtype == 2 then
- prt.CFrame = prt.CFrame*CFrame.Angles(0,-0.1,0)
- end
- prt.Transparency=i
- Mesh.Scale=Mesh.Scale+vt(x3,0,z3)
- end
- Part.Parent=nil
- end),prt,msh)
- end
- function MagicShockTrailAlt(brickcolor,cframe,x1,y1,z1,x3,y3,delay,rottype)
- local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.Material = "Neon"
- prt.CFrame=cframe
- msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,5)
- coroutine.resume(coroutine.create(function(Part,Mesh)
- local rtype = rottype
- for i=0,1,delay do
- swait()
- if rtype == 1 then
- prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
- elseif rtype == 2 then
- prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
- end
- prt.Transparency=i
- Mesh.Scale=Mesh.Scale+vt(x3,y3,0)
- end
- Part.Parent=nil
- end),prt,msh)
- end
- function MagicShockTrailAlt2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype)
- local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.Material = "Neon"
- prt.CFrame=cframe
- msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,5)
- coroutine.resume(coroutine.create(function(Part,Mesh)
- local rtype = rottype
- for i=0,1,delay do
- swait()
- if rtype == 1 then
- prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
- elseif rtype == 2 then
- prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
- end
- prt.Transparency=i
- Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
- end
- Part.Parent=nil
- end),prt,msh)
- end
- function MagicBlock2(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=false
- prt.CFrame=cframe
- msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
- local wld=weld(prt,prt,Parent,cframe)
- game:GetService("Debris"):AddItem(prt,5)
- coroutine.resume(coroutine.create(function(Part,Mesh,Weld)
- for i=0,1,delay do
- wait()
- Weld.C0=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cframe
- --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- Part.Transparency=i
- Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
- end
- Part.Parent=nil
- end),prt,msh,wld)
- end
- function MagicBlock3(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=false
- prt.CFrame=cframe
- msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
- local wld=weld(prt,prt,Parent,euler(0,0,0)*cf(0,0,0))
- game:GetService("Debris"):AddItem(prt,5)
- coroutine.resume(coroutine.create(function(Part,Mesh,Weld)
- for i=0,1,delay do
- wait()
- Weld.C0=euler(i*20,0,0)
- --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- Part.Transparency=i
- Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
- end
- Part.Parent=nil
- end),prt,msh,wld)
- end
- function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,2)
- coroutine.resume(coroutine.create(function(Part,Mesh)
- for i=0,1,delay do
- wait()
- Part.CFrame=Part.CFrame
- Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
- local prt2=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt2.Anchored=true
- prt2.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- local msh2=mesh("SpecialMesh",prt2,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
- game:GetService("Debris"):AddItem(prt2,2)
- coroutine.resume(coroutine.create(function(Part,Mesh)
- for i=0,1,0.1 do
- wait()
- Part.CFrame=Part.CFrame*cf(0,0.5,0)
- end
- Part.Parent=nil
- end),prt2,msh2)
- end
- for i=0,1,delay*2 do
- wait()
- Part.CFrame=Part.CFrame
- Mesh.Scale=vt((x1+x3)-(x1+x3)*i,(y1+y3)-(y1+y3)*i,(z1+z3)-(z1+z3)*i)
- end
- Part.Parent=nil
- end),prt,msh)
- end
- function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- 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,2)
- coroutine.resume(coroutine.create(function(Part,Mesh)
- for i=0,1,delay do
- wait()
- Part.CFrame=Part.CFrame
- Part.Transparency=i
- Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
- end
- Part.Parent=nil
- end),prt,msh)
- end
- function BreakEffect(brickcolor,cframe,x1,y1,z1)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,2)
- coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb)
- CF=Part.CFrame
- Numbb=0
- randnumb=math.random()/10
- rand1=math.random()/10
- for i=0,1,rand1 do
- wait()
- CF=CF*cf(0,math.random()/2,0)
- --Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0)
- Part.CFrame=CF*euler(Numbb,0,0)
- Part.Transparency=i
- Numbb=Numbb+randnumb
- end
- Part.Parent=nil
- end),prt,CF,Numbb,randnumb)
- end
- function MagicWaveThing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.CFrame=cframe
- msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,5)
- coroutine.resume(coroutine.create(function(Part,Mesh)
- for i=0,1,delay do
- wait()
- Part.CFrame=Part.CFrame*euler(0,0.7,0)
- Part.Transparency=i
- Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
- end
- Part.Parent=nil
- end),prt,msh)
- end
- function WaveEffect(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.CFrame=cframe
- 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,2)
- coroutine.resume(coroutine.create(function(Part,Mesh)
- for i=0,1,delay do
- wait()
- Part.CFrame=Part.CFrame*cf(0,y3/2,0)
- Part.Transparency=i
- Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
- end
- Part.Parent=nil
- end),prt,msh)
- end
- function StravEffect(brickcolor,cframe,x,y,z,x1,y1,z1,delay)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.CFrame=cframe*cf(x,y,z)
- msh=mesh("SpecialMesh",prt,"FileMesh","rbxassetid://168892363",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,5)
- coroutine.resume(coroutine.create(function(Part,Mesh,ex,why,zee)
- local num=math.random()
- local num2=math.random(-3,2)+math.random()
- local numm=0
- for i=0,1,delay*2 do
- swait()
- Part.CFrame=cframe*euler(0,numm*num*10,0)*cf(ex,why,zee)*cf(-i*10,num2,0)
- Part.Transparency=i
- numm=numm+0.01
- end
- Part.Parent=nil
- Mesh.Parent=nil
- end),prt,msh,x,y,z)
- end
- function dmgstart(dmg,what)
- hitcon = what.Touched:connect(function(hit)
- local hum = hit.Parent:FindFirstChild("Humanoid")
- if hum and not hum:IsDescendantOf(Character) then
- hum:TakeDamage(dmg)
- end
- end)
- end
- function dmgstop()
- hitcon:disconnect()
- end
- function Cloak()
- Face.Parent=nil
- cloaked=true
- for _,v in pairs(Torso.Parent:children()) do
- if v.className=="Part" and v.Name~="HumanoidRootPart" then
- coroutine.resume(coroutine.create(function()
- for i=0,1,0.2 do
- wait()
- v.Transparency=i
- end
- v.Transparency=1
- end))
- end
- if v.className=="Hat" then
- hatp=v.Handle
- coroutine.resume(coroutine.create(function(derp)
- for i=0,1,0.2 do
- wait()
- derp.Transparency=i
- end
- derp.Transparency=1
- end),hatp)
- end
- end
- for _,v in pairs(m:children()) do
- if v.className=="Part" then
- coroutine.resume(coroutine.create(function()
- for i=0,1,0.2 do
- wait()
- v.Transparency=i
- end
- v.Transparency=1
- end))
- end
- end
- end
- function UnCloak()
- so("http://roblox.com/asset/?id=2767090",Torso,1,1.1)
- Face.Parent=Head
- cloaked=false
- for _,v in pairs(Torso.Parent:children()) do
- if v.className=="Part" and v.Name~="HumanoidRootPart" then
- coroutine.resume(coroutine.create(function()
- for i=0,1,0.1 do
- wait()
- v.Transparency=v.Transparency-0.1
- end
- v.Transparency=0
- end))
- end
- if v.className=="Hat" then
- hatp=v.Handle
- coroutine.resume(coroutine.create(function(derp)
- for i=0,1,0.1 do
- wait()
- derp.Transparency=derp.Transparency-0.1
- end
- derp.Transparency=0
- end),hatp)
- end
- end
- for _,v in pairs(m:children()) do
- if v.className=="Part" and v.Name~="hitbox" and v.Name~='tip' then
- coroutine.resume(coroutine.create(function()
- for i=0,1,0.1 do
- wait()
- v.Transparency=v.Transparency-0.1
- end
- v.Transparency=0
- end))
- v.Transparency=0
- end
- end
- end
- local origcolor = BrickColor.new("Pastel light blue")
- ---- This section of explosions.
- ----
- function ring(type,pos,scale,value)
- local type = type
- local rng = Instance.new("Part", char)
- rng.Anchored = true
- rng.BrickColor = origcolor
- rng.CanCollide = false
- rng.FormFactor = 3
- rng.Name = "Ring"
- rng.Size = Vector3.new(1, 1, 1)
- rng.Transparency = 0
- rng.TopSurface = 0
- rng.BottomSurface = 0
- rng.CFrame = pos
- local rngm = Instance.new("SpecialMesh", rng)
- rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
- rngm.Scale = scale
- local scaler2 = 1
- if type == "Add" then
- scaler2 = 1*value
- elseif type == "Divide" then
- scaler2 = 1/value
- end
- coroutine.resume(coroutine.create(function()
- for i = 0,10,0.1 do
- swait()
- if type == "Add" then
- scaler2 = scaler2 - 0.01*value
- elseif type == "Divide" then
- scaler2 = scaler2 - 0.01/value
- end
- rng.Transparency = rng.Transparency + 0.01
- rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, 0)
- end
- rng:Destroy()
- end))
- end
- function wave(type,pos,scale,value)
- local type = type
- local rng = Instance.new("Part", char)
- rng.Anchored = true
- rng.BrickColor = origcolor
- rng.CanCollide = false
- rng.FormFactor = 3
- rng.Name = "Ring"
- rng.Size = Vector3.new(1, 1, 1)
- rng.Transparency = 0
- rng.TopSurface = 0
- rng.BottomSurface = 0
- rng.CFrame = pos
- local rngm = Instance.new("SpecialMesh", rng)
- rngm.MeshId = "http://www.roblox.com/asset/?id=20329976"
- rngm.Scale = scale
- local scaler2 = 1
- if type == "Add" then
- scaler2 = 1*value
- elseif type == "Divide" then
- scaler2 = 1/value
- end
- coroutine.resume(coroutine.create(function()
- for i = 0,10,0.1 do
- swait()
- if type == "Add" then
- scaler2 = scaler2 - 0.01*value
- elseif type == "Divide" then
- scaler2 = scaler2 - 0.01/value
- end
- rng.Transparency = rng.Transparency + 0.01
- rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, scaler2)
- end
- rng:Destroy()
- end))
- end
- function wind(type,pos,scale,value,speed)
- local type = type
- local rng = Instance.new("Part", char)
- rng.Anchored = true
- rng.BrickColor = origcolor
- rng.CanCollide = false
- rng.FormFactor = 3
- rng.Name = "Ring"
- rng.Size = Vector3.new(1, 1, 1)
- rng.Transparency = 0
- rng.TopSurface = 0
- rng.BottomSurface = 0
- rng.CFrame = pos
- local rngm = Instance.new("SpecialMesh", rng)
- rngm.MeshId = "http://www.roblox.com/asset/?id=1051557"
- rngm.Scale = scale
- local scaler2 = 1
- if type == "Add" then
- scaler2 = 1*value
- elseif type == "Divide" then
- scaler2 = 1/value
- end
- coroutine.resume(coroutine.create(function()
- for i = 0,10,0.1 do
- swait()
- if type == "Add" then
- scaler2 = scaler2 - 0.01*value
- elseif type == "Divide" then
- scaler2 = scaler2 - 0.01/value
- end
- rng.CFrame = rng.CFrame*CFrame.Angles(0,0.025*speed,0)
- rng.Transparency = rng.Transparency + 0.01
- rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, scaler2)
- end
- rng:Destroy()
- end))
- end
- function groundwind(type,pos,scale,value,speed)
- local type = type
- local rng = Instance.new("Part", char)
- rng.Anchored = true
- rng.BrickColor = origcolor
- rng.CanCollide = false
- rng.FormFactor = 3
- rng.Name = "Ring"
- rng.Size = Vector3.new(1, 1, 1)
- rng.Transparency = 0
- rng.TopSurface = 0
- rng.BottomSurface = 0
- rng.CFrame = pos
- local rngm = Instance.new("SpecialMesh", rng)
- rngm.MeshId = "http://www.roblox.com/asset/?id=1051557"
- rngm.Scale = scale
- local scaler2 = 1
- if type == "Add" then
- scaler2 = 1*value
- elseif type == "Divide" then
- scaler2 = 1/value
- end
- coroutine.resume(coroutine.create(function()
- for i = 0,10,0.1 do
- swait()
- if type == "Add" then
- scaler2 = scaler2 - 0.01*value
- elseif type == "Divide" then
- scaler2 = scaler2 - 0.01/value
- end
- rng.CFrame = rng.CFrame*CFrame.Angles(0,0.025*speed,0)
- rng.Transparency = rng.Transparency + 0.01
- rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2/5, scaler2)
- end
- rng:Destroy()
- end))
- end
- function CameraManager()
- if TwoD and not CamInterrupt then
- if Humanoid.Health > 0 then
- Camera.CameraSubject = Humanoid
- Camera.CameraType = "Scriptable"
- Humanoid.AutoRotate = false
- if Booleans.GyroUse then
- Directer.MaxTorque = Vec3(0, huge, 0)
- else
- Directer.MaxTorque = Vec3(0, 0, 0)
- end
- if TargetInfo[1] ~= nil and TargetInfo[2] ~= nil then
- if Booleans.CamFollow then
- CPart.CFrame = cFrame(RootPart.Position, Vec3(TargetInfo[1].Position.X, RootPart.Position.Y, TargetInfo[1].Position.Z))
- Directer.CFrame = cFrame((RootPart.CFrame * cFrame(0, 0, 10)).p, TargetInfo[1].Position)
- else
- CPart.Position = RootPart.Position
- end
- else
- local ahead = (RootPart.CFrame * cFrame(0, 0, -3)).p
- CPart.CFrame = cFrame(RootPart.Position, Vec3(ahead.X, RootPart.Position.Y, ahead.Z))
- end
- Camera.CFrame = lerp(Camera.CFrame, CPart.CFrame * cFrame(25, 3, 0) * Euler(0, radian(90), 0), 0.2)
- else
- Camera.CameraSubject = Humanoid
- Camera.CameraType = "Custom"
- end
- end
- end
- function ring(type,pos,scale,value)
- local type = type
- local rng = Instance.new("Part", char)
- rng.Anchored = true
- rng.BrickColor = origcolor
- rng.CanCollide = false
- rng.FormFactor = 3
- rng.Name = "Ring"
- rng.Size = Vector3.new(1, 1, 1)
- rng.Transparency = 0
- rng.TopSurface = 0
- rng.BottomSurface = 0
- rng.CFrame = pos
- local rngm = Instance.new("SpecialMesh", rng)
- rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
- rngm.Scale = scale
- local scaler2 = 1
- if type == "Add" then
- scaler2 = 1*value
- elseif type == "Divide" then
- scaler2 = 1/value
- end
- coroutine.resume(coroutine.create(function()
- for i = 0,10,0.1 do
- swait()
- if type == "Add" then
- scaler2 = scaler2 - 0.01*value
- elseif type == "Divide" then
- scaler2 = scaler2 - 0.01/value
- end
- rng.Transparency = rng.Transparency + 0.01
- rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, 0)
- end
- rng:Destroy()
- end))
- end
- function wave(type,pos,scale,value)
- local type = type
- local rng = Instance.new("Part", char)
- rng.Anchored = true
- rng.BrickColor = origcolor
- rng.CanCollide = false
- rng.FormFactor = 3
- rng.Name = "Ring"
- rng.Size = Vector3.new(1, 1, 1)
- rng.Transparency = 0
- rng.TopSurface = 0
- rng.BottomSurface = 0
- rng.CFrame = pos
- local rngm = Instance.new("SpecialMesh", rng)
- rngm.MeshId = "http://www.roblox.com/asset/?id=20329976"
- rngm.Scale = scale
- local scaler2 = 1
- if type == "Add" then
- scaler2 = 1*value
- elseif type == "Divide" then
- scaler2 = 1/value
- end
- coroutine.resume(coroutine.create(function()
- for i = 0,10,0.1 do
- swait()
- if type == "Add" then
- scaler2 = scaler2 - 0.01*value
- elseif type == "Divide" then
- scaler2 = scaler2 - 0.01/value
- end
- rng.Transparency = rng.Transparency + 0.01
- rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, scaler2)
- end
- rng:Destroy()
- end))
- end
- function sphere(bonuspeed,type,pos,scale,value,color)
- local type = type
- local rng = Instance.new("Part", char)
- rng.Anchored = true
- if ModeOfGlitch ~= 9 then
- rng.BrickColor = color
- elseif ModeOfGlitch == 9 then
- rng.Color = Color3.new(kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000)
- end
- rng.CanCollide = false
- rng.FormFactor = 3
- rng.Name = "Ring"
- rng.Material = "Neon"
- rng.Size = Vector3.new(1, 1, 1)
- rng.Transparency = 0
- rng.TopSurface = 0
- rng.BottomSurface = 0
- rng.CFrame = pos
- local rngm = Instance.new("SpecialMesh", rng)
- rngm.MeshType = "Sphere"
- rngm.Scale = scale
- if rainbowmode == true then
- rng.Color = Color3.new(r/255,g/255,b/255)
- end
- if ModeOfGlitch == 9 then
- coroutine.resume(coroutine.create(function()
- while true do
- swait()
- if rng.Parent ~= nil then
- rng.Color = Color3.new(kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000)
- else
- break
- end
- end
- end))
- end
- local scaler2 = 1
- if type == "Add" then
- scaler2 = 1*value
- elseif type == "Divide" then
- scaler2 = 1/value
- end
- coroutine.resume(coroutine.create(function()
- for i = 0,10/bonuspeed,0.1 do
- swait()
- if rainbowmode == true then
- rng.Color = Color3.new(r/255,g/255,b/255)
- end
- if type == "Add" then
- scaler2 = scaler2 - 0.01*value/bonuspeed
- elseif type == "Divide" then
- scaler2 = scaler2 - 0.01/value*bonuspeed
- end
- if chaosmode == true then
- rng.BrickColor = BrickColor.random()
- end
- rng.Transparency = rng.Transparency + 0.01*bonuspeed
- rngm.Scale = rngm.Scale + Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, scaler2*bonuspeed)
- end
- rng:Destroy()
- end))
- end
- function sphere2(bonuspeed,type,pos,scale,value,value2,value3,color)
- local type = type
- local rng = Instance.new("Part", char)
- rng.Anchored = true
- if ModeOfGlitch ~= 9 then
- rng.BrickColor = color
- elseif ModeOfGlitch == 9 then
- rng.Color = Color3.new(kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000)
- end
- rng.CanCollide = false
- rng.FormFactor = 3
- rng.Name = "Ring"
- rng.Material = "Neon"
- rng.Size = Vector3.new(1, 1, 1)
- rng.Transparency = 0
- rng.TopSurface = 0
- rng.BottomSurface = 0
- rng.CFrame = pos
- local rngm = Instance.new("SpecialMesh", rng)
- rngm.MeshType = "Sphere"
- rngm.Scale = scale
- local scaler2 = 1
- local scaler2b = 1
- local scaler2c = 1
- if type == "Add" then
- scaler2 = 1*value
- scaler2b = 1*value2
- scaler2c = 1*value3
- elseif type == "Divide" then
- scaler2 = 1/value
- scaler2b = 1/value2
- scaler2c = 1/value3
- end
- if ModeOfGlitch == 9 then
- coroutine.resume(coroutine.create(function()
- while true do
- swait()
- if rng.Parent ~= nil then
- rng.Color = Color3.new(kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000)
- else
- break
- end
- end
- end))
- end
- coroutine.resume(coroutine.create(function()
- for i = 0,10/bonuspeed,0.1 do
- swait()
- if type == "Add" then
- scaler2 = scaler2 - 0.01*value/bonuspeed
- scaler2b = scaler2b - 0.01*value/bonuspeed
- scaler2c = scaler2c - 0.01*value/bonuspeed
- elseif type == "Divide" then
- scaler2 = scaler2 - 0.01/value*bonuspeed
- scaler2b = scaler2b - 0.01/value*bonuspeed
- scaler2c = scaler2c - 0.01/value*bonuspeed
- end
- rng.Transparency = rng.Transparency + 0.01*bonuspeed
- rngm.Scale = rngm.Scale + Vector3.new(scaler2*bonuspeed, scaler2b*bonuspeed, scaler2c*bonuspeed)
- end
- rng:Destroy()
- end))
- end
- function slash(bonuspeed,rotspeed,rotatingop,typeofshape,type,typeoftrans,pos,scale,value,color)
- local type = type
- local rotenable = rotatingop
- local rng = Instance.new("Part", char)
- rng.Anchored = true
- rng.BrickColor = color
- rng.CanCollide = false
- rng.FormFactor = 3
- rng.Name = "Ring"
- rng.Material = "Neon"
- rng.Size = Vector3.new(1, 1, 1)
- rng.Transparency = 0
- if typeoftrans == "In" then
- rng.Transparency = 1
- end
- rng.TopSurface = 0
- rng.BottomSurface = 0
- rng.CFrame = pos
- local rngm = Instance.new("SpecialMesh", rng)
- rngm.MeshType = "FileMesh"
- if typeofshape == "Normal" then
- rngm.MeshId = "rbxassetid://662586858"
- elseif typeofshape == "Round" then
- rngm.MeshId = "rbxassetid://662585058"
- end
- rngm.Scale = scale
- local scaler2 = 1/10
- if type == "Add" then
- scaler2 = 1*value/10
- elseif type == "Divide" then
- scaler2 = 1/value/10
- end
- local randomrot = math.random(1,2)
- coroutine.resume(coroutine.create(function()
- for i = 0,10/bonuspeed,0.1 do
- swait()
- if type == "Add" then
- scaler2 = scaler2 - 0.01*value/bonuspeed/10
- elseif type == "Divide" then
- scaler2 = scaler2 - 0.01/value*bonuspeed/10
- end
- if rotenable == true then
- if randomrot == 1 then
- rng.CFrame = rng.CFrame*CFrame.Angles(0,math.rad(rotspeed*bonuspeed/2),0)
- elseif randomrot == 2 then
- rng.CFrame = rng.CFrame*CFrame.Angles(0,math.rad(-rotspeed*bonuspeed/2),0)
- end
- end
- if typeoftrans == "Out" then
- rng.Transparency = rng.Transparency + 0.01*bonuspeed
- elseif typeoftrans == "In" then
- rng.Transparency = rng.Transparency - 0.01*bonuspeed
- end
- rngm.Scale = rngm.Scale + Vector3.new(scaler2*bonuspeed/10, 0, scaler2*bonuspeed/10)
- end
- rng:Destroy()
- end))
- end
- function PixelBlock(bonuspeed,FastSpeed,type,pos,x1,y1,z1,value,color,outerpos)
- local type = type
- local rng = Instance.new("Part", char)
- rng.Anchored = true
- rng.BrickColor = color
- rng.CanCollide = false
- rng.FormFactor = 3
- rng.Name = "Ring"
- rng.Material = "Neon"
- rng.Size = Vector3.new(1, 1, 1)
- rng.Transparency = 0
- rng.TopSurface = 0
- rng.BottomSurface = 0
- rng.CFrame = pos
- rng.CFrame = rng.CFrame + rng.CFrame.lookVector*outerpos
- local rngm = Instance.new("SpecialMesh", rng)
- rngm.MeshType = "Brick"
- rngm.Scale = vt(x1,y1,z1)
- if rainbowmode == true then
- rng.Color = Color3.new(r/255,g/255,b/255)
- end
- local scaler2 = 1
- local speeder = FastSpeed/10
- if type == "Add" then
- scaler2 = 1*value
- elseif type == "Divide" then
- scaler2 = 1/value
- end
- coroutine.resume(coroutine.create(function()
- for i = 0,10/bonuspeed,0.1 do
- swait()
- if rainbowmode == true then
- rng.Color = Color3.new(r/255,g/255,b/255)
- end
- if type == "Add" then
- scaler2 = scaler2 - 0.01*value/bonuspeed
- elseif type == "Divide" then
- scaler2 = scaler2 - 0.01/value*bonuspeed
- end
- if chaosmode == true then
- rng.BrickColor = BrickColor.random()
- end
- speeder = speeder - 0.01*FastSpeed*bonuspeed/10
- rng.CFrame = rng.CFrame + rng.CFrame.lookVector*speeder*bonuspeed
- --rng.Transparency = rng.Transparency + 0.01*bonuspeed
- rngm.Scale = rngm.Scale - Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, scaler2*bonuspeed)
- end
- rng:Destroy()
- end))
- end
- function PixelBlockX(bonuspeed,FastSpeed,type,pos,x1,y1,z1,value,color,outerpos)
- local type = type
- local rng = Instance.new("Part", char)
- rng.Anchored = true
- rng.BrickColor = color
- rng.CanCollide = false
- rng.FormFactor = 3
- rng.Name = "Ring"
- rng.Material = "Neon"
- rng.Size = Vector3.new(1, 1, 1)
- rng.Transparency = 0
- rng.TopSurface = 0
- rng.BottomSurface = 0
- rng.CFrame = pos
- rng.CFrame = rng.CFrame + rng.CFrame.lookVector*outerpos
- local rngm = Instance.new("SpecialMesh", rng)
- rngm.MeshType = "Brick"
- rngm.Scale = vt(x1,y1,z1)
- if rainbowmode == true then
- rng.Color = Color3.new(r/255,g/255,b/255)
- end
- local scaler2 = 1
- local speeder = FastSpeed/10
- if type == "Add" then
- scaler2 = 1*value
- elseif type == "Divide" then
- scaler2 = 1/value
- end
- coroutine.resume(coroutine.create(function()
- for i = 0,10/bonuspeed,0.1 do
- swait()
- if rainbowmode == true then
- rng.Color = Color3.new(r/255,g/255,b/255)
- end
- if type == "Add" then
- scaler2 = scaler2 - 0.01*value/bonuspeed
- elseif type == "Divide" then
- scaler2 = scaler2 - 0.01/value*bonuspeed
- end
- if chaosmode == true then
- rng.BrickColor = BrickColor.random()
- end
- speeder = speeder - 0.01*FastSpeed*bonuspeed/10
- rng.CFrame = rng.CFrame + rng.CFrame.lookVector*speeder*bonuspeed
- rng.Transparency = rng.Transparency + 0.01*bonuspeed
- rngm.Scale = rngm.Scale - Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, scaler2*bonuspeed)
- end
- rng:Destroy()
- end))
- end
- function PixelBlockNeg(bonuspeed,FastSpeed,type,pos,x1,y1,z1,value,color,outerpos)
- local type = type
- local rng = Instance.new("Part", char)
- rng.Anchored = true
- rng.BrickColor = color
- rng.CanCollide = false
- rng.FormFactor = 3
- rng.Name = "Ring"
- rng.Material = "Neon"
- rng.Size = Vector3.new(1, 1, 1)
- rng.Transparency = 0
- rng.TopSurface = 0
- rng.BottomSurface = 0
- rng.CFrame = pos
- rng.CFrame = rng.CFrame + rng.CFrame.lookVector*outerpos
- local rngm = Instance.new("SpecialMesh", rng)
- rngm.MeshType = "Brick"
- rngm.Scale = vt(x1,y1,z1)
- if rainbowmode == true then
- rng.Color = Color3.new(r/255,g/255,b/255)
- end
- local scaler2 = 0
- local speeder = FastSpeed/10
- if type == "Add" then
- scaler2 = 1*value
- elseif type == "Divide" then
- scaler2 = 1/value
- end
- coroutine.resume(coroutine.create(function()
- for i = 0,10/bonuspeed,0.1 do
- swait()
- if rainbowmode == true then
- rng.Color = Color3.new(r/255,g/255,b/255)
- end
- if type == "Add" then
- scaler2 = scaler2 - 0.01*value/bonuspeed
- elseif type == "Divide" then
- scaler2 = scaler2 - 0.01/value*bonuspeed
- end
- if chaosmode == true then
- rng.BrickColor = BrickColor.random()
- end
- speeder = speeder + 0.01*FastSpeed*bonuspeed/10
- rng.CFrame = rng.CFrame + rng.CFrame.lookVector*speeder*bonuspeed
- --rng.Transparency = rng.Transparency + 0.01*bonuspeed
- rngm.Scale = rngm.Scale - Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, scaler2*bonuspeed)
- end
- rng:Destroy()
- end))
- end
- function block(bonuspeed,type,pos,scale,value,value2,value3,color,color3)
- local type = type
- local rng = Instance.new("Part", char)
- rng.Anchored = true
- rng.BrickColor = color
- rng.Color = color3
- rng.CanCollide = false
- rng.FormFactor = 3
- rng.Name = "Ring"
- rng.Material = "Neon"
- rng.Size = Vector3.new(1, 1, 1)
- rng.Transparency = 0
- rng.TopSurface = 0
- rng.BottomSurface = 0
- rng.CFrame = pos
- local rngm = Instance.new("SpecialMesh", rng)
- rngm.MeshType = "Brick"
- rngm.Scale = scale
- local scaler2 = 1
- local scaler2b = 1
- local scaler2c = 1
- if type == "Add" then
- scaler2 = 1*value
- scaler2b = 1*value2
- scaler2c = 1*value3
- elseif type == "Divide" then
- scaler2 = 1/value
- scaler2b = 1/value2
- scaler2c = 1/value3
- end
- coroutine.resume(coroutine.create(function()
- for i = 0,10/bonuspeed,0.1 do
- swait()
- if type == "Add" then
- scaler2 = scaler2 - 0.01*value/bonuspeed
- scaler2b = scaler2b - 0.01*value/bonuspeed
- scaler2c = scaler2c - 0.01*value/bonuspeed
- elseif type == "Divide" then
- scaler2 = scaler2 - 0.01/value*bonuspeed
- scaler2b = scaler2b - 0.01/value*bonuspeed
- scaler2c = scaler2c - 0.01/value*bonuspeed
- end
- rng.CFrame = rng.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))
- rng.Transparency = rng.Transparency + 0.01*bonuspeed
- rngm.Scale = rngm.Scale + Vector3.new(scaler2*bonuspeed, scaler2b*bonuspeed, scaler2c*bonuspeed)
- end
- rng:Destroy()
- end))
- end
- function sphereMK(bonuspeed,FastSpeed,type,pos,x1,y1,z1,value,color,outerpos)
- local type = type
- local rng = Instance.new("Part", char)
- rng.Anchored = true
- if ModeOfGlitch ~= 9 then
- rng.BrickColor = color
- elseif ModeOfGlitch == 9 then
- rng.Color = Color3.new(kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000)
- end
- rng.CanCollide = false
- rng.FormFactor = 3
- rng.Name = "Ring"
- rng.Material = "Neon"
- rng.Size = Vector3.new(1, 1, 1)
- rng.Transparency = 0
- rng.TopSurface = 0
- rng.BottomSurface = 0
- rng.CFrame = pos
- rng.CFrame = rng.CFrame + rng.CFrame.lookVector*outerpos
- local rngm = Instance.new("SpecialMesh", rng)
- rngm.MeshType = "Sphere"
- rngm.Scale = vt(x1,y1,z1)
- if rainbowmode == true then
- rng.Color = Color3.new(r/255,g/255,b/255)
- end
- if ModeOfGlitch == 9 then
- coroutine.resume(coroutine.create(function()
- while true do
- swait()
- if rng.Parent ~= nil then
- rng.Color = Color3.new(kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000)
- else
- break
- end
- end
- end))
- end
- local scaler2 = 1
- local speeder = FastSpeed
- if type == "Add" then
- scaler2 = 1*value
- elseif type == "Divide" then
- scaler2 = 1/value
- end
- coroutine.resume(coroutine.create(function()
- for i = 0,10/bonuspeed,0.1 do
- swait()
- if rainbowmode == true then
- rng.Color = Color3.new(r/255,g/255,b/255)
- end
- if type == "Add" then
- scaler2 = scaler2 - 0.01*value/bonuspeed
- elseif type == "Divide" then
- scaler2 = scaler2 - 0.01/value*bonuspeed
- end
- if chaosmode == true then
- rng.BrickColor = BrickColor.random()
- end
- speeder = speeder - 0.01*FastSpeed*bonuspeed
- rng.CFrame = rng.CFrame + rng.CFrame.lookVector*speeder*bonuspeed
- rng.Transparency = rng.Transparency + 0.01*bonuspeed
- rngm.Scale = rngm.Scale + Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, 0)
- end
- rng:Destroy()
- end))
- end
- function sphereMKCharge(bonuspeed,FastSpeed,type,pos,x1,y1,z1,value,color,outerpos)
- local type = type
- local rng = Instance.new("Part", char)
- rng.Anchored = true
- if ModeOfGlitch ~= 9 then
- rng.BrickColor = color
- elseif ModeOfGlitch == 9 then
- rng.Color = Color3.new(kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000)
- end
- rng.CanCollide = false
- rng.FormFactor = 3
- rng.Name = "Ring"
- rng.Material = "Neon"
- rng.Size = Vector3.new(1, 1, 1)
- rng.Transparency = 1
- rng.TopSurface = 0
- rng.BottomSurface = 0
- rng.CFrame = pos
- rng.CFrame = rng.CFrame + rng.CFrame.lookVector*outerpos
- local rngm = Instance.new("SpecialMesh", rng)
- rngm.MeshType = "Sphere"
- rngm.Scale = vt(x1,y1,z1)
- if rainbowmode == true then
- rng.Color = Color3.new(r/255,g/255,b/255)
- end
- if ModeOfGlitch == 9 then
- coroutine.resume(coroutine.create(function()
- while true do
- swait()
- if rng.Parent ~= nil then
- rng.Color = Color3.new(kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000,kan.PlaybackLoudness/1000)
- else
- break
- end
- end
- end))
- end
- local scaler2 = 1
- local speeder = FastSpeed
- if type == "Add" then
- scaler2 = 1*value
- elseif type == "Divide" then
- scaler2 = 1/value
- end
- coroutine.resume(coroutine.create(function()
- for i = 0,10/bonuspeed,0.1 do
- swait()
- if rainbowmode == true then
- rng.Color = Color3.new(r/255,g/255,b/255)
- end
- if type == "Add" then
- scaler2 = scaler2 - 0.01*value/bonuspeed
- elseif type == "Divide" then
- scaler2 = scaler2 - 0.01/value*bonuspeed
- end
- if chaosmode == true then
- rng.BrickColor = BrickColor.random()
- end
- speeder = speeder - 0.01*FastSpeed*bonuspeed
- rng.CFrame = rng.CFrame + rng.CFrame.lookVector*speeder*bonuspeed
- rng.Transparency = rng.Transparency - 0.01*bonuspeed
- rngm.Scale = rngm.Scale + Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, 0)
- end
- rng:Destroy()
- end))
- end
- function dmg(dude)
- if dude.Name ~= Character then
- local keptcolor = BrickColor.new("Really red")
- local bgf = Instance.new("BodyGyro",dude.Head)
- bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(-90),0,0)
- --[[local val = Instance.new("BoolValue",dude)
- val.Name = "IsHit"]]--
- local ds = coroutine.wrap(function()
- dude:WaitForChild("Head"):BreakJoints()
- for i, v in pairs(dude:GetChildren()) do
- if v:IsA("Part") or v:IsA("MeshPart") then
- v.Name = "DEMINISHED"
- end
- end
- wait(0.5)
- targetted = nil
- CFuncs["Sound"].Create("rbxassetid://62339698", char, 0.75, 0.285)
- coroutine.resume(coroutine.create(function()
- for i, v in pairs(dude:GetChildren()) do
- if v:IsA("Accessory") then
- v:Destroy()
- end
- if v:IsA("Humanoid") then
- v:Destroy()
- end
- if v:IsA("CharacterMesh") then
- v:Destroy()
- end
- if v:IsA("Model") then
- v:Destroy()
- end
- if v:IsA("Part") or v:IsA("MeshPart") then
- for x, o in pairs(v:GetChildren()) do
- if o:IsA("Decal") then
- o:Destroy()
- end
- end
- coroutine.resume(coroutine.create(function()
- v.Material = "Neon"
- v.CanCollide = false
- v.Anchored = false
- local bld = Instance.new("ParticleEmitter",v)
- bld.LightEmission = 0.75
- bld.Texture = "rbxassetid://363275192" ---284205403
- bld.Color = ColorSequence.new(keptcolor.Color)
- bld.Rate = 500
- bld.Lifetime = NumberRange.new(1)
- bld.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,2,0),NumberSequenceKeypoint.new(0.8,2.25,0),NumberSequenceKeypoint.new(1,0,0)})
- bld.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.5,0),NumberSequenceKeypoint.new(0.8,0.75,0),NumberSequenceKeypoint.new(1,1,0)})
- bld.Speed = NumberRange.new(2,5)
- bld.VelocitySpread = 50000
- bld.Rotation = NumberRange.new(-500,500)
- bld.RotSpeed = NumberRange.new(-500,500)
- local sbs = Instance.new("BodyPosition", v)
- sbs.P = 3000
- sbs.D = 1000
- sbs.maxForce = Vector3.new(50000000000, 50000000000, 50000000000)
- sbs.position = v.Position + Vector3.new(math.random(-2,2),10 + math.random(-2,2),math.random(-2,2))
- v.Color = keptcolor.Color
- coroutine.resume(coroutine.create(function()
- for i = 0, 49 do
- swait(1)
- v:BreakJoints()
- v.Transparency = v.Transparency + 0.02
- end
- v:BreakJoints()
- sphere2(1,"Add",v.CFrame,vt(0,0,0),0.1,0.1,0.1,keptcolor)
- CFuncs["Sound"].Create("rbxassetid://1192402877", v, 0.5, 0.75)
- bld.Speed = NumberRange.new(10,25)
- bld.Drag = 5
- bld.Acceleration = vt(0,2,0)
- wait(0.5)
- bld.Enabled = false
- wait(8)
- v:Destroy()
- dude:Destroy()
- end))
- end))
- end
- end
- end))
- end)
- ds()
- end
- end
- function FindNearestHead(Position, Distance, SinglePlayer)
- if SinglePlayer then
- return (SinglePlayer.Torso.CFrame.p - Position).magnitude < Distance
- end
- local List = {}
- for i, v in pairs(workspace:GetChildren()) do
- if v:IsA("Model") then
- if v:findFirstChild("Head") then
- if v ~= Character then
- if (v.Head.Position - Position).magnitude <= Distance then
- table.insert(List, v)
- end
- end
- end
- end
- end
- return List
- end
- function FaceMouse()
- Cam = workspace.CurrentCamera
- return {
- CFrame.new(char.Torso.Position, Vector3.new(getMouseHit().x, char.Torso.Position.y, getMouseHit().z)),
- Vector3.new(getMouseHit().x, getMouseHit().y, getMouseHit().z)
- }
- end
- function FaceMouse2()
- Cam = workspace.CurrentCamera
- return {
- CFrame.new(char.Torso.Position, Vector3.new(getMouseHit().x, getMouseHit().y, getMouseHit().z)),
- Vector3.new(getMouseHit().x, getMouseHit().y, getMouseHit().z)
- }
- end
- local ModeOfGlitch = 1
- -- Functions are ready.
- local storehumanoidWS = 16
- function createBGCircle(size,parent,color)
- local bgui = Instance.new("BillboardGui",parent)
- bgui.Size = UDim2.new(size, 0, size, 0)
- local imgc = Instance.new("ImageLabel",bgui)
- imgc.BackgroundTransparency = 1
- imgc.ImageTransparency = 0
- imgc.Size = UDim2.new(1,0,1,0)
- imgc.Image = "rbxassetid://997291547" --997291547,521073910
- imgc.ImageColor3 = color
- return bgui,imgc
- end
- ----------------------------------- Abilities
- function chatfunc(text)
- coroutine.wrap(function()
- if(Character:FindFirstChild'ChatGUI')then Character.ChatGUI:destroy() end
- local BBG = NewInstance("BillboardGui",Character,{Name='ChatGUI',Size=UDim2.new(0,100,0,40),StudsOffset=Vector3.new(0,2.753,0),Adornee=Head})
- local Txt = NewInstance("TextLabel",BBG,{Text = "",BackgroundTransparency=1,TextColor3=MAINRUINCOLOR.Color,TextStrokeColor3=Color3.new(0,0,0),BorderSizePixel=0,Font=Enum.Font.Arcade,TextSize=28,TextStrokeTransparency=0,Size=UDim2.new(1,0,.5,0)})
- coroutine.resume(coroutine.create(function()
- repeat swait()
- --lol
- until Txt.Transparency > 1
- end))
- for i = 1, #text do
- delay(i/25, function()
- CFuncs.Sound.Create("http://www.roblox.com/asset/?id=418252437", Head, 1, math.random(2,12)/15)
- Txt.Text = text:sub(1,i)
- end)
- end
- delay((#text/25)+2.6, function()
- wait(0.2)
- for i = 1, 15 do
- swait()
- Txt.TextTransparency = Txt.TextTransparency + 1/15
- Txt.TextStrokeTransparency = Txt.TextStrokeTransparency + 1/15
- end
- end)
- delay((#text/25)+3, function()
- BBG:destroy()
- end)
- end)()
- end
- function FillScreen(color,timetowait)
- for i,v in pairs(game:GetService("Players"):GetPlayers()) do
- coroutine.resume(coroutine.create(function()
- if v.PlayerGui:FindFirstChild("boiwhat")~= nil then
- v.PlayerGui:FindFirstChild("boiwhat"):destroy()
- end
- local scrg = Instance.new("ScreenGui",v.PlayerGui)
- scrg.Name = "boiwhat"
- local ohno2 = script:WaitForChild("FillScreen").Frame:Clone()
- ohno2.Parent = scrg
- local fvalen = 0.55
- local fval = -0.49
- coroutine.resume(coroutine.create(function()
- while true do
- swait()
- if scrg.Parent ~= nil then
- fvalen = fvalen - 0.0001
- elseif scrg.Parent == nil then
- break
- end
- end
- end))
- local flol = -5
- local flil = 1.6
- coroutine.resume(coroutine.create(function()
- ohno2.BackgroundTransparency = 1
- for i = 0, 40 do
- swait()
- ohno2.BackgroundTransparency = ohno2.BackgroundTransparency - 0.05
- ohno2.BackgroundColor3 = color
- end
- wait(timetowait)
- local valinc = 0
- local vinc2 = 1
- for i = 0, 99 do
- swait()
- vinc2 = vinc2 + 0.25
- valinc = valinc + 0.0001
- flol = flol + valinc
- flil = flil + valinc
- ohno2.BackgroundTransparency = ohno2.BackgroundTransparency + 0.05
- end
- scrg:Destroy()
- end))
- end))
- end
- end
- function BossChatFuncTop(text,represfont,color,color2)
- for i,v in pairs(game:GetService("Players"):GetPlayers()) do
- coroutine.resume(coroutine.create(function()
- if v.PlayerGui:FindFirstChild("boi")~= nil then
- v.PlayerGui:FindFirstChild("boi"):destroy()
- end
- local scrg = Instance.new("ScreenGui",v.PlayerGui)
- scrg.Name = "boi"
- local ohno2 = script:WaitForChild("TopBossChat").Frame:Clone()
- ohno2.Parent = scrg
- local ohno = ohno2.TextLabel
- local fvalen = 0.55
- local fval = -0.49
- coroutine.resume(coroutine.create(function()
- while true do
- swait()
- if scrg.Parent ~= nil then
- fvalen = fvalen - 0.0001
- elseif scrg.Parent == nil then
- break
- end
- end
- end))
- local flol = -5
- local flil = 1.6
- coroutine.resume(coroutine.create(function()
- ohno2.BackgroundTransparency = 1
- ohno.TextStrokeTransparency = 1
- ohno.TextTransparency = 1
- for i = 0, 40 do
- swait()
- ohno.Text = ""
- ohno.Font = represfont
- ohno.TextColor3 = color
- ohno.TextStrokeColor3 = color2
- ohno2.BackgroundTransparency = ohno2.BackgroundTransparency - 0.05
- ohno.TextTransparency = ohno.TextTransparency - 0.05
- ohno.TextStrokeTransparency = ohno.TextStrokeTransparency - 0.05
- end
- for i = 1,string.len(text),1 do
- ohno.Text = string.sub(text,1,i)
- wait(0.03)
- end
- wait(1)
- local valinc = 0
- local vinc2 = 1
- for i = 0, 99 do
- swait()
- vinc2 = vinc2 + 0.25
- valinc = valinc + 0.0001
- flol = flol + valinc
- flil = flil + valinc
- ohno2.BackgroundTransparency = ohno2.BackgroundTransparency + 0.05
- ohno.TextTransparency = ohno.TextTransparency + 0.05
- ohno.TextStrokeTransparency = ohno.TextStrokeTransparency + 0.05
- end
- scrg:Destroy()
- end))
- end))
- end
- end
- function Alert(valuetowait)
- CFuncs["Sound"].Create("rbxassetid://963718869", char, 1,1)
- for i,v in pairs(game:GetService("Players"):GetPlayers()) do
- if v.PlayerGui:FindFirstChild("Alert")~= nil then
- v.PlayerGui:FindFirstChild("Alert"):destroy()
- end
- local scrg = script.Alert:Clone()
- scrg.Parent = v.PlayerGui
- local MFramee = scrg:FindFirstChildOfClass("Frame")
- local frame1 = MFramee.Frame1
- local frame2 = MFramee.Frame
- local frametxt1 = frame1.TextLabel
- local frametxt2 = frame2.TextLabel
- local DerpzOHDEARLORD = MFramee.Parent.ImageLabel
- coroutine.resume(coroutine.create(function()
- local flol = 1.75
- local flil = 1.6
- for i = 0,50 do
- swait()
- MFramee.BackgroundTransparency = MFramee.BackgroundTransparency - 0.1
- frame1.BackgroundTransparency = frame1.BackgroundTransparency - 0.1
- frame2.BackgroundTransparency = frame2.BackgroundTransparency - 0.1
- frametxt1.TextTransparency = frametxt1.TextTransparency - 0.1
- frametxt2.TextTransparency = frametxt2.TextTransparency - 0.1
- DerpzOHDEARLORD.ImageTransparency = DerpzOHDEARLORD.ImageTransparency - 0.1
- end
- local valinc = 0
- wait(valuetowait)
- for i = 0,50 do
- swait()
- MFramee.BackgroundTransparency = MFramee.BackgroundTransparency + 0.1
- frame1.BackgroundTransparency = frame1.BackgroundTransparency + 0.1
- frame2.BackgroundTransparency = frame2.BackgroundTransparency + 0.1
- frametxt1.TextTransparency = frametxt1.TextTransparency + 0.1
- frametxt2.TextTransparency = frametxt2.TextTransparency + 0.1
- DerpzOHDEARLORD.ImageTransparency = DerpzOHDEARLORD.ImageTransparency + 0.1
- end
- scrg:Destroy()
- end))
- end
- end
- function SayHello()
- chatfunc("Hello! I'm Derpz.")
- attack = true
- hum.WalkSpeed = 0
- for i = 0, 20, 0.1 do
- swait()
- local Alpha = .2
- RootJoint.C0 = RootJoint.C0:lerp(cf(0.1,0 + 0.1 * math.cos(sine/30),0)*angles(math.rad(0),math.rad(-0.1),math.rad(-7.6))*RootCF,Alpha)
- LH.C0 = LH.C0:lerp(cf(-1,-1 - 0.1 * math.cos(sine/30),0.1)*angles(math.rad(0),math.rad(6.9),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
- RH.C0 = RH.C0:lerp(cf(1,-0.9 - 0.1 * math.cos(sine/30),0.1)*angles(math.rad(2.1),math.rad(-14.8),math.rad(11.4))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
- LW.C0 = LW.C0:lerp(cf(-1.5,0.9,0)*angles(math.rad(38.8),math.rad(-47.4 + 15 * math.cos(sine/5)),math.rad(-132.5 - 2 * math.cos(sine/5))),Alpha)
- RW.C0 = RW.C0:lerp(cf(1.5,0.5,0.1)*angles(math.rad(-4.8),math.rad(-1),math.rad(11.3)),Alpha)
- Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(-0.1,0,0.2)*angles(math.rad(-6.3 + 3 * math.cos(sine/7)),math.rad(0.5),math.rad(-4.9))*necko,Alpha)
- end
- hum.WalkSpeed = storehumanoidWS
- attack = false
- end
- function attackone()
- attack = true
- hum.WalkSpeed = 0
- for i = 0, 2, 0.1 do
- swait()
- local Alpha = .3
- RootJoint.C0 = RootJoint.C0:lerp(cf(0,0,-0.1)*angles(math.rad(-6.5),math.rad(23.5),math.rad(2.3))*RootCF,Alpha)
- LH.C0 = LH.C0:lerp(cf(-0.9,-1,0)*angles(math.rad(-1.8),math.rad(17.6),math.rad(-3.4))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
- RH.C0 = RH.C0:lerp(cf(1.1,-1,0)*angles(math.rad(-16.6),math.rad(-36.7),math.rad(-12.1))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
- LW.C0 = LW.C0:lerp(cf(-1.5,-0.3,0.3)*angles(math.rad(128.1),math.rad(-32.1),math.rad(-10.6)),Alpha)
- RW.C0 = RW.C0:lerp(cf(1.3,0.4,0.2)*angles(math.rad(-29.3),math.rad(-35.2),math.rad(-13.6)),Alpha)
- Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,0)*angles(math.rad(-1),math.rad(-26.1),math.rad(1.9))*necko,Alpha)
- end
- MagniDamage(larm,4,10,25,0.1,"Normal")
- localshakes(0.1,0.1)
- for i = 0, 1, 0.1 do
- swait()
- local Alpha = .3
- RootJoint.C0 = RootJoint.C0:lerp(cf(0.1,0,-0.2)*angles(math.rad(-15),math.rad(-21.9),math.rad(-2.3))*RootCF,Alpha)
- LH.C0 = LH.C0:lerp(cf(-1,-1,-0.2)*angles(math.rad(-16.8),math.rad(17.8),math.rad(1.2))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
- RH.C0 = RH.C0:lerp(cf(0.9,-1,0.3)*angles(math.rad(5.4),math.rad(-38.4),math.rad(1.3))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
- LW.C0 = LW.C0:lerp(cf(-1.3,0.4,-0.8)*angles(math.rad(72.8),math.rad(-32.7),math.rad(18.4)),Alpha)
- RW.C0 = RW.C0:lerp(cf(1.4,0.5,0.3)*angles(math.rad(-29.3),math.rad(-35.2),math.rad(7.1)),Alpha)
- Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,0)*angles(math.rad(-2.4),math.rad(19.4),math.rad(1.8))*necko,Alpha)
- end
- hum.WalkSpeed = storehumanoidWS
- attack = false
- end
- function attacktwo()
- attack = true
- hum.WalkSpeed = 0
- for i = 0, 2, 0.1 do
- swait()
- local Alpha = .3
- RootJoint.C0 = RootJoint.C0:lerp(cf(0.1,0,-0.1)*angles(math.rad(-0.4),math.rad(15.7),math.rad(6.7))*RootCF,Alpha)
- LH.C0 = LH.C0:lerp(cf(-0.9,-1,0.2)*angles(math.rad(10),math.rad(16.5),math.rad(-6.9))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
- RH.C0 = RH.C0:lerp(cf(0.9,-1,0.3)*angles(math.rad(5.4),math.rad(-38.4),math.rad(1.3))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
- LW.C0 = LW.C0:lerp(cf(-1.5,0.7,-0.3)*angles(math.rad(-1.4),math.rad(-29),math.rad(-24)),Alpha)
- RW.C0 = RW.C0:lerp(cf(1.5,0.1,0.5)*angles(math.rad(99.5),math.rad(29.3),math.rad(35.1)),Alpha)
- Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,0)*angles(math.rad(-1.2),math.rad(-20.5),math.rad(1.8))*necko,Alpha)
- end
- MagniDamage(rarm,4,10,25,0.1,"Normal")
- localshakes(0.1,0.1)
- for i = 0, 1, 0.1 do
- swait()
- local Alpha = .3
- RootJoint.C0 = RootJoint.C0:lerp(cf(0.2,0.1,-0.3)*angles(math.rad(-25.9),math.rad(31.7),math.rad(14.2))*RootCF,Alpha)
- LH.C0 = LH.C0:lerp(cf(-0.9,-1,0.1)*angles(math.rad(-2.2),math.rad(33),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
- RH.C0 = RH.C0:lerp(cf(1.3,-1.1,0)*angles(math.rad(29.3),math.rad(-35.4),math.rad(4.6))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
- LW.C0 = LW.C0:lerp(cf(-1.6,0.5,-0.2)*angles(math.rad(-33),math.rad(-11.6),math.rad(-35.4)),Alpha)
- RW.C0 = RW.C0:lerp(cf(1.3,0.6,-0.6)*angles(math.rad(99.5),math.rad(29.3),math.rad(-6.7)),Alpha)
- Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(-0.1,0,-0.1)*angles(math.rad(-0.5),math.rad(-39.2),math.rad(-4.1))*necko,Alpha)
- end
- hum.WalkSpeed = storehumanoidWS
- attack = false
- end
- function attackthree()
- attack = true
- hum.WalkSpeed = 0
- for i = 0, 2, 0.1 do
- swait()
- local Alpha = .3
- RootJoint.C0 = RootJoint.C0:lerp(cf(0,0,0.1)*angles(math.rad(11.1),math.rad(-0.2),math.rad(0))*RootCF,Alpha)
- LH.C0 = LH.C0:lerp(cf(-1,-1,0.1)*angles(math.rad(-11.9),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
- RH.C0 = RH.C0:lerp(cf(1,0.3,-0.6)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
- LW.C0 = LW.C0:lerp(cf(-1.6,0.6,0)*angles(math.rad(0),math.rad(0),math.rad(-18.4)),Alpha)
- RW.C0 = RW.C0:lerp(cf(1.6,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(12.8)),Alpha)
- Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,0.3)*angles(math.rad(-10.2),math.rad(0),math.rad(0))*necko,Alpha)
- end
- MagniDamage(rleg,4,10,25,0.1,"Normal")
- localshakes(0.1,0.1)
- for i = 0, 1, 0.1 do
- swait()
- local Alpha = .3
- RootJoint.C0 = RootJoint.C0:lerp(cf(0,-0.1,0.1)*angles(math.rad(16.8),math.rad(-0.2),math.rad(0))*RootCF,Alpha)
- LH.C0 = LH.C0:lerp(cf(-1,-0.9,0.2)*angles(math.rad(-18.8),math.rad(18.2),math.rad(3.9))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
- RH.C0 = RH.C0:lerp(cf(1,-1.2,-0.4)*angles(math.rad(96.2),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
- LW.C0 = LW.C0:lerp(cf(-1.6,0.3,0.1)*angles(math.rad(-17),math.rad(0.2),math.rad(-18.4)),Alpha)
- RW.C0 = RW.C0:lerp(cf(1.6,0.2,0.1)*angles(math.rad(-17),math.rad(0.2),math.rad(12.9)),Alpha)
- Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,0.3)*angles(math.rad(-10.2),math.rad(0),math.rad(0))*necko,Alpha)
- end
- hum.WalkSpeed = storehumanoidWS
- attack = false
- end
- function jumpup()
- attack = true
- hum.WalkSpeed = 0
- CFuncs["Sound"].Create("rbxassetid://1666361078", tors, 3,1.2)
- for i = 0,5,0.1 do
- swait()
- root.Velocity = vt(0,200,0)
- local Alpha = .1
- RootJoint.C0 = RootJoint.C0:lerp(cf(0,0,0.1)*angles(math.rad(8.2),math.rad(-0.1),math.rad(0))*RootCF,Alpha)
- LH.C0 = LH.C0:lerp(cf(-1,-1,0.1)*angles(math.rad(-7),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
- RH.C0 = RH.C0:lerp(cf(1,0.2,-0.6)*angles(math.rad(0),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
- LW.C0 = LW.C0:lerp(cf(-1.2,0.4,0.4)*angles(math.rad(-26.8),math.rad(0),math.rad(21)),Alpha)
- RW.C0 = RW.C0:lerp(cf(1.3,0.3,0.2)*angles(math.rad(-26.8),math.rad(4.2),math.rad(-13.5)),Alpha)
- Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,-0.3)*angles(math.rad(18.5),math.rad(0),math.rad(0))*necko,Alpha)
- end
- hum.WalkSpeed = storehumanoidWS
- attack = false
- end
- function walkmode()
- hum.WalkSpeed = 16
- storehumanoidWS = hum.WalkSpeed
- end
- function runmode()
- hum.WalkSpeed = 40
- storehumanoidWS = hum.WalkSpeed
- end
- function runfastmode()
- hum.WalkSpeed = 300
- storehumanoidWS = hum.WalkSpeed
- end
- function flying()
- flyingmode = true
- end
- function standingonground()
- flyingmode = false
- end
- dancing = false
- -------------------------------------
- Humanoid.Animator.Parent = nil
- Happy()
- MainFrame.SongName.Text = "Song: Teminite & MDK - Space Invaders"
- SwimType = 1
- local attacktype = 1
- function ob1d()
- if attack == false and attacktype == 1 then
- attacktype = 2
- attackone()
- elseif attack == false and attacktype == 2 then
- attacktype = 3
- attacktwo()
- elseif attack == false and attacktype == 3 then
- attacktype = 1
- attackthree()
- elseif attack == false and attacktype == 4 then
- attacktype = 1
- --attackfour()
- end
- end
- function key(k)
- if k == "l" and mutedtog == false then
- mutedtog = true
- chatfunc("Muted.")
- DerpzMusic.Volume = 0
- elseif k == "l" and mutedtog == true then
- mutedtog = false
- chatfunc("Unmuted.")
- DerpzMusic.Volume = 1.25
- end
- if k == "t" and attack == false then
- SayHello()
- end
- if k == "k" and attack == false then
- Alert(2)
- end
- if k == "p" and attack == false then
- BossChatFuncTop("Test","Arcade",BrickColor.Blue().Color,BrickColor.Black().Color)
- FillScreen(BrickColor.Black().Color,1)
- end
- if k == "f" and attack == false then
- flying()
- end
- if k == "g" and attack == false then
- standingonground()
- end
- if k == "z" and attack == false then
- jumpup()
- end
- if string.byte(k) == 48 then
- runmode()
- end
- if string.byte(k) == 50 then
- runfastmode()
- end
- if k == "u" then
- dancing = true
- MainFrame.SongName.Text = "Song: Mario Canyon"
- DerpzMusic.SoundId = "rbxassetid://3505029079"
- end
- end
- function key2(k)
- if string.byte(k) == 48 or string.byte(k) == 50 then
- walkmode()
- elseif k == "u" then
- dancing = false
- MainFrame.SongName.Text = "Song: Teminite & MDK - Space Invaders"
- DerpzMusic.SoundId = "rbxassetid://3229553339"
- end
- end
- plr.Chatted:connect(function(message)
- chatfunc(message)
- if message:sub(1,3) == "id/" then
- local OVMID = message:sub(4)
- DerpzMusic.SoundId = "rbxassetid://" ..OVMID
- end
- end)
- Humanoid.Name = "DERPZDENUGGET"
- Instance.new("ForceField",char).Visible = false
- idleanim=.4
- while true do
- Humanoid.MaxHealth = math.huge
- Humanoid.Health = math.huge
- 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)
- coroutine.resume(coroutine.create(function()
- if hitfloor ~= nil then
- local rval = 0
- --Effects go here.
- end
- end))
- if equipped==true or equipped==false then
- if attack==false then
- idle=idle+1
- else
- idle=0
- end
- if idle>=500 then
- if attack==false then
- --Sheath()
- end
- end
- if hum:GetState() == Enum.HumanoidStateType.Swimming and torvel<1 then
- Anim="SwimIdle"
- if attack == false then
- local Alpha = .3
- if SwimType ~= "ICANTSWIMIMUSEDTOFLYING" then
- hum.WalkSpeed = storehumanoidWS
- RootJoint.C0 = RootJoint.C0:lerp(cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*RootCF,Alpha)
- LH.C0 = LH.C0:lerp(cf(-1,-1,-0.1)*angles(math.rad(11.2),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
- RH.C0 = RH.C0:lerp(cf(1,-0.5,-0.6)*angles(math.rad(-24.8),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
- LW.C0 = LW.C0:lerp(cf(-1.4,0.6,-0.1)*angles(math.rad(70.5),math.rad(-15.8),math.rad(-53.9 + 40 * math.cos(sine/30))),Alpha)
- RW.C0 = RW.C0:lerp(cf(1.7,0.5,-0.1)*angles(math.rad(64.7),math.rad(19),math.rad(43.1 - 40 * math.cos(sine/30))),Alpha)
- Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*necko,.1)
- elseif SwimType == "ICANTSWIMIMUSEDTOFLYING" then
- hum.WalkSpeed = 0
- RootJoint.C0 = RootJoint.C0:lerp(cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*RootCF,Alpha)
- LH.C0 = LH.C0:lerp(cf(-1,-1,-0.1)*angles(math.rad(11.2),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
- RH.C0 = RH.C0:lerp(cf(1,-0.5,-0.6)*angles(math.rad(-24.8),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
- LW.C0 = LW.C0:lerp(cf(-1.4,0.6,-0.1)*angles(math.rad(160),math.rad(-15.8),math.rad(-53.9 + 40 * math.cos(sine/9))),Alpha)
- RW.C0 = RW.C0:lerp(cf(1.7,0.5,-0.1)*angles(math.rad(160),math.rad(19),math.rad(43.1 - 40 * math.cos(sine/11))),Alpha)
- Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,-0.7)*angles(math.rad(40),math.rad(0),math.rad(0))*necko,.1)
- end
- end
- elseif hum:GetState() == Enum.HumanoidStateType.Swimming and torvel>1 then
- Anim="Swim"
- if attack == false then
- hum.WalkSpeed = 16
- local Alpha = .3
- if SwimType == 1 then
- --Front crawl
- aerrtee = aerrtee + 10
- hum.WalkSpeed = 16
- RootJoint.C0 = RootJoint.C0:lerp(cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*RootCF,Alpha)
- LH.C0 = LH.C0:lerp(cf(-1,-1.1,0.2)*angles(math.rad(-5 - 20 * math.cos(sine/7)),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
- RH.C0 = RH.C0:lerp(cf(1,-0.8,-0.1)*angles(math.rad(5 + 20 * math.cos(sine/7)),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
- LW.C0 = LW.C0:lerp(cf(-1.5,0.5,0)*angles(math.rad(180 + aerrtee),math.rad(0),math.rad(0)),Alpha)
- RW.C0 = RW.C0:lerp(cf(1.5,0.5,0)*angles(math.rad(0 + aerrtee),math.rad(0),math.rad(0)),Alpha)
- Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0.1,-0.5)*angles(math.rad(28.4),math.rad(0),math.rad(0))*necko,.1)
- elseif SwimType == 2 then
- --Back stroke
- aerrtee = aerrtee + 10
- hum.WalkSpeed = 16
- RootJoint.C0 = RootJoint.C0:lerp(cf(0,0,0)*angles(math.rad(0),math.rad(180),math.rad(0))*RootCF,Alpha)
- LH.C0 = LH.C0:lerp(cf(-1,-1.1,0.2)*angles(math.rad(-5 + 20 * math.cos(sine/7)),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
- RH.C0 = RH.C0:lerp(cf(1,-0.8,-0.1)*angles(math.rad(5 - 20 * math.cos(sine/7)),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
- LW.C0 = LW.C0:lerp(cf(-1.5,0.5,0)*angles(math.rad(180 - aerrtee),math.rad(0),math.rad(0)),Alpha)
- RW.C0 = RW.C0:lerp(cf(1.5,0.5,0)*angles(math.rad(0 - aerrtee),math.rad(0),math.rad(0)),Alpha)
- Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0))*necko,.1)
- elseif SwimType == 3 then
- --Butterfly
- aerrtee = aerrtee + 10
- hum.WalkSpeed = 16
- RootJoint.C0 = RootJoint.C0:lerp(cf(0,0,0)*angles(math.rad(0 - 5 * math.cos(sine/3.5)),math.rad(0),math.rad(0))*RootCF,Alpha)
- LH.C0 = LH.C0:lerp(cf(-1,-1.1,0.2)*angles(math.rad(-5 + 20 * math.cos(sine/7)),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
- RH.C0 = RH.C0:lerp(cf(1,-0.8,-0.1)*angles(math.rad(5 + 20 * math.cos(sine/7)),math.rad(0),math.rad(0))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
- LW.C0 = LW.C0:lerp(cf(-1.5,0.5,0)*angles(math.rad(180 - aerrtee),math.rad(0),math.rad(0)),Alpha)
- RW.C0 = RW.C0:lerp(cf(1.5,0.5,0)*angles(math.rad(180 - aerrtee),math.rad(0),math.rad(0)),Alpha)
- Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0.1,-0.5)*angles(math.rad(28.4),math.rad(0),math.rad(0))*necko,.1)
- end
- end
- elseif hum:GetState() == Enum.HumanoidStateType.Climbing then
- if attack == false then
- end
- elseif RootPart.Velocity.y > 1 and hitfloor == nil and hum:GetState() ~= Enum.HumanoidStateType.Swimming and hum:GetState() ~= Enum.HumanoidStateType.Climbing then
- Anim="Jump"
- if attack==false then
- hum.WalkSpeed = storehumanoidWS
- RH.C0=clerp(RH.C0,cf(1,-0.18 - 0.05 * math.cos(sine / 25),-0.65)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),.05)
- LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(20)),.05)
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 25))*angles(math.rad(-10 - 2 * math.cos(sine / 10)),math.rad(0),math.rad(0)),.05)
- Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-5 - 10 * math.cos(sine / 25)),math.rad(0),math.rad(0)),.05)
- RW.C0=clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(0),math.rad(20 + 10 * math.cos(sine / 25))),.05)
- LW.C0=clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(0),math.rad(-20 - 10 * math.cos(sine / 25))),.05)
- end
- elseif RootPart.Velocity.y < -1 and hitfloor==nil and hum:GetState() ~= Enum.HumanoidStateType.Swimming and hum:GetState() ~= Enum.HumanoidStateType.Climbing then
- Anim="Fall"
- if attack==false then
- hum.WalkSpeed = storehumanoidWS
- RH.C0=clerp(RH.C0,cf(1,-0.35 - 0.05 * math.cos(sine / 25),-0.75)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),.05)
- LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(20)),.05)
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 25))*angles(math.rad(10 + 5 * math.cos(sine / 15)),math.rad(0),math.rad(0)),.05)
- Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(30 + 10 * math.cos(sine / 25)),math.rad(0),math.rad(0)),.05)
- RW.C0=clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(-40),math.rad(0 - 10 * math.cos(sine / 25)),math.rad(90)),.05)
- LW.C0=clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(-40),math.rad(0 + 10 * math.cos(sine / 25)),math.rad(-90)),.05)
- end
- elseif torvel < 1 and hitfloor ~= nil and hum:GetState() ~= Enum.HumanoidStateType.Swimming and hum:GetState() ~= Enum.HumanoidStateType.Climbing then
- Anim = "Idle"
- if attack == false then
- hum.WalkSpeed = storehumanoidWS
- if flyingmode == true and dancing == false then
- local Alpha = .1
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,1.5 + 0.1 * math.cos(sine / 28))*angles(math.rad(0 - 2 * math.cos(sine / 34)),math.rad(0),math.rad(0 - 1 * math.cos(sine /61))),.1)
- LH.C0 = LH.C0:lerp(cf(-0.8,-0.7,0)*angles(math.rad(-29.4 - 5 * math.cos(sine / 13)),math.rad(17.8+ 5 * math.cos(sine / 15)),math.rad(-14.1 - 5 * math.cos(sine / 14)))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
- RH.C0 = RH.C0:lerp(cf(1,-0.4 + 0.05 * math.cos(sine / 28),-0.8)*angles(math.rad(-29.9 + 5 * math.cos(sine / 13)),math.rad(-12.8 - 5 * math.cos(sine / 15)),math.rad(5.5+ 5 * math.cos(sine / 14)))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(5 + 4 * math.cos(sine / 48)),math.rad(0),math.rad(15 + 5 * math.cos(sine / 33))),.1)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(6 + 3 * math.cos(sine / 52)),math.rad(0),math.rad(-15 - 4 * math.cos(sine / 34))),.1)
- Neck.C0=clerp(Neck.C0,necko*angles(math.rad(20+3*math.cos(sine/36)),math.rad(0),math.rad(0)),.1)
- elseif flyingmode == false and dancing == false then
- local Alpha = .1
- RootJoint.C0 = RootJoint.C0:lerp(cf(0,0 + 0.1 * math.cos(sine/30),-0.1)*angles(math.rad(-6.4),math.rad(-4.8),math.rad(-0.5))*RootCF,Alpha)
- LH.C0 = LH.C0:lerp(cf(-0.9,-1 - 0.1 * math.cos(sine/30),0.1)*angles(math.rad(5.4),math.rad(17),math.rad(-5.6))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
- RH.C0 = RH.C0:lerp(cf(1,-1 - 0.1 * math.cos(sine/30),0)*angles(math.rad(5.4),math.rad(-5.1),math.rad(1.6))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
- LW.C0 = LW.C0:lerp(cf(-1.5,0.5,-0.1)*angles(math.rad(-0.8),math.rad(-6.7),math.rad(-7.1)),Alpha)
- RW.C0 = RW.C0:lerp(cf(1.5,0.5,-0.1)*angles(math.rad(-0.8),math.rad(8.9),math.rad(5)),Alpha)
- Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0,0,0)*angles(math.rad(-2),math.rad(6.1),math.rad(1.7))*necko,.05)
- elseif flyingmode == false and dancing == true then
- for i = 0, 2, 0.1 do
- swait()
- local Alpha = .3
- RootJoint.C0 = RootJoint.C0:lerp(cf(0,0,0)*angles(math.rad(0.2),math.rad(13.1),math.rad(-0.2))*RootCF,Alpha)
- LH.C0 = LH.C0:lerp(cf(-0.9,-0.9,0.2)*angles(math.rad(0),math.rad(28.4),math.rad(-15.2))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
- RH.C0 = RH.C0:lerp(cf(1,-0.9,0.1)*angles(math.rad(0),math.rad(-12.6),math.rad(7.2))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
- LW.C0 = LW.C0:lerp(cf(-1.6,0.5,-0.4)*angles(math.rad(131),math.rad(-11),math.rad(-12.4)),Alpha)
- RW.C0 = RW.C0:lerp(cf(1.4,0.4,0.2)*angles(math.rad(33),math.rad(-17.3),math.rad(10.9)),Alpha)
- Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(0.1,0,0)*angles(math.rad(0),math.rad(-20.4),math.rad(5.3))*necko,Alpha)
- end
- for i = 0, 2, 0.1 do
- swait()
- local Alpha = .3
- RootJoint.C0 = RootJoint.C0:lerp(cf(-0.2,0,0.1)*angles(math.rad(-0.4),math.rad(-31.8),math.rad(0.4))*RootCF,Alpha)
- LH.C0 = LH.C0:lerp(cf(-0.9,-0.9,0.2)*angles(math.rad(0),math.rad(28.4),math.rad(-15.2))*angles(math.rad(0),math.rad(-90),math.rad(0)),Alpha)
- RH.C0 = RH.C0:lerp(cf(1,-0.9,0.1)*angles(math.rad(0),math.rad(-12.6),math.rad(7.2))*angles(math.rad(0),math.rad(90),math.rad(0)),Alpha)
- LW.C0 = LW.C0:lerp(cf(-1.5,0.3,-0.2)*angles(math.rad(27.7),math.rad(14.7),math.rad(-7.6)),Alpha)
- RW.C0 = RW.C0:lerp(cf(1.3,0.3,-0.6)*angles(math.rad(113.9),math.rad(-4.9),math.rad(-14.2)),Alpha)
- Torso.Neck.C0 = Torso.Neck.C0:lerp(cf(-0.1,0,0.2)*angles(math.rad(-4.2),math.rad(25.6),math.rad(-4))*necko,Alpha)
- end
- end
- end
- elseif torvel > 2 and torvel < 22 and hitfloor ~= nil and hum:GetState() ~= Enum.HumanoidStateType.Swimming and hum:GetState() ~= Enum.HumanoidStateType.Climbing then
- Anim = "Walk"
- if attack == false then
- local Testwalk1 = hum.MoveDirection*Torso.CFrame.LookVector
- local Testwalk2 = hum.MoveDirection*Torso.CFrame.RightVector
- LOOKVEC = Testwalk1.X+Testwalk1.Z
- RIGHTVEC = Testwalk2.X+Testwalk2.Z
- wsv = 8
- wsv2 = 4
- local RIGHTHIPSECOND = cf(LOOKVEC/7 * math.cos(sine / wsv),0,0)*angles(math.sin(RIGHTVEC/2.5) * math.cos(sine / wsv),0,math.sin(-LOOKVEC/2) * math.cos(sine / wsv))
- local LEFTHIPSECOND = cf(-LOOKVEC/7 * math.cos(sine / wsv),0,0)*angles(math.sin(RIGHTVEC/2.5) * math.cos(sine / wsv),0,math.sin(-LOOKVEC/2) * math.cos(sine / wsv))
- RW.C0 = clerp(RW.C0, cf(1.5 + .0 * math.cos(sine / wsv) , 0.5 + RIGHTVEC/50* math.cos(sine / wsv), 0) * angles(math.rad(0 + LOOKVEC*60 * math.cos(sine / wsv)), math.rad(0), math.rad(4 + RIGHTVEC*5 * math.cos(sine / wsv))), .1)
- LW.C0 = clerp(LW.C0, cf(-1.5 + .0 * math.cos(sine / wsv), 0.5 + RIGHTVEC/50 * math.cos(sine / wsv), 0)*angles(math.rad(0 - LOOKVEC*60 * math.cos(sine / wsv)), math.rad(0), math.rad(-4 - RIGHTVEC*5 * math.cos(sine / wsv))), .1)
- RootJoint.C0 = clerp(RootJoint.C0,cf(0, 0, 0) * angles(math.rad(-90), math.rad(0), math.rad(180)) * cf(0, 0 , -0.185 + 0.055 * math.cos(sine / wsv2) + -math.sin(sine / wsv2) / 8) * angles(math.rad((LOOKVEC - LOOKVEC/5 * math.cos(sine / wsv2))*10), math.rad((-RIGHTVEC - -RIGHTVEC/5 * math.cos(sine / 6))*5) , math.rad(0 * math.cos(sine / wsv))), .1)
- RH.C0 = clerp(RH.C0, cf(1, -0.8+ .35 * math.sin(sine / wsv), -.15)* angles(math.rad(0),math.rad(90),math.rad(0))*RIGHTHIPSECOND*angles(math.rad(0),math.rad(0),math.rad(0 - 5 * math.cos(sine / wsv))), .1)
- LH.C0 = clerp(LH.C0, cf(-1, -0.8- .35 * math.sin(sine / wsv), -.15)* angles(math.rad(0),math.rad(-90),math.rad(0))*LEFTHIPSECOND*angles(math.rad(0),math.rad(0),math.rad(0 - 5 * math.cos(sine / wsv))), .1)
- end
- elseif torvel >= 22 and torvel < 200 and hitfloor ~= nil and hum:GetState() ~= Enum.HumanoidStateType.Swimming and hum:GetState() ~= Enum.HumanoidStateType.Climbing then
- Anim = "Run"
- if attack == false then
- if flyingmode == false then
- local Testwalk1 = hum.MoveDirection*Torso.CFrame.LookVector
- local Testwalk2 = hum.MoveDirection*Torso.CFrame.RightVector
- LOOKVEC = Testwalk1.X+Testwalk1.Z
- RIGHTVEC = Testwalk2.X+Testwalk2.Z
- wsv = 5
- wsv2 = 2.5
- local RIGHTHIPSECOND = cf(LOOKVEC/6 * math.cos(sine / wsv),0,0)*angles(math.sin(RIGHTVEC/1.5) * math.cos(sine / wsv),0,math.sin(-LOOKVEC/1.5) * math.cos(sine / wsv))
- local LEFTHIPSECOND = cf(-LOOKVEC/6 * math.cos(sine / wsv),0,0)*angles(math.sin(RIGHTVEC/1.5) * math.cos(sine / wsv),0,math.sin(-LOOKVEC/1.5) * math.cos(sine / wsv))
- RW.C0 = clerp(RW.C0, cf(1.5 + .0 * math.cos(sine / wsv) , 0.5 + RIGHTVEC/30* math.cos(sine / wsv), 0) * angles(math.rad(0 + LOOKVEC*150 * math.cos(sine / wsv)), math.rad(0), math.rad(4 + RIGHTVEC*5 * math.cos(sine / wsv))), .1)
- LW.C0 = clerp(LW.C0, cf(-1.5 + .0 * math.cos(sine / wsv), 0.5 + RIGHTVEC/30 * math.cos(sine / wsv), 0)*angles(math.rad(0 - LOOKVEC*150 * math.cos(sine / wsv)), math.rad(0), math.rad(-4 - RIGHTVEC*5 * math.cos(sine / wsv))), .1)
- RootJoint.C0 = clerp(RootJoint.C0,cf(0, 0, 0) * angles(math.rad(-110), math.rad(0), math.rad(180)) * cf(0, 0 , -0.185 + 0.055 * math.cos(sine / wsv2) + -math.sin(sine / wsv2) / 8) * angles(math.rad((LOOKVEC - LOOKVEC/5 * math.cos(sine / wsv2))*10), math.rad((-RIGHTVEC - -RIGHTVEC/5 * math.cos(sine / 6))*5) , math.rad(0 * math.cos(sine / wsv))), .1)
- RH.C0 = clerp(RH.C0, cf(1, -0.8+ .5 * math.sin(sine / (wsv)), -.15)* angles(math.rad(0),math.rad(90),math.rad(0))*RIGHTHIPSECOND*angles(math.rad(0),math.rad(0),math.rad(0 - LOOKVEC*50 * math.cos(sine / (wsv)))), .1)
- LH.C0 = clerp(LH.C0, cf(-1, -0.8- .5 * math.sin(sine / (wsv)), -.15)* angles(math.rad(0),math.rad(-90),math.rad(0))*LEFTHIPSECOND*angles(math.rad(0),math.rad(0),math.rad(0 - LOOKVEC*50 * math.cos(sine / (wsv)))), .1)
- elseif flyingmode == true then
- local walk1 = hum.MoveDirection*Torso.CFrame.LookVector
- local walk2 = hum.MoveDirection*Torso.CFrame.RightVector
- lookVector = walk1.X+walk1.Z
- rightVector = walk2.X+walk2.Z
- wsv = 4
- wsv2 = 2
- RW.C0 = clerp(RW.C0, cf(1.5 + .0 * math.cos(sine / wsv) , 0.5 + rightVector/89* math.cos(sine / wsv), 0) * angles(math.rad(0 - lookVector*55), math.rad(0), math.rad(8 - rightVector*5)), .1)
- Neck.C0 = clerp(Neck.C0, cf(0, 1, 0) * angles(math.rad(-90), math.rad(0), math.rad(180)) * cf(0, 0, 0 + ((1) - 1)) * angles(math.rad(-2 - lookVector*25), math.rad(0), math.rad(0)), .1)
- LW.C0 = clerp(LW.C0, cf(-1.5 + .0 * math.cos(sine / wsv), 0.5 + rightVector/89 * math.cos(sine / wsv), 0)*angles(math.rad(0 - lookVector*55), math.rad(0), math.rad(-8 - rightVector*5)), .1)
- RootJoint.C0 = clerp(RootJoint.C0,cf(0, 1.2 + 0.5 * math.cos(sine/32), 0) * angles(math.rad(-90), math.rad(0), math.rad(180)) * cf(0, 0 , -0.185) * angles(math.rad((lookVector - lookVector/5)*105), math.rad((-rightVector - -rightVector/5)*5) , math.rad(0)), .1)
- RH.C0 = clerp(RH.C0, cf(1, -0.5, -.5)* angles(math.rad(-15),math.rad(90),math.rad(0))*angles(math.rad(0 + rightVector*20),math.rad(0),math.rad(0)), .1)
- LH.C0 = clerp(LH.C0, cf(-1, -1, .1)* angles(math.rad(-15),math.rad(-90),math.rad(0))*angles(math.rad(0 - rightVector*20),math.rad(0),math.rad(0)), .1)
- end
- end
- elseif torvel > 200 and hitfloor ~= nil and hum:GetState() ~= Enum.HumanoidStateType.Swimming and hum:GetState() ~= Enum.HumanoidStateType.Climbing then
- Anim = "FasterRun"
- if attack == false then
- local Testwalk1 = hum.MoveDirection*Torso.CFrame.LookVector
- local Testwalk2 = hum.MoveDirection*Torso.CFrame.RightVector
- LOOKVEC = Testwalk1.X+Testwalk1.Z
- RIGHTVEC = Testwalk2.X+Testwalk2.Z
- wsv = 3
- wsv2 = 1.5
- local RIGHTHIPSECOND = cf(LOOKVEC/6 * math.cos(sine / wsv),0,0)*angles(math.sin(RIGHTVEC/1.5) * math.cos(sine / wsv),0,math.sin(-LOOKVEC/1.5) * math.cos(sine / wsv))
- local LEFTHIPSECOND = cf(-LOOKVEC/6 * math.cos(sine / wsv),0,0)*angles(math.sin(RIGHTVEC/1.5) * math.cos(sine / wsv),0,math.sin(-LOOKVEC/1.5) * math.cos(sine / wsv))
- RW.C0 = clerp(RW.C0, cf(1.5 + 0 * math.cos(sine / wsv) , 0.5 + RIGHTVEC/30* math.cos(sine / wsv), 0) * angles(math.rad(-70 + RIGHTVEC*10), math.rad(0), math.rad(4 + RIGHTVEC*5 * math.cos(sine / wsv))), .1)
- LW.C0 = clerp(LW.C0, cf(-1.5 - 0 * math.cos(sine / wsv), 0.5 + RIGHTVEC/30 * math.cos(sine / wsv), 0)*angles(math.rad(-70 + RIGHTVEC*10), math.rad(0), math.rad(-4 - RIGHTVEC*5 * math.cos(sine / wsv))), .1)
- RootJoint.C0 = clerp(RootJoint.C0,cf(0, 0, 0) * angles(math.rad(-130), math.rad(0), math.rad(180)) * cf(0, 0 , -0.185 + 0.055 * math.cos(sine / wsv2) + -math.sin(sine / wsv2) / 8) * angles(math.rad((LOOKVEC - LOOKVEC/5 * math.cos(sine / wsv2))*10), math.rad((-RIGHTVEC - -RIGHTVEC/5 * math.cos(sine / 6))*5) , math.rad(0 * math.cos(sine / wsv))), .1)
- RH.C0 = clerp(RH.C0, cf(1, -0.8+ .8 * math.sin(sine / (wsv)), -.15)* angles(math.rad(0),math.rad(90),math.rad(0))*RIGHTHIPSECOND*angles(math.rad(0),math.rad(0),math.rad(0 - LOOKVEC*100 * math.cos(sine / (wsv)))), .1)
- LH.C0 = clerp(LH.C0, cf(-1, -0.8- .8 * math.sin(sine / (wsv)), -.15)* angles(math.rad(0),math.rad(-90),math.rad(0))*LEFTHIPSECOND*angles(math.rad(0),math.rad(0),math.rad(0 - LOOKVEC*100 * math.cos(sine / (wsv)))), .1)
- end
- end
- end
- end
- ]=], owner.Character):WaitForChild 'ServerRemote';
- local mouse = owner:GetMouse()
- mouse.Button1Down:connect(function()
- remote:InvokeServer (1,mouse);
- end)
- mouse.Button1Up:Connect(function()
- remote:InvokeServer (3,mouse);
- end)
- mouse.KeyDown:connect(function(k)
- k = k:lower()
- remote:InvokeServer (2, k);
- end)
- mouse.KeyUp:connect(function(k)
- k = k:lower()
- remote:InvokeServer (6, k);
- end)
- remote.OnClientInvoke = function (request, ...)
- if (request == 1) then
- return mouse.Hit.p;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement