Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --https://github.com/Mokiros/roblox-FE-compatibility
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,game,owner = owner,game
- local RealPlayer = Player
- do print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Model0 = Instance.new("Model")
- UnionOperation1 = Instance.new("UnionOperation")
- Motor6D2 = Instance.new("Motor6D")
- Motor6D3 = Instance.new("Motor6D")
- Motor6D4 = Instance.new("Motor6D")
- Motor6D5 = Instance.new("Motor6D")
- Motor6D6 = Instance.new("Motor6D")
- Beam7 = Instance.new("Beam")
- Sound8 = Instance.new("Sound")
- UnionOperation9 = Instance.new("UnionOperation")
- Decal10 = Instance.new("Decal")
- BillboardGui11 = Instance.new("BillboardGui")
- TextLabel12 = Instance.new("TextLabel")
- TextLabel13 = Instance.new("TextLabel")
- Script14 = Instance.new("Script")
- Part15 = Instance.new("Part")
- Motor6D16 = Instance.new("Motor6D")
- Sound17 = Instance.new("Sound")
- Sound18 = Instance.new("Sound")
- Sound19 = Instance.new("Sound")
- Sound20 = Instance.new("Sound")
- Sound21 = Instance.new("Sound")
- Sound22 = Instance.new("Sound")
- Sound23 = Instance.new("Sound")
- Sound24 = Instance.new("Sound")
- Sound25 = Instance.new("Sound")
- Sound26 = Instance.new("Sound")
- Sound27 = Instance.new("Sound")
- MeshPart28 = Instance.new("MeshPart")
- MeshPart29 = Instance.new("MeshPart")
- MeshPart30 = Instance.new("MeshPart")
- MeshPart31 = Instance.new("MeshPart")
- MeshPart32 = Instance.new("MeshPart")
- Weld33 = Instance.new("Weld")
- MeshPart34 = Instance.new("MeshPart")
- Weld35 = Instance.new("Weld")
- Humanoid36 = Instance.new("Humanoid")
- Part37 = Instance.new("Part")
- SpecialMesh38 = Instance.new("SpecialMesh")
- Script39 = Instance.new("Script")
- Sound40 = Instance.new("Sound")
- Model0.Name = "Joofil"
- Model0.Parent = mas
- Model0.PrimaryPart = Part15
- UnionOperation1.Name = "Torso"
- UnionOperation1.Parent = Model0
- UnionOperation1.CFrame = CFrame.new(90.9493332, 3.05013967, 3.99198079, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- UnionOperation1.Position = Vector3.new(90.9493332, 3.05013967, 3.99198079)
- UnionOperation1.Color = Color3.new(0.129412, 0.329412, 0.72549)
- UnionOperation1.Size = Vector3.new(2.00003052, 2.00002933, 1.00000763)
- UnionOperation1.BrickColor = BrickColor.new("Deep blue")
- UnionOperation1.Material = Enum.Material.SmoothPlastic
- UnionOperation1.brickColor = BrickColor.new("Deep blue")
- UnionOperation1.UsePartColor = true
- Motor6D2.Name = "Head"
- Motor6D2.Parent = UnionOperation1
- Motor6D2.C1 = CFrame.new(-3.9100647e-05, -1.49995828, 2.28881836e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D2.Part0 = UnionOperation1
- Motor6D2.Part1 = UnionOperation9
- Motor6D2.part1 = UnionOperation9
- Motor6D3.Name = "RArm"
- Motor6D3.Parent = UnionOperation1
- Motor6D3.C1 = CFrame.new(-1.50003719, 0.000101089478, 2.28881836e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D3.Part0 = UnionOperation1
- Motor6D3.Part1 = MeshPart29
- Motor6D3.part1 = MeshPart29
- Motor6D4.Name = "LArm"
- Motor6D4.Parent = UnionOperation1
- Motor6D4.C1 = CFrame.new(1.49996281, 0.000101089478, 2.28881836e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D4.Part0 = UnionOperation1
- Motor6D4.Part1 = MeshPart28
- Motor6D4.part1 = MeshPart28
- Motor6D5.Name = "RLeg"
- Motor6D5.Parent = UnionOperation1
- Motor6D5.C1 = CFrame.new(-0.500037193, 2.00010109, 2.28881836e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D5.Part0 = UnionOperation1
- Motor6D5.Part1 = MeshPart30
- Motor6D5.part1 = MeshPart30
- Motor6D6.Name = "LLeg"
- Motor6D6.Parent = UnionOperation1
- Motor6D6.C1 = CFrame.new(0.499962807, 2.00010109, 2.28881836e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D6.Part0 = UnionOperation1
- Motor6D6.Part1 = MeshPart31
- Motor6D6.part1 = MeshPart31
- Beam7.Name = "Neck"
- Beam7.Parent = UnionOperation1
- Beam7.Attachment0 = nil
- Beam7.Attachment1 = nil
- Beam7.FaceCamera = true
- Beam7.LightEmission = 1
- Beam7.LightInfluence = 1
- Beam7.Segments = 50
- Beam7.Texture = "rbxassetid://1134824633"
- Beam7.TextureLength = 5
- Beam7.TextureMode = Enum.TextureMode.Static
- Beam7.TextureSpeed = 2
- Beam7.Transparency = NumberSequence.new(0.20000000298023,0.20000000298023)
- Beam7.Width0 = 0.5
- Beam7.Width1 = 0.5
- Sound8.Name = "Die"
- Sound8.Parent = UnionOperation1
- Sound8.MaxDistance = 300
- Sound8.EmitterSize = 35
- Sound8.MinDistance = 35
- Sound8.SoundId = "rbxassetid://2150821806"
- Sound8.Volume = 2
- UnionOperation9.Name = "Head"
- UnionOperation9.Parent = Model0
- UnionOperation9.CFrame = CFrame.new(90.9493713, 4.55009794, 3.9919579, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- UnionOperation9.Position = Vector3.new(90.9493713, 4.55009794, 3.9919579)
- UnionOperation9.Color = Color3.new(0.937255, 0.721569, 0.219608)
- UnionOperation9.Size = Vector3.new(1.20000005, 1.20000005, 1.20000005)
- UnionOperation9.BrickColor = BrickColor.new("Gold")
- UnionOperation9.Material = Enum.Material.SmoothPlastic
- UnionOperation9.brickColor = BrickColor.new("Gold")
- UnionOperation9.UsePartColor = true
- Decal10.Name = "Smile"
- Decal10.Parent = UnionOperation9
- Decal10.Texture = "http://www.roblox.com/asset/?id=288072938"
- BillboardGui11.Name = "Nametag"
- BillboardGui11.Parent = UnionOperation9
- BillboardGui11.Size = UDim2.new(4, 0, 4, 0)
- BillboardGui11.AlwaysOnTop = true
- BillboardGui11.StudsOffset = Vector3.new(0, 2, 0)
- TextLabel12.Name = "Title"
- TextLabel12.Parent = BillboardGui11
- TextLabel12.Size = UDim2.new(1, 0, 0.25, 0)
- TextLabel12.BackgroundColor = BrickColor.new("Institutional white")
- TextLabel12.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel12.BackgroundTransparency = 1
- TextLabel12.BorderSizePixel = 0
- TextLabel12.ClipsDescendants = true
- TextLabel12.Font = Enum.Font.Fantasy
- TextLabel12.FontSize = Enum.FontSize.Size14
- TextLabel12.Text = "Joofil"
- TextLabel12.TextColor = BrickColor.new("Institutional white")
- TextLabel12.TextColor3 = Color3.new(1, 1, 1)
- TextLabel12.TextScaled = true
- TextLabel12.TextSize = 14
- TextLabel12.TextWrap = true
- TextLabel12.TextWrapped = true
- TextLabel13.Name = "HP"
- TextLabel13.Parent = BillboardGui11
- TextLabel13.Position = UDim2.new(0, 0, 0.25, 0)
- TextLabel13.Size = UDim2.new(1, 0, 0.100000001, 0)
- TextLabel13.BackgroundColor = BrickColor.new("Institutional white")
- TextLabel13.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel13.BackgroundTransparency = 1
- TextLabel13.BorderSizePixel = 0
- TextLabel13.ClipsDescendants = true
- TextLabel13.Font = Enum.Font.Fantasy
- TextLabel13.FontSize = Enum.FontSize.Size48
- TextLabel13.Text = "0/0"
- TextLabel13.TextColor = BrickColor.new("Mint")
- TextLabel13.TextColor3 = Color3.new(0.686275, 1, 0.686275)
- TextLabel13.TextScaled = true
- TextLabel13.TextSize = 45
- TextLabel13.TextWrap = true
- TextLabel13.TextWrapped = true
- Script14.Parent = BillboardGui11
- table.insert(cors,sandbox(Script14,function()
- wait(0.05)
- Humanoid = script.Parent.Parent.Parent:FindFirstChildOfClass("Humanoid")
- script.Parent.HP.Text = math.ceil(Humanoid.Health).."/"..Humanoid.MaxHealth
- Humanoid.Changed:connect(function()
- if Humanoid.Health > Humanoid.MaxHealth/2 then
- script.Parent.HP.TextColor3 = Color3.new(175/255,1,175/255)
- end
- if Humanoid.Health > Humanoid.MaxHealth then
- script.Parent.HP.TextColor3 = Color3.new(175/255,1,225/255)
- end
- if Humanoid.Health > Humanoid.MaxHealth * 1.5 then
- script.Parent.HP.TextColor3 = Color3.new(175/255,1,1)
- end
- if Humanoid.Health > Humanoid.MaxHealth * 3 then
- script.Parent.HP.TextColor3 = Color3.new(175/255,220/255,1)
- end
- if Humanoid.Health > Humanoid.MaxHealth * 10 then
- script.Parent.HP.TextColor3 = Color3.new(175/255,175/255,1)
- end
- if Humanoid.Health < Humanoid.MaxHealth/2 then
- script.Parent.HP.TextColor3 = Color3.new(210/255,1,175/255)
- end
- if Humanoid.Health < Humanoid.MaxHealth/2.5 then
- script.Parent.HP.TextColor3 = Color3.new(230/255,1,175/255)
- end
- if Humanoid.Health < Humanoid.MaxHealth/3 then
- script.Parent.HP.TextColor3 = Color3.new(1,1,175/255)
- end
- if Humanoid.Health < Humanoid.MaxHealth/5 then
- script.Parent.HP.TextColor3 = Color3.new(1,225/255,175/255)
- end
- if Humanoid.Health < Humanoid.MaxHealth/7.5 then
- script.Parent.HP.TextColor3 = Color3.new(1,200/255,175/255)
- end
- if Humanoid.Health < Humanoid.MaxHealth/10 then
- script.Parent.HP.TextColor3 = Color3.new(1,175/255,175/255)
- end
- if Humanoid.Health == 0 then
- script.Parent.HP.Text = "Dead"
- else
- script.Parent.HP.Text = math.ceil(Humanoid.Health).."/"..Humanoid.MaxHealth
- end
- if Humanoid.Health == math.huge then
- script.Parent.HP.Text = "Godded"
- script.Parent.HP.TextColor3 = Color3.new(175/255,175/255,175/255)
- end
- end)
- end))
- Part15.Name = "HumanoidRootPart"
- Part15.Parent = Model0
- Part15.CFrame = CFrame.new(90.9493713, 3.05009794, 3.9919579, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part15.Position = Vector3.new(90.9493713, 3.05009794, 3.9919579)
- Part15.Color = Color3.new(0.937255, 0.721569, 0.219608)
- Part15.Transparency = 1
- Part15.Size = Vector3.new(2, 2, 1)
- Part15.Anchored = true
- Part15.BottomSurface = Enum.SurfaceType.Smooth
- Part15.BrickColor = BrickColor.new("Gold")
- Part15.Material = Enum.Material.SmoothPlastic
- Part15.TopSurface = Enum.SurfaceType.Smooth
- Part15.brickColor = BrickColor.new("Gold")
- Motor6D16.Name = "Root"
- Motor6D16.Parent = Part15
- Motor6D16.C1 = CFrame.new(3.9100647e-05, -4.17232513e-05, -2.28881836e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D16.Part0 = Part15
- Motor6D16.Part1 = UnionOperation1
- Motor6D16.part1 = UnionOperation1
- Sound17.Name = "Chuckle"
- Sound17.Parent = Part15
- Sound17.MaxDistance = 300
- Sound17.EmitterSize = 35
- Sound17.MinDistance = 35
- Sound17.SoundId = "rbxassetid://2545010175"
- Sound17.Volume = 5
- Sound18.Name = "ByeBye"
- Sound18.Parent = Part15
- Sound18.MaxDistance = 300
- Sound18.EmitterSize = 35
- Sound18.MinDistance = 35
- Sound18.SoundId = "rbxassetid://2545211516"
- Sound18.Volume = 5
- Sound19.Name = "ChaosChaos"
- Sound19.Parent = Part15
- Sound19.MaxDistance = 300
- Sound19.EmitterSize = 35
- Sound19.MinDistance = 35
- Sound19.SoundId = "rbxassetid://2545008459"
- Sound19.Volume = 5
- Sound20.Name = "Ha2"
- Sound20.Parent = Part15
- Sound20.MaxDistance = 300
- Sound20.EmitterSize = 35
- Sound20.MinDistance = 35
- Sound20.SoundId = "rbxassetid://2606662454"
- Sound20.Volume = 5
- Sound21.Name = "Ha1"
- Sound21.Parent = Part15
- Sound21.MaxDistance = 300
- Sound21.EmitterSize = 35
- Sound21.MinDistance = 35
- Sound21.SoundId = "rbxassetid://2606661976"
- Sound21.Volume = 5
- Sound22.Name = "Neo"
- Sound22.Parent = Part15
- Sound22.MaxDistance = 300
- Sound22.EmitterSize = 35
- Sound22.MinDistance = 35
- Sound22.SoundId = "rbxassetid://2545018472"
- Sound22.Volume = 5
- Sound23.Name = "MeDoAnything"
- Sound23.Parent = Part15
- Sound23.MaxDistance = 300
- Sound23.EmitterSize = 35
- Sound23.MinDistance = 35
- Sound23.SoundId = "rbxassetid://2544975373"
- Sound23.Volume = 5
- Sound24.Name = "OH"
- Sound24.Parent = Part15
- Sound24.MaxDistance = 300
- Sound24.EmitterSize = 35
- Sound24.MinDistance = 35
- Sound24.SoundId = "rbxassetid://2545012765"
- Sound24.Volume = 5
- Sound25.Name = "Laugh"
- Sound25.Parent = Part15
- Sound25.MaxDistance = 300
- Sound25.EmitterSize = 35
- Sound25.MinDistance = 35
- Sound25.SoundId = "rbxassetid://2545211765"
- Sound25.Volume = 5
- Sound26.Name = "Metamorph"
- Sound26.Parent = Part15
- Sound26.MaxDistance = 300
- Sound26.EmitterSize = 35
- Sound26.MinDistance = 35
- Sound26.SoundId = "rbxassetid://2545011398"
- Sound26.Volume = 5
- Sound27.Name = "Deathed"
- Sound27.Parent = Part15
- Sound27.MaxDistance = 300
- Sound27.EmitterSize = 35
- Sound27.MinDistance = 35
- Sound27.SoundId = "rbxassetid://2637401925"
- Sound27.Volume = 2
- MeshPart28.Name = "Left Arm"
- MeshPart28.Parent = Model0
- MeshPart28.CFrame = CFrame.new(89.4493713, 3.05003858, 3.9919579, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- MeshPart28.Position = Vector3.new(89.4493713, 3.05003858, 3.9919579)
- MeshPart28.Color = Color3.new(0.937255, 0.721569, 0.219608)
- MeshPart28.Size = Vector3.new(1.00004005, 2.00002551, 1)
- MeshPart28.BrickColor = BrickColor.new("Gold")
- MeshPart28.Material = Enum.Material.SmoothPlastic
- MeshPart28.brickColor = BrickColor.new("Gold")
- MeshPart29.Name = "Right Arm"
- MeshPart29.Parent = Model0
- MeshPart29.CFrame = CFrame.new(92.4493713, 3.05003858, 3.9919579, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- MeshPart29.Position = Vector3.new(92.4493713, 3.05003858, 3.9919579)
- MeshPart29.Color = Color3.new(0.937255, 0.721569, 0.219608)
- MeshPart29.Size = Vector3.new(1.00004005, 2.00002551, 1)
- MeshPart29.BrickColor = BrickColor.new("Gold")
- MeshPart29.Material = Enum.Material.SmoothPlastic
- MeshPart29.brickColor = BrickColor.new("Gold")
- MeshPart30.Name = "Right Leg"
- MeshPart30.Parent = Model0
- MeshPart30.CFrame = CFrame.new(91.4493713, 1.05003858, 3.9919579, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- MeshPart30.Position = Vector3.new(91.4493713, 1.05003858, 3.9919579)
- MeshPart30.Color = Color3.new(0.294118, 0.592157, 0.294118)
- MeshPart30.Size = Vector3.new(1.00004005, 2.00002551, 1)
- MeshPart30.BrickColor = BrickColor.new("Bright green")
- MeshPart30.Material = Enum.Material.SmoothPlastic
- MeshPart30.brickColor = BrickColor.new("Bright green")
- MeshPart31.Name = "Left Leg"
- MeshPart31.Parent = Model0
- MeshPart31.CFrame = CFrame.new(90.4493713, 1.05003858, 3.9919579, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- MeshPart31.Position = Vector3.new(90.4493713, 1.05003858, 3.9919579)
- MeshPart31.Color = Color3.new(0.294118, 0.592157, 0.294118)
- MeshPart31.Size = Vector3.new(1.00004005, 2.00002551, 1)
- MeshPart31.BrickColor = BrickColor.new("Bright green")
- MeshPart31.Material = Enum.Material.SmoothPlastic
- MeshPart31.brickColor = BrickColor.new("Bright green")
- MeshPart32.Name = "Hat"
- MeshPart32.Parent = Model0
- MeshPart32.CFrame = CFrame.new(90.9493713, 5.24997807, 4.49198818, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- MeshPart32.Position = Vector3.new(90.9493713, 5.24997807, 4.49198818)
- MeshPart32.Color = Color3.new(0.129412, 0.329412, 0.72549)
- MeshPart32.Size = Vector3.new(2.75788856, 1.64599526, 2.41334939)
- MeshPart32.BrickColor = BrickColor.new("Deep blue")
- MeshPart32.CanCollide = false
- MeshPart32.Material = Enum.Material.SmoothPlastic
- MeshPart32.brickColor = BrickColor.new("Deep blue")
- Weld33.Name = "Joint"
- Weld33.Parent = MeshPart32
- Weld33.C0 = CFrame.new(0, -0.699880123, -0.500030518, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld33.Part0 = MeshPart32
- Weld33.Part1 = UnionOperation9
- Weld33.part1 = UnionOperation9
- MeshPart34.Name = "Tail"
- MeshPart34.Parent = Model0
- MeshPart34.CFrame = CFrame.new(90.9493713, 1.47997928, 5.59194088, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- MeshPart34.Position = Vector3.new(90.9493713, 1.47997928, 5.59194088)
- MeshPart34.Color = Color3.new(0.129412, 0.329412, 0.72549)
- MeshPart34.Size = Vector3.new(0.462002546, 1.40317202, 2.49498963)
- MeshPart34.BrickColor = BrickColor.new("Deep blue")
- MeshPart34.CanCollide = false
- MeshPart34.Material = Enum.Material.SmoothPlastic
- MeshPart34.brickColor = BrickColor.new("Deep blue")
- Weld35.Name = "Joint"
- Weld35.Parent = MeshPart34
- Weld35.C0 = CFrame.new(-3.81469727e-05, 1.57016039, -1.59996033, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld35.Part0 = MeshPart34
- Weld35.Part1 = UnionOperation1
- Weld35.part1 = UnionOperation1
- Humanoid36.Parent = Model0
- Humanoid36.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
- Humanoid36.Health = 6500
- Humanoid36.LeftLeg = MeshPart31
- Humanoid36.MaxHealth = 6500
- Humanoid36.MaxSlopeAngle = 89.900001525879
- Humanoid36.RightLeg = MeshPart30
- Humanoid36.Torso = Part15
- Humanoid36.maxHealth = 6500
- Part37.Name = "Wheelchair"
- Part37.Parent = Model0
- Part37.CFrame = CFrame.new(90.9493713, 2.14998198, 3.9919579, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part37.Position = Vector3.new(90.9493713, 2.14998198, 3.9919579)
- Part37.Transparency = 1
- Part37.Size = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
- Part37.Anchored = true
- Part37.BottomSurface = Enum.SurfaceType.Smooth
- Part37.CanCollide = false
- Part37.Material = Enum.Material.SmoothPlastic
- Part37.TopSurface = Enum.SurfaceType.Smooth
- SpecialMesh38.Parent = Part37
- SpecialMesh38.MeshId = "rbxassetid://1226669573"
- SpecialMesh38.Scale = Vector3.new(2, 2, 2)
- SpecialMesh38.TextureId = "rbxassetid://1226669284"
- SpecialMesh38.MeshType = Enum.MeshType.FileMesh
- Script39.Name = "REOOFING"
- Script39.Parent = Model0
- table.insert(cors,sandbox(Script39,function()
- IT = Instance.new
- CF = CFrame.new
- VT = Vector3.new
- RAD = math.rad
- C3 = Color3.new
- UD2 = UDim2.new
- BRICKC = BrickColor.new
- ANGLES = CFrame.Angles
- EULER = CFrame.fromEulerAnglesXYZ
- COS = math.cos
- ACOS = math.acos
- SIN = math.sin
- ASIN = math.asin
- ABS = math.abs
- MRANDOM = math.random
- FLOOR = math.floor
- local GYRO = nil
- local CHARACTER = script.Parent
- local HUMANOID = CHARACTER:FindFirstChildOfClass("Humanoid")
- local TORSO = CHARACTER.Torso
- local ROOT = CHARACTER.HumanoidRootPart
- local RIGHTARM = CHARACTER["Right Arm"]
- local LEFTARM = CHARACTER["Left Arm"]
- local RIGHTLEG = CHARACTER["Right Leg"]
- local LEFTLEG = CHARACTER["Left Leg"]
- RootJoint = ROOT["Root"]
- Neck = TORSO["Head"]
- RightShoulder = TORSO["RArm"]
- LeftShoulder = TORSO["LArm"]
- RightHip = TORSO["RLeg"]
- LeftHip = TORSO["LLeg"]
- local BODY = {}
- local CHAIR = CHARACTER.Wheelchair
- for index, CHILD in pairs(CHARACTER:GetDescendants()) do
- if (CHILD:IsA("BasePart") or CHILD:IsA("Decal") or CHILD:IsA("Beam")) and CHILD ~= ROOT and CHILD ~= CHAIR then
- table.insert(BODY,CHILD)
- end
- end
- local ATTACKING = false
- if script:FindFirstChild("Color") then
- script.Color.Parent = game.Lighting
- end
- local HIT = false
- local MUSIC = script.Music
- local DEAD = false
- MUSIC:Play()
- local CLUBSMESH = 2761335666
- local DIAMONDMESH = 1254392112
- local SPADEMESH = 2760895053
- local HEARTMESH = 105992239 --VT(3.5,3.5,3.5)
- local SCYTHEMESH = 455516381
- local SINE = 0
- local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
- Debris = game:GetService("Debris")
- local Effects = IT("Folder",CHARACTER)
- --//=================================\\
- --|| SAZERENOS' ARTIFICIAL HEARTBEAT
- --\\=================================//
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "ArtificialHB"
- script:WaitForChild("ArtificialHB")
- frame = 1/60
- 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)
- function PositiveAngle(NUMBER)
- if NUMBER >= 0 then
- NUMBER = 0
- end
- return NUMBER
- end
- function NegativeAngle(NUMBER)
- if NUMBER <= 0 then
- NUMBER = 0
- end
- return NUMBER
- end
- function Swait(NUMBER)
- if NUMBER == 0 or NUMBER == nil then
- ArtificialHB.Event:wait()
- else
- for i = 1, NUMBER do
- ArtificialHB.Event:wait()
- end
- end
- end
- --//=================================\\
- --|| FUNCTIONS
- --\\=================================//
- function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
- local NEWMESH = IT(MESH)
- if MESH == "SpecialMesh" then
- NEWMESH.MeshType = MESHTYPE
- if MESHID ~= "nil" and MESHID ~= "" then
- NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
- end
- if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
- NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
- end
- end
- NEWMESH.Offset = OFFSET or VT(0, 0, 0)
- NEWMESH.Scale = SCALE
- NEWMESH.Parent = PARENT
- return NEWMESH
- end
- function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
- local NEWPART = IT("Part")
- NEWPART.formFactor = FORMFACTOR
- NEWPART.Reflectance = REFLECTANCE
- NEWPART.Transparency = TRANSPARENCY
- NEWPART.CanCollide = false
- NEWPART.Locked = true
- NEWPART.Anchored = true
- if ANCHOR == false then
- NEWPART.Anchored = false
- end
- NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
- NEWPART.Name = NAME
- NEWPART.Size = SIZE
- NEWPART.Position = TORSO.Position
- NEWPART.Material = MATERIAL
- NEWPART:BreakJoints()
- NEWPART.Parent = PARENT
- return NEWPART
- end
- local function weldBetween(a, b)
- local weldd = IT("ManualWeld")
- weldd.Part0 = a
- weldd.Part1 = b
- weldd.C0 = CF()
- weldd.C1 = b.CFrame:inverse() * a.CFrame
- weldd.Parent = a
- return weldd
- end
- local S = IT("Sound")
- function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
- local NEWSOUND = nil
- coroutine.resume(coroutine.create(function()
- NEWSOUND = S:Clone()
- NEWSOUND.Parent = PARENT
- NEWSOUND.Volume = VOLUME
- NEWSOUND.Pitch = PITCH
- NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
- NEWSOUND:play()
- if DOESLOOP == true then
- NEWSOUND.Looped = true
- else
- repeat wait(1) until NEWSOUND.Playing == false
- NEWSOUND:remove()
- end
- end))
- return NEWSOUND
- end
- function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
- return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
- end
- function ApplyDamage(Humanoid,Damage)
- Damage = Damage * 1
- if Humanoid.Health ~= 0 then
- Humanoid.Health = Humanoid.Health - Damage
- end
- end
- function ApplyAoE(POSITION,RANGE,MINDMG,MAXDMG,FLING,INSTAKILL)
- for index, CHILD in pairs(workspace:GetDescendants()) do
- if CHILD.ClassName == "Model" and CHILD ~= CHARACTER then
- local HUM = CHILD:FindFirstChildOfClass("Humanoid")
- if HUM then
- local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
- if TORSO then
- if (TORSO.Position - POSITION).Magnitude <= RANGE then
- if INSTAKILL == true then
- CHILD:BreakJoints()
- else
- local DMG = MRANDOM(MINDMG,MAXDMG)
- ApplyDamage(HUM,DMG)
- end
- if FLING > 0 then
- for _, c in pairs(CHILD:GetChildren()) do
- if c:IsA("BasePart") then
- local bv = Instance.new("BodyVelocity")
- bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
- bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
- bv.Parent = c
- Debris:AddItem(bv,0.05)
- end
- end
- end
- end
- end
- end
- end
- end
- end
- --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
- function WACKYEFFECT(Table)
- local TYPE = (Table.EffectType or "Sphere")
- local SIZE = (Table.Size or VT(1,1,1))
- local ENDSIZE = (Table.Size2 or VT(0,0,0))
- local TRANSPARENCY = (Table.Transparency or 0)
- local ENDTRANSPARENCY = (Table.Transparency2 or 1)
- local CFRAME = (Table.CFrame or TORSO.CFrame)
- local MOVEDIRECTION = (Table.MoveToPos or nil)
- local ROTATION1 = (Table.RotationX or 0)
- local ROTATION2 = (Table.RotationY or 0)
- local ROTATION3 = (Table.RotationZ or 0)
- local MATERIAL = (Table.Material or "Neon")
- local COLOR = (Table.Color or C3(1,1,1))
- local TIME = (Table.Time or 45)
- local SOUNDID = (Table.SoundID or nil)
- local SOUNDPITCH = (Table.SoundPitch or nil)
- local SOUNDVOLUME = (Table.SoundVolume or nil)
- coroutine.resume(coroutine.create(function()
- local PLAYSSOUND = false
- local SOUND = nil
- local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
- if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
- PLAYSSOUND = true
- SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
- end
- EFFECT.Color = COLOR
- local MSH = nil
- if TYPE == "Sphere" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
- elseif TYPE == "Block" or TYPE == "Box" then
- MSH = IT("BlockMesh",EFFECT)
- MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
- elseif TYPE == "Wave" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
- elseif TYPE == "Ring" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
- elseif TYPE == "Slash" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
- elseif TYPE == "Round Slash" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
- elseif TYPE == "Swirl" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
- elseif TYPE == "Skull" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
- elseif TYPE == "Crystal" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
- end
- if MSH ~= nil then
- local MOVESPEED = nil
- if MOVEDIRECTION ~= nil then
- MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
- end
- local GROWTH = SIZE - ENDSIZE
- local TRANS = TRANSPARENCY - ENDTRANSPARENCY
- if TYPE == "Block" then
- EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
- else
- EFFECT.CFrame = CFRAME
- end
- for LOOP = 1, TIME+1 do
- Swait()
- MSH.Scale = MSH.Scale - GROWTH/TIME
- if TYPE == "Wave" then
- MSH.Offset = VT(0,0,-MSH.Scale.X/8)
- end
- EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
- if TYPE == "Block" then
- EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
- else
- EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
- end
- if MOVEDIRECTION ~= nil then
- local ORI = EFFECT.Orientation
- EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
- EFFECT.Orientation = ORI
- end
- end
- if PLAYSSOUND == false then
- EFFECT:remove()
- else
- repeat Swait() until SOUND.Playing == false
- EFFECT:remove()
- end
- else
- if PLAYSSOUND == false then
- EFFECT:remove()
- else
- repeat Swait() until SOUND.Playing == false
- EFFECT:remove()
- end
- end
- end))
- end
- function Transparent(CY)
- for E = 1, #BODY do
- if BODY[E].ClassName ~= "Beam" then
- BODY[E].Transparency = CY
- else
- BODY[E].Transparency = NumberSequence.new(CY)
- end
- end
- end
- --//=================================\\
- --|| CLERPING
- --\\=================================//
- function QuaternionFromCFrame(cf)
- local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
- local trace = m00 + m11 + m22
- if trace > 0 then
- local s = math.sqrt(1 + trace)
- local recip = 0.5 / s
- return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
- else
- local i = 0
- if m11 > m00 then
- i = 1
- end
- if m22 > (i == 0 and m00 or m11) then
- i = 2
- end
- if i == 0 then
- local s = math.sqrt(m00 - m11 - m22 + 1)
- local recip = 0.5 / s
- return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
- elseif i == 1 then
- local s = math.sqrt(m11 - m22 - m00 + 1)
- local recip = 0.5 / s
- return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
- elseif i == 2 then
- local s = math.sqrt(m22 - m00 - m11 + 1)
- local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
- end
- end
- end
- function QuaternionToCFrame(px, py, pz, x, y, z, w)
- local xs, ys, zs = x + x, y + y, z + z
- local wx, wy, wz = w * xs, w * ys, w * zs
- local xx = x * xs
- local xy = x * ys
- local xz = x * zs
- local yy = y * ys
- local yz = y * zs
- local zz = z * zs
- return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
- end
- function QuaternionSlerp(a, b, t)
- local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
- local startInterp, finishInterp;
- if cosTheta >= 0.0001 then
- if (1 - cosTheta) > 0.0001 then
- local theta = ACOS(cosTheta)
- local invSinTheta = 1 / SIN(theta)
- startInterp = SIN((1 - t) * theta) * invSinTheta
- finishInterp = SIN(t * theta) * invSinTheta
- else
- startInterp = 1 - t
- finishInterp = t
- end
- else
- if (1 + cosTheta) > 0.0001 then
- local theta = ACOS(-cosTheta)
- local invSinTheta = 1 / SIN(theta)
- startInterp = SIN((t - 1) * theta) * invSinTheta
- finishInterp = SIN(t * theta) * invSinTheta
- else
- startInterp = t - 1
- finishInterp = t
- end
- end
- return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
- end
- function Clerp(a, b, t)
- local qa = {QuaternionFromCFrame(a)}
- local qb = {QuaternionFromCFrame(b)}
- local ax, ay, az = a.x, a.y, a.z
- local bx, by, bz = b.x, b.y, b.z
- local _t = 1 - t
- return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
- end
- function ClerpBody(TABLE,PRIORITY)
- if PRIORITY == "Attack" or ATTACKING == false then
- RootJoint.C1 = Clerp(RootJoint.C1, TABLE[1], 0.35)
- if HIT == false then
- Neck.C1 = Clerp(Neck.C1, TABLE[2], 0.35)
- end
- RightShoulder.C1 = Clerp(RightShoulder.C1, TABLE[3], 0.35)
- LeftShoulder.C1 = Clerp(LeftShoulder.C1, TABLE[4], 0.35)
- RightHip.C1 = Clerp(RightHip.C1, TABLE[5], 0.35)
- LeftHip.C1 = Clerp(LeftHip.C1, TABLE[6], 0.35)
- end
- end
- --//=================================\\
- --|| ATRIFICIAL INTELLIGENCE
- --\\=================================//
- local GoTo = function(TO)
- CHARACTER:SetPrimaryPartCFrame(Clerp(ROOT.CFrame,CF(ROOT.Position,TO),0.5)*CF(0,0,-HUMANOID.WalkSpeed/32))
- CHARACTER:SetPrimaryPartCFrame(CF(ROOT.Position)*ANGLES(0,RAD(ROOT.Orientation.Y),0))
- end
- function TestForTarget(PRT,target)
- local to = true
- if PRT then
- if PRT:FindFirstAncestorOfClass("Model") == target.Parent then
- to = false
- end
- end
- return to
- end
- function ChaosOrAnything()
- local PLAY = {ROOT.MeDoAnything,ROOT.ChaosChaos}
- PLAY[MRANDOM(1,2)]:Play()
- end
- function OhOhOh(TARGET)
- local FOE = TARGET.Torso
- if FOE then
- ATTACKING = true
- ChaosOrAnything()
- local E = 0
- repeat
- Swait()
- E = E + 1
- ClerpBody({
- CF(0,-E/25,0)*ANGLES(RAD(0),RAD(0),RAD(0)),
- CF(0,-0.5,0)*ANGLES(RAD(15),RAD(0),RAD(0))*CF(0,-1,0),
- CF(0,0.5,0)*ANGLES(RAD(-120),RAD(0),RAD(35))*CF(-1.5,-0.5,0),
- CF(0,0.5,0)*ANGLES(RAD(-120),RAD(0),RAD(-35))*CF(1.5,-0.5,0),
- CF(-0,0.5,0)*ANGLES(RAD(15),RAD(0),RAD(0))*CF(-0.5,1,0.5),
- CF(0,0.5,0)*ANGLES(RAD(15),RAD(0),RAD(0))*CF(0.5,0.9,0.5),
- },"Attack")
- until ROOT.ChaosChaos.Playing == false and ROOT.MeDoAnything.Playing == false
- for i = 1, MRANDOM(3,5) do
- local TO = FOE.Position
- local MOVETO = CF(FOE.Position+VT(0,1,0))*ANGLES(0,RAD(MRANDOM(0,359)),0)*CF(0,0,15)
- CHARACTER:SetPrimaryPartCFrame(MOVETO)
- Transparent(0)
- ROOT.OH:Play()
- for i = 1, 5 do
- ClerpBody({
- CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0)),
- CF(0,-0.5,0)*ANGLES(RAD(5),RAD(0),RAD(0))*CF(0,-1,0),
- CF(0,0.5,0)*ANGLES(RAD(-75),RAD(0),RAD(-35))*CF(-1.5,-0.5,0),
- CF(0,0.5,0)*ANGLES(RAD(-75),RAD(0),RAD(35))*CF(1.5,-0.5,0),
- CF(-0,0.5,0)*ANGLES(RAD(15),RAD(0),RAD(0))*CF(-0.5,1,0.5),
- CF(0,0.5,0)*ANGLES(RAD(15),RAD(0),RAD(0))*CF(0.5,0.9,0.5),
- },"Attack")
- end
- for i = 1, 3 do
- local ANGLE = (50-(25*i))/1.25
- coroutine.resume(coroutine.create(function()
- local TOFIREFROM = ROOT.CFrame*ANGLES(0,RAD(ANGLE),0)
- local CLUB = CreatePart(3, workspace, "Granite", 0, 0, TORSO.BrickColor, "Spade", VT(1.5,0.5,1.5), false)
- CreateMesh("SpecialMesh", CLUB, "FileMesh", CLUBSMESH, "", VT(0.75,0.75,0.75), VT(0,0,0))
- CLUB.CFrame = TOFIREFROM
- local GO = IT("BodyVelocity",CLUB)
- GO.Velocity = CLUB.CFrame.lookVector*65
- Debris:AddItem(CLUB,1)
- CLUB.Touched:Connect(function(HIT)
- if HIT.Parent:FindFirstChildOfClass("Humanoid") and HIT.Parent ~= CHARACTER then
- CLUB:Remove()
- CreateSound(410625063, HIT.Parent:FindFirstChildOfClass("Humanoid").Torso, 2, 1, false)
- HIT.Parent:FindFirstChildOfClass("Humanoid").Health = HIT.Parent:FindFirstChildOfClass("Humanoid").Health - 10
- end
- end)
- end))
- end
- for i = 1, 35 do
- Swait()
- ClerpBody({
- CF(0,-i/350,0)*ANGLES(RAD(0),RAD(0),RAD(0)),
- CF(0,-0.5,0)*ANGLES(RAD(15),RAD(0),RAD(0))*CF(0,-1,0),
- CF(0,0.5,0)*ANGLES(RAD(-120),RAD(0),RAD(35))*CF(-1.5,-0.5,0),
- CF(0,0.5,0)*ANGLES(RAD(-120),RAD(0),RAD(-35))*CF(1.5,-0.5,0),
- CF(-0,0.5,0)*ANGLES(RAD(15),RAD(0),RAD(0))*CF(-0.5,1,0.5),
- CF(0,0.5,0)*ANGLES(RAD(15),RAD(0),RAD(0))*CF(0.5,0.9,0.5),
- },"Attack")
- Transparent(i/35)
- end
- if TARGET.Health <= 0 or DEAD == true then
- break
- end
- end
- ATTACKING = false
- for i = 1, 25 do
- Swait()
- Transparent((25-i)/25)
- end
- Transparent(0)
- end
- end
- function Diamonds(TARGET)
- local FOE = TARGET.Torso
- if FOE then
- ChaosOrAnything()
- ATTACKING = true
- coroutine.resume(coroutine.create(function()
- repeat
- Swait()
- CHARACTER:SetPrimaryPartCFrame(Clerp(ROOT.CFrame,CF(VT(ROOT.Position.X,FOE.Position.Y,ROOT.Position.Z),FOE.Position),0.2))
- ClerpBody({
- CF(0,0.1*SIN(SINE/12),0)*ANGLES(RAD(0),RAD(0),RAD(0)),
- CF(0,-0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(0,-1,0),
- CF(0,0.5,0)*ANGLES(RAD(-120+15*COS(SINE/12)),RAD(0),RAD(35+5*COS(SINE/12)))*CF(-1.5,-0.5,0),
- CF(0,0.5,0)*ANGLES(RAD(-120+15*COS(SINE/12)),RAD(0),RAD(-35-5*COS(SINE/12)))*CF(1.5,-0.5,0),
- CF(-0,0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(-0.5,1,0.5),
- CF(0,0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(0.5,0.9,0.5),
- },"Attack")
- until ATTACKING == false
- end))
- for i = 1, MRANDOM(25,35) do
- coroutine.resume(coroutine.create(function()
- local DIAMOND = CreatePart(3, workspace, "Granite", 0, 1, TORSO.BrickColor, "Diamond", VT(0.5,0.5,1.5), true)
- CreateMesh("SpecialMesh", DIAMOND, "FileMesh", DIAMONDMESH, "", VT(0.1, 0.05, 0.15), VT(0,0,0))
- DIAMOND.CFrame = ROOT.CFrame*CF(MRANDOM(-150,150)/20,0,-1.5)
- for i = 1, 15 do
- Swait()
- DIAMOND.Transparency = (15-i)/15
- DIAMOND.CFrame = DIAMOND.CFrame*CF(0,0,-(15-i)/35)
- end
- DIAMOND.Anchored = false
- DIAMOND.Transparency = 0
- local GO = IT("BodyVelocity",DIAMOND)
- GO.Velocity = DIAMOND.CFrame.lookVector*15
- Debris:AddItem(DIAMOND,1)
- DIAMOND.Touched:Connect(function(HIT)
- if HIT.Parent:FindFirstChildOfClass("Humanoid") and HIT.Parent ~= CHARACTER then
- DIAMOND:Remove()
- CreateSound(410625063, HIT.Parent:FindFirstChildOfClass("Humanoid").Torso, 2, 1, false)
- HIT.Parent:FindFirstChildOfClass("Humanoid").Health = HIT.Parent:FindFirstChildOfClass("Humanoid").Health - 7.5
- end
- end)
- for i = 1, 5 do
- Swait()
- GO.Velocity = DIAMOND.CFrame.lookVector*(15*i)
- end
- end))
- if TARGET.Health <= 0 or DEAD == true then
- break
- end
- Swait(7)
- end
- ATTACKING = false
- end
- end
- function RingAround(TARGET)
- local FOE = TARGET.Torso
- if FOE then
- ATTACKING = true
- ChaosOrAnything()
- local E = 0
- repeat
- Swait()
- E = E + 1
- ClerpBody({
- CF(0,(-E/25)+0.1*SIN(SINE/12),0)*ANGLES(RAD(0),RAD(0),RAD(0)),
- CF(0,-0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(0,-1,0),
- CF(0,0.5,0)*ANGLES(RAD(-120+15*COS(SINE/12)),RAD(0),RAD(35+5*COS(SINE/12)))*CF(-1.5,-0.5,0),
- CF(0,0.5,0)*ANGLES(RAD(-120+15*COS(SINE/12)),RAD(0),RAD(-35-5*COS(SINE/12)))*CF(1.5,-0.5,0),
- CF(-0,0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(-0.5,1,0.5),
- CF(0,0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(0.5,0.9,0.5),
- },"Attack")
- until ROOT.ChaosChaos.Playing == false and ROOT.MeDoAnything.Playing == false
- coroutine.resume(coroutine.create(function()
- repeat
- Swait()
- CHARACTER:SetPrimaryPartCFrame(Clerp(ROOT.CFrame,CF(ROOT.Position,VT(FOE.Position.X,ROOT.Position.Y,FOE.Position.Z)),0.2))
- ClerpBody({
- CF(0,0.1*SIN(SINE/12),0)*ANGLES(RAD(0),RAD(0),RAD(0)),
- CF(0,-0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(0,-1,0),
- CF(0,0.5,0)*ANGLES(RAD(-120+15*COS(SINE/12)),RAD(0),RAD(35+5*COS(SINE/12)))*CF(-1.5,-0.5,0),
- CF(0,0.5,0)*ANGLES(RAD(-120+15*COS(SINE/12)),RAD(0),RAD(-35-5*COS(SINE/12)))*CF(1.5,-0.5,0),
- CF(-0,0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(-0.5,1,0.5),
- CF(0,0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(0.5,0.9,0.5),
- },"Attack")
- until ATTACKING == false
- end))
- for i = 1, MRANDOM(2,4) do
- local SPAWN = CF(FOE.Position)*ANGLES(0,RAD(MRANDOM(0,359)),0)
- local SPADES = {}
- for i = 1, 10 do
- local SPADE = CreatePart(3, workspace, "Granite", 0, 1, TORSO.BrickColor, "Spade", VT(2,2,2), true)
- CreateMesh("SpecialMesh", SPADE, "FileMesh", SPADEMESH, "", VT(1.2,1.2,1.2), VT(0,0,0))
- SPADE.CFrame = SPAWN*ANGLES(0,RAD(36*i),0)*CF(0,0,35)
- SPADE.Touched:Connect(function(HIT)
- if HIT.Parent:FindFirstChildOfClass("Humanoid") and HIT.Parent ~= CHARACTER then
- SPADE:Remove()
- CreateSound(410625063, HIT.Parent:FindFirstChildOfClass("Humanoid").Torso, 2, 1, false)
- HIT.Parent:FindFirstChildOfClass("Humanoid").Health = HIT.Parent:FindFirstChildOfClass("Humanoid").Health - 10
- end
- end)
- table.insert(SPADES,SPADE)
- end
- for i = 1, 25 do
- for E = 1, #SPADES do
- SPADES[E].CFrame = SPADES[E].CFrame * CF(0,0,-0.5)
- SPADES[E].Transparency = (10-i)/9.5
- end
- Swait()
- end
- wait(0.2)
- for E = 1, #SPADES do
- coroutine.resume(coroutine.create(function()
- local SPADE = SPADES[E]
- for i = 1, 15 do
- SPADE.CFrame = SPADE.CFrame*CF(0,0,(15-i)/15)
- Swait()
- end
- SPADE.Anchored = false
- local GO = IT("BodyVelocity",SPADE)
- GO.Velocity = SPADE.CFrame.lookVector*5
- GO.MaxForce = GO.MaxForce * 100
- Debris:AddItem(SPADE,1)
- SPADE.Touched:Connect(function(HIT)
- if HIT.Parent:FindFirstChildOfClass("Humanoid") and HIT.Parent ~= CHARACTER then
- SPADE:Remove()
- CreateSound(410625063, HIT.Parent:FindFirstChildOfClass("Humanoid").Torso, 2, 1, false)
- HIT.Parent:FindFirstChildOfClass("Humanoid").Health = HIT.Parent:FindFirstChildOfClass("Humanoid").Health - 2.5
- end
- end)
- for i = 1, 15 do
- Swait()
- GO.Velocity = SPADE.CFrame.lookVector*(5*i)
- end
- end))
- Swait(5)
- end
- if TARGET.Health <= 0 or DEAD == true then
- break
- end
- end
- wait(0.5)
- ATTACKING = false
- end
- end
- function HeartsGoesOut(TARGET)
- local FOE = TARGET.Torso
- if FOE then
- ChaosOrAnything()
- ATTACKING = true
- coroutine.resume(coroutine.create(function()
- repeat
- Swait()
- CHARACTER:SetPrimaryPartCFrame(Clerp(ROOT.CFrame,CF(ROOT.Position,VT(FOE.Position.X,ROOT.Position.Y,FOE.Position.Z)),0.2))
- ClerpBody({
- CF(0,0.1*SIN(SINE/12),0)*ANGLES(RAD(0),RAD(0),RAD(0)),
- CF(0,-0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(0,-1,0),
- CF(0,0.5,0)*ANGLES(RAD(-120+15*COS(SINE/12)),RAD(0),RAD(35+5*COS(SINE/12)))*CF(-1.5,-0.5,0),
- CF(0,0.5,0)*ANGLES(RAD(-120+15*COS(SINE/12)),RAD(0),RAD(-35-5*COS(SINE/12)))*CF(1.5,-0.5,0),
- CF(-0,0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(-0.5,1,0.5),
- CF(0,0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(0.5,0.9,0.5),
- },"Attack")
- until ATTACKING == false
- end))
- for i = 1, MRANDOM(5,7) do
- local SPAWN = CF(FOE.Position+VT(0,1,0))*ANGLES(0,RAD(MRANDOM(0,359)),0)*CF(0,0,35)
- SPAWN = CF(SPAWN.p,FOE.Position+VT(0,1,0))
- coroutine.resume(coroutine.create(function()
- local HEARTS = {}
- for i = 1, 4 do
- local HEART = CreatePart(3, workspace, "Granite", 0, 1, TORSO.BrickColor, "Heart", VT(2,2,2), true)
- CreateMesh("SpecialMesh", HEART, "FileMesh", HEARTMESH, "", VT(3.5,3.5,3.5), VT(0,0,0))
- HEART.CFrame = SPAWN*ANGLES(0,RAD((360/4)*i),0)
- HEART.Touched:Connect(function(HIT)
- if HIT.Parent:FindFirstChildOfClass("Humanoid") and HIT.Parent ~= CHARACTER then
- HEART:Remove()
- CreateSound(410625063, HIT.Parent:FindFirstChildOfClass("Humanoid").Torso, 2, 1, false)
- HIT.Parent:FindFirstChildOfClass("Humanoid").Health = HIT.Parent:FindFirstChildOfClass("Humanoid").Health - 7.5
- end
- end)
- table.insert(HEARTS,HEART)
- end
- for i = 1, 10 do
- Swait()
- for E = 1, #HEARTS do
- HEARTS[E].CFrame = HEARTS[E].CFrame*CF(0,0,-(10-i)/10)
- HEARTS[E].Transparency = (10-i)/9.5
- end
- end
- local DIST = (HEARTS[1].Position - SPAWN.p).Magnitude
- for i = 1, 100 do
- Swait()
- SPAWN = SPAWN*CF(0,0,-1)
- for E = 1, #HEARTS do
- HEARTS[E].Transparency = 0
- HEARTS[E].CFrame = SPAWN*ANGLES(0,RAD(((360/4)*E)+(i*5)),0)*CF(0,0,-DIST)
- end
- end
- for E = 1, #HEARTS do
- HEARTS[E]:Destroy()
- end
- end))
- Swait(35)
- if TARGET.Health <= 0 or DEAD == true then
- break
- end
- end
- wait(0.5)
- ATTACKING = false
- end
- end
- function Meta(TARGET)
- local FOE = TARGET.Torso
- if FOE then
- ROOT.Metamorph:Play()
- ATTACKING = true
- local SCYTHE = CreatePart(3, workspace, "Granite", 0, 1, TORSO.BrickColor, "Diamond", VT(3,0,3), true)
- CreateMesh("SpecialMesh", SCYTHE, "FileMesh", SCYTHEMESH, "", VT(0.01, 0.01, 0.01), VT(0,0,0))
- SCYTHE.CFrame = TORSO.CFrame
- for i = 1, 3 do
- for i = 1, 15 do
- Swait()
- ClerpBody({
- CF(0,0.1*SIN(SINE/12),0)*ANGLES(RAD(0),RAD(0),RAD(0)),
- CF(0,-0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(0,-1,0),
- CF(0,0.5,0)*ANGLES(RAD(-120+15*COS(SINE/12)),RAD(0),RAD(35+5*COS(SINE/12)))*CF(-1.5,-0.5,0),
- CF(0,0.5,0)*ANGLES(RAD(-120+15*COS(SINE/12)),RAD(0),RAD(-35-5*COS(SINE/12)))*CF(1.5,-0.5,0),
- CF(-0,0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(-0.5,1,0.5),
- CF(0,0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(0.5,0.9,0.5),
- },"Attack")
- Transparent(i/15)
- SCYTHE.Transparency = (15-i)/15
- SCYTHE.CFrame = CF(TORSO.Position)*ANGLES(0,RAD(SINE*5),0)
- end
- for i = 1, 15 do
- Swait()
- ClerpBody({
- CF(0,0.1*SIN(SINE/12),0)*ANGLES(RAD(0),RAD(0),RAD(0)),
- CF(0,-0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(0,-1,0),
- CF(0,0.5,0)*ANGLES(RAD(-120+15*COS(SINE/12)),RAD(0),RAD(35+5*COS(SINE/12)))*CF(-1.5,-0.5,0),
- CF(0,0.5,0)*ANGLES(RAD(-120+15*COS(SINE/12)),RAD(0),RAD(-35-5*COS(SINE/12)))*CF(1.5,-0.5,0),
- CF(-0,0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(-0.5,1,0.5),
- CF(0,0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(0.5,0.9,0.5),
- },"Attack")
- Transparent((15-i)/15)
- SCYTHE.Transparency = i/15
- SCYTHE.CFrame = CF(TORSO.Position)*ANGLES(0,RAD(SINE*5),0)
- end
- end
- for i = 1, 15 do
- Swait()
- ClerpBody({
- CF(0,0.1*SIN(SINE/12),0)*ANGLES(RAD(0),RAD(0),RAD(0)),
- CF(0,-0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(0,-1,0),
- CF(0,0.5,0)*ANGLES(RAD(-120+15*COS(SINE/12)),RAD(0),RAD(35+5*COS(SINE/12)))*CF(-1.5,-0.5,0),
- CF(0,0.5,0)*ANGLES(RAD(-120+15*COS(SINE/12)),RAD(0),RAD(-35-5*COS(SINE/12)))*CF(1.5,-0.5,0),
- CF(-0,0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(-0.5,1,0.5),
- CF(0,0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(0.5,0.9,0.5),
- },"Attack")
- Transparent(i/15)
- SCYTHE.Transparency = (15-i)/15
- SCYTHE.CFrame = CF(TORSO.Position)*ANGLES(0,RAD(SINE*5),0)
- end
- Transparent(1)
- SCYTHE.Transparency = 0
- local SCYTHES = {SCYTHE}
- for i = 1, 3 do
- local COPY = SCYTHE:Clone()
- COPY.Parent = workspace
- COPY.CFrame = SCYTHE.CFrame
- table.insert(SCYTHES,COPY)
- end
- for E = 1, #SCYTHES do
- local DELAY = false
- SCYTHES[E].Touched:Connect(function(HIT)
- if HIT.Parent:FindFirstChildOfClass("Humanoid") and HIT.Parent ~= CHARACTER and DELAY == false then
- HIT.Parent:FindFirstChildOfClass("Humanoid").Health = HIT.Parent:FindFirstChildOfClass("Humanoid").Health - 3.5
- CreateSound(410625063, HIT.Parent:FindFirstChildOfClass("Humanoid").Torso, 2, 1, false)
- DELAY = true
- wait(1)
- DELAY = false
- end
- end)
- end
- local NOW = ROOT.CFrame
- CHARACTER:SetPrimaryPartCFrame(CF(0,5000,0))
- HUMANOID.Parent = nil
- local Y = FOE.Position.Y
- for i = 1, 750 do
- Swait()
- for E = 1, #SCYTHES do
- SCYTHES[E].CFrame = CF(Clerp(SCYTHES[E].CFrame,CF(FOE.Position.X,Y,FOE.Position.Z)*ANGLES(0,RAD((360/4*E)+SINE),0)*CF(0,0,45*SIN(i/50)),0.1).p)*ANGLES(0,RAD(SINE*5),0)
- end
- if TARGET.Health <= 0 or DEAD == true then
- break
- end
- end
- for i = 1, 25 do
- for E = 1, #SCYTHES do
- SCYTHES[E].CFrame = CF(Clerp(SCYTHES[E].CFrame,NOW,0.15).p)*ANGLES(0,RAD(SINE*5),0)
- end
- Swait()
- end
- CHARACTER:SetPrimaryPartCFrame(NOW)
- HUMANOID.Parent = CHARACTER
- for i = 1, 15 do
- Swait()
- ClerpBody({
- CF(0,0.1*SIN(SINE/12),0)*ANGLES(RAD(0),RAD(0),RAD(0)),
- CF(0,-0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(0,-1,0),
- CF(0,0.5,0)*ANGLES(RAD(-120+15*COS(SINE/12)),RAD(0),RAD(35+5*COS(SINE/12)))*CF(-1.5,-0.5,0),
- CF(0,0.5,0)*ANGLES(RAD(-120+15*COS(SINE/12)),RAD(0),RAD(-35-5*COS(SINE/12)))*CF(1.5,-0.5,0),
- CF(-0,0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(-0.5,1,0.5),
- CF(0,0.5,0)*ANGLES(RAD(15+2*COS(SINE/12)),RAD(0),RAD(0))*CF(0.5,0.9,0.5),
- },"Attack")
- Transparent((15-i)/15)
- for E = 1, #SCYTHES do
- SCYTHES[E].CFrame = CF(ROOT.Position)*ANGLES(0,RAD(SINE*5),0)
- SCYTHES[E].Transparency = i/15
- end
- end
- for E = 1, #SCYTHES do
- SCYTHES[E]:Remove()
- end
- ATTACKING = false
- end
- end
- local ATTACKS = {OhOhOh,Diamonds,RingAround,HeartsGoesOut,Meta}
- --//=================================\\
- --|| WRAP
- --\\=================================//
- function BEGINAI()
- local TORSOROT = 0
- CHARACTER:SetPrimaryPartCFrame(ROOT.CFrame*CF(0,1,0))
- coroutine.resume(coroutine.create(function()
- game:GetService("RunService").Heartbeat:connect(function()
- local DEFAULTS = {
- CF(0,0,0),
- CF(0,-0.5,0)*ANGLES(RAD(0),RAD(0),RAD(0))*CF(0,-1,0),
- CF(0,0.5,0)*ANGLES(RAD(0),RAD(0),RAD(0))*CF(-1.5,-0.5,0),
- CF(0,0.5,0)*ANGLES(RAD(0),RAD(0),RAD(0))*CF(1.5,-0.5,0),
- CF(-0,1,0)*ANGLES(RAD(0),RAD(0),RAD(0))*CF(-0.5,1,0),
- CF(0,1,0)*ANGLES(RAD(0),RAD(0),RAD(0))*CF(0.5,1,0),
- }
- SINE = SINE + 1
- end)
- while true do
- TORSOROT = 35
- for i = 1, 5 do
- ClerpBody({
- CF(0,0,0)*ANGLES(RAD(0),RAD(35),RAD(0)),
- CF(0,-0.5,0)*ANGLES(RAD(15),RAD(-20),RAD(0))*CF(0,-1,0),
- CF(0,0.5,0)*ANGLES(RAD(12),RAD(0),RAD(0))*CF(-1.5,-0.5,0),
- CF(0,0.5,0)*ANGLES(RAD(-120),RAD(0),RAD(-35))*CF(1.5,-0.5,0),
- CF(-0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))*CF(-0.5,1,1),
- CF(0,1,0)*ANGLES(RAD(15),RAD(0),RAD(0))*CF(0.5,0.9,0.2),
- },nil)
- end
- for i = 1, 15 do
- Swait()
- ClerpBody({
- CF(0,0.3,0)*ANGLES(RAD(0),RAD(35),RAD(0)),
- CF(0,-0.5,0)*ANGLES(RAD(0),RAD(-35),RAD(0))*CF(0,-1,0),
- CF(0,0.5,0)*ANGLES(RAD(12),RAD(0),RAD(0))*CF(-1.5,-0.5,0),
- CF(0,0.75,0)*ANGLES(RAD(-120),RAD(0),RAD(-35))*CF(1.5,-0.25,0),
- CF(-0,1,0)*ANGLES(RAD(0),RAD(0),RAD(0))*CF(-0.5,1,0.5),
- CF(0,1,0)*ANGLES(RAD(15),RAD(0),RAD(0))*CF(0.5,0.9,0.2),
- },nil)
- if DEAD == true then
- break
- end
- end
- if DEAD == true then
- break
- end
- TORSOROT = -35
- for i = 1, 5 do
- ClerpBody({
- CF(0,0,0)*ANGLES(RAD(0),RAD(-35),RAD(0)),
- CF(0,-0.5,0)*ANGLES(RAD(15),RAD(20),RAD(0))*CF(0,-1,0),
- CF(0,0.5,0)*ANGLES(RAD(-120),RAD(0),RAD(35))*CF(-1.5,-0.5,0),
- CF(0,0.5,0)*ANGLES(RAD(12),RAD(0),RAD(0))*CF(1.5,-0.5,0),
- CF(-0,1,0)*ANGLES(RAD(15),RAD(0),RAD(0))*CF(-0.5,0.9,0.2),
- CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))*CF(0.5,0.9,1),
- },nil)
- end
- for i = 1, 15 do
- Swait()
- ClerpBody({
- CF(0,0.3,0)*ANGLES(RAD(0),RAD(-35),RAD(0)),
- CF(0,-0.5,0)*ANGLES(RAD(0),RAD(35),RAD(0))*CF(0,-1,0),
- CF(0,0.75,0)*ANGLES(RAD(-120),RAD(0),RAD(35))*CF(-1.5,-0.25,0),
- CF(0,0.5,0)*ANGLES(RAD(12),RAD(0),RAD(0))*CF(1.5,-0.5,0),
- CF(-0,1,0)*ANGLES(RAD(15),RAD(0),RAD(0))*CF(-0.5,1,0.2),
- CF(0,1,0)*ANGLES(RAD(0),RAD(0),RAD(0))*CF(0.5,1,0.5),
- },nil)
- if DEAD == true then
- break
- end
- end
- if DEAD == true then
- break
- end
- end
- end))
- local TARGET = nil
- local TARGETHUM = nil
- coroutine.resume(coroutine.create(function()
- --local h = HUMANOID
- local pathService = game:GetService("PathfindingService")
- local goToPos = function(loc,target)
- local distance = (loc-ROOT.Position).magnitude
- local start = tick()
- while distance > 7 do
- if target then
- if target.Torso and ATTACKING == false then
- GoTo(loc+VT(0,4.5,0))
- Swait()
- local RAYTEST = Raycast(ROOT.Position,CF(ROOT.Position,target.Torso.Position).lookVector,500,CHARACTER)
- if distance <= 7 or TARGETHUM ~= target or TestForTarget(RAYTEST,target) == false then -- Something may have gone wrong. Just break.
- break
- end
- distance = (loc+VT(0,4.5,0)-ROOT.Position).magnitude
- else
- break
- end
- else
- break
- end
- end
- end
- while true do
- if DEAD == true then
- break
- end
- Swait()
- if TARGETHUM then
- local target = TARGETHUM
- if TARGETHUM.Torso then
- local RAYTEST = Raycast(ROOT.Position,CF(ROOT.Position,VT(target.Torso.Position.X,ROOT.Position.Y,target.Torso.Position.Z)).lookVector,500,CHARACTER)
- if TestForTarget(RAYTEST,target) == true then
- local path = pathService:ComputeRawPathAsync(ROOT.Position,TARGETHUM.Torso.Position,5000)
- local didBreak = false
- local targetStart
- if target and ROOT and target.Torso then
- targetStart = target.Torso.Position
- local previous = ROOT.Position
- local points = path:GetWaypoints()
- local s = #points > 1 and 2 or 1
- for i = s,#points do
- if GYRO == nil then
- local point = points[i].Position
- if didBreak then
- break
- end
- if target and target.Torso and target.Health > 0 and ATTACKING == false then
- if (ROOT.Position - point).Magnitude > 1 and TARGETHUM == target then
- local pos = previous:lerp(point,0.65)
- goToPos(previous:lerp(point,0.65),target)
- previous = point
- end
- else
- didBreak = true
- break
- end
- end
- end
- end
- if not didBreak and targetStart then
- goToPos(targetStart)
- end
- else
- if ATTACKING == false then
- GoTo(target.Torso.Position+VT(0,2.5,0))
- end
- end
- end
- end
- end
- end))
- HUMANOID.Died:Connect(function()
- if DEAD == false then
- DEAD = true
- repeat
- Swait()
- until ATTACKING == false
- CHAIR.Transparency = 0
- Transparent(0)
- script.Music:Stop()
- ROOT.Deathed:Play()
- repeat
- Swait()
- ClerpBody({
- CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0)),
- CF(0,-0.5,0)*ANGLES(RAD(35),RAD(0),RAD(0))*CF(0,-1,0),
- CF(0,0.5,0)*ANGLES(RAD(-35),RAD(0),RAD(5))*CF(-1.5,-0.3,0),
- CF(0,0.5,0)*ANGLES(RAD(-35),RAD(0),RAD(-5))*CF(1.5,-0.3,0),
- CF(-0,0,0)*ANGLES(RAD(-15),RAD(0),RAD(0))*CF(-0.5,1,1),
- CF(0,0,0)*ANGLES(RAD(-15),RAD(0),RAD(0))*CF(0.5,1,1),
- },nil)
- until ROOT.Deathed.Playing == false
- CHARACTER.Head.Nametag:Remove()
- TORSO.Neck:Remove()
- TORSO.Die:Play()
- ROOT:Remove()
- CHARACTER:BreakJoints()
- CHAIR:Destroy()
- Debris:AddItem(CHARACTER,5)
- end
- end)
- HUMANOID.HealthChanged:Connect(function()
- if HIT == false and DEAD == false then
- HIT = true
- local HA = {ROOT.Ha1,ROOT.Ha2}
- HA[MRANDOM(1,2)]:Play()
- for i = 1, 100 do
- Swait()
- if ATTACKING == true then
- Neck.C1 = Clerp(Neck.C1, CF(0,-2.5,0)*ANGLES(0,0,RAD(65*SIN(i/6)))*CF(0,-1,0), 0.2)
- else
- Neck.C1 = Clerp(Neck.C1, CF(0,-2.5,0)*ANGLES(0,0,RAD(65*SIN(i/6)))*ANGLES(0,RAD(-TORSOROT),0)*CF(0,-1,0), 0.7)
- end
- if DEAD == true then
- break
- end
- end
- HIT = false
- end
- end)
- while true do
- if DEAD == true then
- break
- end
- local TARGETVARIANTS = {}
- TARGET = nil
- for index, CHILD in pairs(workspace:GetChildren()) do
- if CHILD ~= CHARACTER and CHILD:FindFirstChild("Slain") == nil then
- local HUMAN = CHILD:FindFirstChildOfClass("Humanoid")
- if HUMAN then
- if HUMAN.Health > 0 then
- if HUMAN.Torso then
- local DISTANCE = (HUMAN.Torso.Position - ROOT.Position).Magnitude
- table.insert(TARGETVARIANTS,{CHILD,DISTANCE})
- end
- end
- end
- end
- end
- local DIST = math.huge
- for E = 1, #TARGETVARIANTS do
- local PLAYER = TARGETVARIANTS[E]
- local CHARACTER = PLAYER[1]
- local DISTANCE = PLAYER[2]
- if DISTANCE < DIST then
- DIST = DISTANCE
- TARGET = CHARACTER
- end
- end
- if TARGET and TARGET:FindFirstChild("HumanoidRootPart") then
- TARGETHUM = TARGET:FindFirstChildOfClass("Humanoid")
- --[[HUMANOID.WalkSpeed = 22
- HUMANOID.JumpPower = 125]]
- local RAY = Raycast(ROOT.Position,CF(ROOT.Position,TARGETHUM.Torso.Position).lookVector,25,CHARACTER)
- if DIST <= 25 and TestForTarget(RAY,TARGETHUM) == false and (TARGETHUM.Torso.Position.Y > ROOT.Position.Y-1 or TARGETHUM.Torso.Position.Y < ROOT.Position.Y+2) then
- ATTACKS[MRANDOM(1,#ATTACKS)](TARGETHUM)
- end
- else
- TARGETHUM = nil
- end
- wait()
- end
- end
- BEGINAI()
- end))
- Sound40.Name = "Music"
- Sound40.Parent = Script39
- Sound40.Looped = true
- Sound40.SoundId = "rbxassetid://2545086702"
- Sound40.Volume = 2.5
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = script
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment