Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 by Mokiros")
- local rp = RealPlayer
- script.Parent = rp.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent then
- for _,f in pairs(t.Functions) do
- f(...)
- end
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=rp then return end
- m.Target = io.Target
- m.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- if io.UserInputType == Enum.UserInputType.MouseButton2 then
- return m:TrigEvent(b and "Button2Down" or "Button2Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local Mouse = Player:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local _rg = game
- --Metatable for fake service
- local fsmt = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then
- return typeof(s[k])=="function"
- and function(_,...)return s[k](s,...)end or s[k]
- end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
- return setmetatable(t,fsmt)
- end
- --Fake game object
- local g = {
- GetService = function(self,s)
- return rawget(self,s) or _rg:GetService(s)
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({
- _btrs = {},
- RenderStepped = _rg:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- self._btrs[name] = self.Heartbeat:Connect(fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- }
- rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
- g.service = g.GetService
- FakeService(g,game)
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = g,g.Players.LocalPlayer
- end
- 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"))
- Tool0 = Instance.new("Tool")
- Part1 = Instance.new("Part")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Sound3 = Instance.new("Sound")
- Sound4 = Instance.new("Sound")
- Sound5 = Instance.new("Sound")
- Sound6 = Instance.new("Sound")
- Sound7 = Instance.new("Sound")
- Part8 = Instance.new("Part")
- PointLight9 = Instance.new("PointLight")
- Weld10 = Instance.new("Weld")
- ParticleEmitter11 = Instance.new("ParticleEmitter")
- Script12 = Instance.new("Script")
- LocalScript13 = Instance.new("LocalScript")
- Animation14 = Instance.new("Animation")
- Animation15 = Instance.new("Animation")
- Script16 = Instance.new("Script")
- Script17 = Instance.new("Script")
- Script18 = Instance.new("Script")
- ScreenGui19 = Instance.new("ScreenGui")
- TextLabel20 = Instance.new("TextLabel")
- LocalScript21 = Instance.new("LocalScript")
- RemoteFunction22 = Instance.new("RemoteFunction")
- RemoteFunction23 = Instance.new("RemoteFunction")
- Tool0.Name = "CrescendoTheSoulStealer"
- Tool0.Parent = mas
- Tool0.TextureId = "http://www.roblox.com/asset/?id=94840368"
- Tool0.GripPos = Vector3.new(0, -2.29999995, 0)
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.Material = Enum.Material.Concrete
- Part1.BrickColor = BrickColor.new("Dark stone grey")
- Part1.Rotation = Vector3.new(40.9899979, -4.28999996, -7.32999992)
- Part1.RotVelocity = Vector3.new(1, 1, 1)
- Part1.Locked = true
- Part1.FormFactor = Enum.FormFactor.Custom
- Part1.Size = Vector3.new(0.26000005, 5.24000025, 0.639999628)
- Part1.CFrame = CFrame.new(-27.7267723, 2.17319989, 179.24765, 0.98905611, 0.127203584, -0.0747402683, -0.144907758, 0.742372572, -0.654129505, -0.0277222823, 0.657800913, 0.752681792)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part1.Position = Vector3.new(-27.7267723, 2.17319989, 179.24765)
- Part1.Orientation = Vector3.new(40.8499985, -5.67000008, -11.04)
- Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=94840342"
- SpecialMesh2.Scale = Vector3.new(0.75, 0.75, 0.75)
- SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=94840359"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- SpecialMesh2.Scale = Vector3.new(0.75, 0.75, 0.75)
- Sound3.Name = "Lunge"
- Sound3.Parent = Part1
- Sound3.Pitch = 0.69999998807907
- Sound3.SoundId = "http://www.roblox.com/asset/?id=92597369"
- Sound3.Volume = 1
- Sound4.Name = "Consume"
- Sound4.Parent = Part1
- Sound4.SoundId = "http://www.roblox.com/asset/?id=94893733"
- Sound5.Name = "Slash"
- Sound5.Parent = Part1
- Sound5.SoundId = "http://www.roblox.com/asset/?id=92597369"
- Sound5.Volume = 0.69999998807907
- Sound6.Name = "Purge"
- Sound6.Parent = Part1
- Sound6.SoundId = "http://www.roblox.com/asset/?id=94893733"
- Sound7.Name = "Unsheath"
- Sound7.Parent = Part1
- Sound7.SoundId = "http://www.roblox.com/asset/?id=96098241"
- Sound7.Volume = 1
- Part8.Name = "Effect"
- Part8.Parent = Part1
- Part8.Transparency = 1
- Part8.Rotation = Vector3.new(40.9899979, -4.28999996, -7.32999992)
- Part8.RotVelocity = Vector3.new(1, 1, 1)
- Part8.Velocity = Vector3.new(0.0845661163, 0.530603409, -0.615169525)
- Part8.CanCollide = false
- Part8.Locked = true
- Part8.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part8.CFrame = CFrame.new(-27.8539753, 1.43082738, 178.589844, 0.98905611, 0.127203584, -0.0747402683, -0.144907758, 0.742372572, -0.654129505, -0.0277222823, 0.657800913, 0.752681792)
- Part8.BottomSurface = Enum.SurfaceType.Smooth
- Part8.TopSurface = Enum.SurfaceType.Smooth
- Part8.Position = Vector3.new(-27.8539753, 1.43082738, 178.589844)
- Part8.Orientation = Vector3.new(40.8499985, -5.67000008, -11.04)
- PointLight9.Name = "Light"
- PointLight9.Parent = Part8
- PointLight9.Color = Color3.new(1, 0, 0)
- PointLight9.Brightness = 35
- PointLight9.Range = 4
- PointLight9.Color = Color3.new(1, 0, 0)
- Weld10.Parent = Part8
- Weld10.C1 = CFrame.new(0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld10.Part0 = Part1
- Weld10.Part1 = Part8
- ParticleEmitter11.Parent = Part1
- ParticleEmitter11.Transparency = NumberSequence.new(1,0.25,0.25,1)
- ParticleEmitter11.Rotation = NumberRange.new(0, 360)
- ParticleEmitter11.Size = NumberSequence.new(3.9999997615814,3.9999997615814,3.9999997615814)
- ParticleEmitter11.Color = ColorSequence.new(Color3.new(0.666667, 0, 0),Color3.new(0.333333, 0, 0),Color3.new(1, 0, 0),Color3.new(0.784314, 1, 1))
- ParticleEmitter11.LightEmission = 1
- ParticleEmitter11.Texture = "http://www.roblox.com/asset/?id=248764835"
- ParticleEmitter11.ZOffset = 3
- ParticleEmitter11.Lifetime = NumberRange.new(0.10000000149012, 0.10000000149012)
- ParticleEmitter11.RotSpeed = NumberRange.new(-40, 40)
- ParticleEmitter11.Speed = NumberRange.new(0, 0)
- ParticleEmitter11.Color = ColorSequence.new(Color3.new(0.666667, 0, 0),Color3.new(0.333333, 0, 0),Color3.new(1, 0, 0),Color3.new(0.784314, 1, 1))
- Script12.Parent = Tool0
- table.insert(cors,sandbox(Script12,function()
- --Rescripted by Luckymaxer
- Tool = script.Parent
- Handle = Tool:WaitForChild("Handle")
- Module = require(191816425) --To prevent any future bugs.
- ModuleData = Module.GetTable({Key = "CrescendoTheSoulStealer"})
- Data = ModuleData.GetData({Tool = Tool})
- Data.SharpenKnife()
- end))
- LocalScript13.Name = "MouseIcon"
- LocalScript13.Parent = Tool0
- table.insert(cors,sandbox(LocalScript13,function()
- --Rescripted by Luckymaxer
- Mouse_Icon = "rbxasset://textures/GunCursor.png"
- Reloading_Icon = "rbxasset://textures/GunWaitCursor.png"
- Tool = script.Parent
- Mouse = nil
- function UpdateIcon()
- if Mouse then
- Mouse.Icon = Tool.Enabled and Mouse_Icon or Reloading_Icon
- end
- end
- function OnEquipped(ToolMouse)
- Mouse = ToolMouse
- UpdateIcon()
- end
- function OnChanged(Property)
- if Property == "Enabled" then
- UpdateIcon()
- end
- end
- Tool.Equipped:connect(OnEquipped)
- Tool.Changed:connect(OnChanged)
- end))
- Animation14.Name = "Consume"
- Animation14.Parent = Tool0
- Animation14.AnimationId = "http://www.roblox.com/asset/?id=77319318"
- Animation15.Name = "Purge"
- Animation15.Parent = Tool0
- Animation15.AnimationId = "http://www.roblox.com/asset/?id=77329203"
- Script16.Name = "SwordScript"
- Script16.Parent = Tool0
- table.insert(cors,sandbox(Script16,function()
- --Rescripted by Luckymaxer
- Tool = script.Parent
- Handle = Tool:WaitForChild("Handle")
- Players = game:GetService("Players")
- Debris = game:GetService("Debris")
- RunService = game:GetService("RunService")
- RbxUtility = LoadLibrary("RbxUtility")
- Create = RbxUtility.Create
- BaseUrl = "http://www.roblox.com/asset/?id="
- SoulCounter = script:WaitForChild("SoulCounter")
- HelpGui = script:WaitForChild("HelpGui")
- Remover = script:WaitForChild("Remover")
- DecimateScript = script:WaitForChild("DecimateScript")
- LastAttack = 0
- Lunging = false
- Grips = {
- Up = CFrame.new(0, -2.3, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- Out = CFrame.new(0, -2.3, 0, 1, 0, 0, 0, 0, -1, -0, 1, 0),
- }
- Animations = {
- --Consume = {Animation = Tool:WaitForChild("Consume"), FadeTime = nil, Weight = nil, Speed = nil},
- Purge = {Animation = Tool:WaitForChild("Purge"), FadeTime = nil, Weight = nil, Speed = nil},
- }
- Sounds = {
- Consume = Handle:WaitForChild("Consume"),
- Purge = Handle:WaitForChild("Purge"),
- Unsheath = Handle:WaitForChild("Unsheath"),
- Slash = Handle:WaitForChild("Slash"),
- Lunge = Handle:WaitForChild("Lunge"),
- }
- BasePart = Create("Part"){
- Material = Enum.Material.Plastic,
- Shape = Enum.PartType.Block,
- TopSurface = Enum.SurfaceType.Smooth,
- BottomSurface = Enum.SurfaceType.Smooth,
- FormFactor = Enum.FormFactor.Custom,
- Size = Vector3.new(0.2, 0.2, 0.2),
- CanCollide = true,
- Locked = true,
- }
- SoulFire = Create("Fire"){
- Name = "Fire",
- Color = Color3.new((255 / 255), (0 / 255), (0 / 255)),
- SecondaryColor = Color3.new((85 / 255), (0 / 255), (0 / 255)),
- Heat = 18,
- Size = 2.5,
- Enabled = true,
- }
- SoulLight = Create("PointLight"){
- Name = "Light",
- Color = SoulFire.Color,
- Brightness = 35,
- Range = 4,
- Shadows = false,
- Enabled = true,
- }
- Gravity = 196.20
- SoulColors = {
- Color3.new(1, 0, 0),
- Color3.new(1, 0.2, 0),
- Color3.new(0.8, 0.2, 0),
- Color3.new(1, 0, 0.2),
- Color3.new(0.8, 0.4, 0),
- }
- SwordDamage = 25
- Abilities = {
- Consume = {
- Enabled = true,
- Active = false,
- ReloadTime = 20,
- },
- Purge = {
- Enabled = true,
- Active = false,
- ReloadTime = 42,
- },
- }
- ToolEquipped = false
- ServerControl = (Tool:FindFirstChild("ServerControl") or Create("RemoteFunction"){
- Name = "ServerControl",
- Parent = Tool,
- })
- ClientControl = (Tool:FindFirstChild("ClientControl") or Create("RemoteFunction"){
- Name = "ClientControl",
- Parent = Tool,
- })
- SoulCounter.Value = 0
- Tool.Grip = Grips.Up
- Tool.Enabled = true
- function IsTeamMate(Player1, Player2)
- return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor)
- end
- function TagHumanoid(humanoid, player)
- local Creator_Tag = Create("ObjectValue"){
- Name = "creator",
- Value = player,
- }
- Debris:AddItem(Creator_Tag, 2)
- Creator_Tag.Parent = humanoid
- end
- function UntagHumanoid(humanoid)
- for i, v in pairs(humanoid:GetChildren()) do
- if v:IsA("ObjectValue") and v.Name == "creator" then
- v:Destroy()
- end
- end
- end
- function Decimate(character)
- if not character or not CheckIfAlive() then
- return
- end
- for i, v in pairs(character:GetChildren()) do
- if v:IsA("ForceField") then
- return
- end
- end
- local DecimateScriptCopy = character:FindFirstChild(DecimateScript.Name)
- if DecimateScriptCopy then
- return
- end
- local Values = {
- {Name = "Creator", Class = "ObjectValue", Value = Player},
- {Name = "Counter", Class = "ObjectValue", Value = SoulCounter},
- }
- local DecimateScriptCopy = DecimateScript:Clone()
- for i, v in pairs(Values) do
- local Value = Create(v.Class){
- Name = v.Name,
- Value = v.Value,
- Parent = DecimateScriptCopy,
- }
- end
- DecimateScriptCopy.Disabled = false
- DecimateScriptCopy.Parent = character
- end
- function Blow(Part, Damage)
- local PartTouched
- PartTouched = Part.Touched:connect(function(Hit)
- if not Hit or not Hit.Parent or not CheckIfAlive() then
- return
- end
- local RightArm = Character:FindFirstChild("Right Arm")
- if not RightArm then
- return
- end
- local RightGrip = RightArm:FindFirstChild("RightGrip")
- if not RightGrip or (RightGrip.Part0 ~= Handle and RightGrip.Part1 ~= Handle) then
- return
- end
- local character = Hit.Parent
- if character == Character then
- return
- end
- local humanoid = character:FindFirstChild("Humanoid")
- if not humanoid or humanoid.Health == 0 then
- return
- end
- local player = Players:GetPlayerFromCharacter(character)
- if player and (player == Player or IsTeamMate(Player, player)) then
- return
- end
- local HealthAfter = (humanoid.Health - Damage)
- if HealthAfter < 20 then
- Decimate(character)
- else
- UntagHumanoid(humanoid)
- TagHumanoid(humanoid, Player)
- humanoid:TakeDamage(Damage)
- end
- Humanoid.Health = (Humanoid.Health + (Damage / 10))
- Spawn(function()
- humanoid.WalkSpeed = 9
- wait(1.25)
- humanoid.WalkSpeed = 16
- end)
- end)
- return PartTouched
- end
- function CreateTrail(Damage, TrailRate)
- local TrailLoop
- local Count = Create("IntValue"){
- Value = 0,
- }
- local Enabled = Create("BoolValue"){
- Value = true,
- }
- Spawn(function()
- while Enabled.Value and ToolEquipped and CheckIfAlive() do
- local TrailPart = Handle:Clone()
- TrailPart.Name = "Effect"
- TrailPart.Transparency = 0.5
- TrailPart.CanCollide = false
- TrailPart.Anchored = true
- Blow(TrailPart, 5)
- Count.Value = (Count.Value + 1)
- Debris:AddItem(TrailPart, 1)
- TrailPart.Parent = game:GetService("Workspace")
- TrailPart.CFrame = Handle.CFrame
- wait(TrailRate)
- end
- end)
- return {Connection = TrailLoop, Count = Count, Enabled = Enabled}
- end
- function Lunge()
- Lunging = true
- local Target = InvokeClient("MousePosition")
- if not Target then
- return
- end
- local TargetPosition = Target.Position
- local Direction = (CFrame.new(Torso.Position, TargetPosition).lookVector * Vector3.new(1, 0, 1))
- Tool.Grip = Grips.Out
- Sounds.Lunge:Play()
- local Anim = Create("StringValue"){
- Name = "toolanim",
- Value = "Lunge",
- Parent = Tool,
- }
- if Direction.Magnitude > .01 then
- Direction = Direction.Unit
- local NewBV = Create("BodyVelocity"){
- P = 100000,
- maxForce = Vector3.new(100000, 0, 100000),
- velocity = (Direction * 50),
- }
- Debris:AddItem(NewBV, 0.75)
- NewBV.Parent = Torso
- Torso.CFrame = CFrame.new(Torso.Position, (TargetPosition * Vector3.new(1, 0, 1) + Vector3.new(0, Torso.Position.Y, 0)))
- end
- Spawn(function()
- local LungeTrail = CreateTrail(5, 0.08)
- while Lunging and CheckIfAlive() and ToolEquipped do
- RunService.Stepped:wait()
- end
- LungeTrail.Enabled.Value = false
- end)
- wait(0.75)
- Lunging = false
- Tool.Grip = Grips.Up
- wait(0.5)
- end
- function Attack()
- Tool.Grip = Grips.Up
- Sounds.Slash:Play()
- local Anim = Create("StringValue"){
- Name = "toolanim",
- Value = "Slash",
- Parent = Tool,
- }
- Spawn(function()
- local AttackTrail = CreateTrail(5, 0.06)
- while AttackTrail.Count.Value < 4 and CheckIfAlive() and ToolEquipped do
- RunService.Stepped:wait()
- end
- AttackTrail.Enabled.Value = false
- end)
- Tool.Grip = Grips.Up
- end
- --[[
- function SetPlayerMaxHealth(humanoid, health)
- if not humanoid or not health then
- return
- end
- local Ratio = (humanoid.Health / humanoid.MaxHealth)
- humanoid.MaxHealth = health
- humanoid.Health = (Ratio * humanoid.MaxHealth)
- end
- ]]
- function Encompass()
- for i, v in pairs(Souls:GetChildren()) do
- if v:IsA("BasePart") and v.Name == "Effect" then
- v:Destroy()
- end
- end
- if ToolUnequipped2 then
- ToolUnequipped2:disconnect()
- end
- local CurrentlyEquipped = true
- ToolUnequipped2 = Tool.Unequipped:connect(function()
- CurrentlyEquipped = false
- if ToolUnequipped2 then
- ToolUnequipped2:disconnect()
- end
- end)
- local CurrentCount = SoulCounter.Value
- for i = 1, CurrentCount do
- local Part = BasePart:Clone()
- Part.Name = "Effect"
- Part.Transparency = 1
- Part.Anchored = true
- Part.CanCollide = false
- local Fire = SoulFire:Clone()
- Fire.Size = 1
- Fire.Color = SoulColors[math.random(1, #SoulColors)]
- Fire.Enabled = true
- Fire.Parent = Part
- local Light = SoulLight:Clone()
- Light.Color = Fire.Color
- Light.Enabled = true
- Light.Parent = Part
- --Debris:AddItem(Part, 45)
- Part.Parent = Souls
- Spawn(function()
- while Part and Part.Parent and CurrentlyEquipped and ToolEquipped and CheckIfAlive() do
- for i = 1, 30 do
- Part.CFrame = (Torso.CFrame + CFrame.Angles(0, (2 * i * math.pi / 30), 0) * Torso.CFrame.lookVector * 5)
- wait()
- end
- end
- end)
- wait(0.75)
- end
- end
- function ConsumeTarget(character, number)
- local Part = BasePart:Clone()
- Part.Name = "Effect"
- Part.Transparency = 1
- Part.Size = Vector3.new(0.5, 0.5, 0.5)
- Part.CanCollide = false
- local Fire = SoulFire:Clone()
- Fire.Size = 1
- Fire.Enabled = true
- Fire.Parent = Part
- local Light = SoulLight:Clone()
- Light.Color = Fire.Color
- Light.Enabled = true
- Light.Parent = Part
- if number and number < 3 then
- number = 3
- end
- if character then
- local torso = character:FindFirstChild("Torso")
- if torso then
- number = (number or 4)
- for i = 1, number do
- local Part2 = Part:Clone()
- Part2.CFrame = (Torso.CFrame + Torso.CFrame.lookVector * 4)
- local Propulsion = Create("RocketPropulsion"){
- Target = torso,
- TargetOffset = Vector3.new(0, 2, 0),
- ThrustP = 500,
- ThrustD = 5,
- MaxSpeed = 150,
- MaxTorque = Vector3.new(4000000, 4000000, 0),
- Parent = Part2,
- }
- Debris:AddItem(Part2, 15)
- Part2.Parent = game:GetService("Workspace")
- Propulsion.ReachedTarget:connect(function()
- if not CheckIfAlive() then
- return
- end
- if Part2 and Part2.Parent then
- Part2:Destroy()
- end
- Decimate(character)
- end)
- Propulsion:Fire()
- wait(0.25)
- end
- end
- else
- local TargetPosition = InvokeClient("MousePosition")
- if TargetPosition then
- TargetPosition = TargetPosition.Position
- local Direction = (TargetPosition - Torso.Position).Unit
- for i = 1, 5 do
- local Part2 = Part:Clone()
- Part2.CFrame = (Torso.CFrame + Torso.CFrame.lookVector * 4)
- local Velocity = (Direction * 150)
- local Mass = (Part2:GetMass() * Gravity)
- local BF = Create("BodyForce"){
- Parent = Part2,
- force = Vector3.new(0, Part2:GetMass() * 196.2, 0),
- }
- Part2.Velocity = Velocity
- Part2.Touched:connect(function(Hit)
- if not Hit or not Hit.Parent then
- return
- end
- local character = Hit.Parent
- if character:IsA("Hat") then
- character = Hit.Parent
- end
- local humanoid = character:FindFirstChild("Humanoid")
- if not humanoid or humanoid.Health == 0 then
- return
- end
- local player = Players:GetPlayerFromCharacter(character)
- if player and (Player == player or IsTeamMate(Player, player)) then
- return
- end
- if Part2 and Part2.Parent then
- Part2:Destroy()
- end
- Decimate(character)
- end)
- Debris:AddItem(Part2, 15)
- Part2.Parent = game:GetService("Workspace")
- end
- end
- end
- end
- function CreateFirePart(CreateNew)
- for i, v in pairs(Handle:GetChildren()) do
- if v:IsA("BasePart") then
- v:Destroy()
- end
- end
- if not CreateNew then
- return
- end
- FirePart = BasePart:Clone()
- FirePart.Name = "Effect"
- FirePart.Transparency = 1
- FirePart.CanCollide = false
- local Fire = SoulFire:Clone()
- Fire.Enabled = true
- Fire.Parent = FirePart
- local Light = SoulLight:Clone()
- Light.Color = Fire.Color
- Light.Enabled = true
- Light.Parent = FirePart
- local Weld = Create("Weld"){
- Part0 = Handle,
- Part1 = FirePart,
- C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- C1 = CFrame.new(0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- Parent = FirePart,
- }
- FirePart.Parent = Handle
- end
- function CheckIfAlive()
- return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Torso and Torso.Parent and Player and Player.Parent) and true) or false)
- end
- function Activated()
- if not Tool.Enabled or not ToolEquipped or not CheckIfAlive() then
- return
- end
- Tool.Enabled = false
- local Time = RunService.Stepped:wait()
- if (Time - LastAttack) < 0.2 then
- Lunge()
- else
- Attack()
- end
- LastAttack = Time
- Tool.Enabled = true
- end
- function Equipped()
- Character = Tool.Parent
- Player = Players:GetPlayerFromCharacter(Character)
- Humanoid = Character:FindFirstChild("Humanoid")
- Torso = Character:FindFirstChild("Torso")
- if not CheckIfAlive() then
- return
- end
- ToolEquipped = true
- Spawn(function()
- local CurrentlyEquipped = true
- ToolUnequipped1 = Tool.Unequipped:connect(function()
- CurrentlyEquipped = false
- if ToolUnequipped1 then
- ToolUnequipped1:disconnect()
- end
- end)
- Sounds.Unsheath:Play()
- Humanoid.WalkSpeed = 18
- --SetPlayerMaxHealth(Humanoid, 135)
- CreateFirePart(true)
- Spawn(function()
- while ToolEquipped and CurrentlyEquipped and CheckIfAlive() do
- wait(1)
- if not ToolEquipped or not CurrentlyEquipped or not CheckIfAlive() then
- break
- end
- Humanoid.Health = (Humanoid.Health + 0.25)
- end
- end)
- local ModelName = (Player.Name .. "'sSouls")
- Souls = Create("Model"){
- Name = ModelName,
- }
- local Values = {
- {Name = "Creator", Class = "ObjectValue", Value = Player},
- {Name = "Tool", Class = "ObjectValue", Value = Tool},
- }
- local RemoverCopy = Remover:Clone()
- for i, v in pairs(Values) do
- local Value = Create(v.Class){
- Name = v.Name,
- Value = v.Value,
- Parent = RemoverCopy,
- }
- end
- RemoverCopy.Disabled = false
- RemoverCopy.Parent = Souls
- Souls.Parent = game:GetService("Workspace")
- SoulCounter.Changed:connect(Encompass)
- Encompass()
- end)
- end
- function Unequipped()
- CreateFirePart(true)
- for i, v in pairs({ToolUnequipped1, ToolUnequipped2, HelpGuiCopy}) do
- if tostring(v) == "Connection" then
- v:disconnect()
- elseif v and v.Parent then
- v:Destroy()
- end
- end
- --[[for i, v in pairs(Sounds) do
- v:Stop()
- end]]
- if CheckIfAlive() then
- --SetPlayerMaxHealth(Humanoid, 100)
- Humanoid.WalkSpeed = 16
- end
- Tool.Grip = Grips.Up
- ToolEquipped = false
- end
- function OnServerInvoke(player, mode, value)
- if player ~= Player or not ToolEquipped or not value or not CheckIfAlive() then
- return
- end
- if mode == "KeyPress" then
- local Key = value.Key
- local Down = value.Down
- if Down and Tool.Enabled then
- if Key == "e" then
- local Ability = Abilities.Consume
- if Ability.Enabled and not Ability.Active then
- Ability.Enabled = false
- Ability.Active = true
- Sounds.Consume:Play()
- local MarkedCharacter = {Player = nil, Distance = 175}
- for i, v in pairs(Players:GetChildren()) do
- if v:IsA("Player") and v ~= Player and v.Character then
- local character = v.Character
- local humanoid = character:FindFirstChild("Humanoid")
- local torso = character:FindFirstChild("Torso")
- if humanoid and humanoid.Health > 0 and torso then
- local DistanceApart = (Handle.Position - torso.Position).Magnitude
- if DistanceApart < MarkedCharacter.Distance then
- MarkedCharacter.Player = character
- MarkedCharacter.Distance = DistanceApart
- end
- end
- end
- end
- if MarkedCharacter.Player then
- ConsumeTarget(MarkedCharacter.Player, 4)
- else
- ConsumeTarget()
- end
- Ability.Active = false
- wait(Ability.ReloadTime)
- Ability.Enabled = true
- end
- elseif Key == "x" then
- local Ability = Abilities.Purge
- if SoulCounter.Value == 0 then
- local PlayerGui = Player:FindFirstChild("PlayerGui")
- if PlayerGui then
- HelpGuiCopy = PlayerGui:FindFirstChild(HelpGui.Name)
- if not HelpGuiCopy then
- HelpGuiCopy = HelpGui:Clone()
- local TextLabel = HelpGuiCopy:FindFirstChild("TextLabel")
- if TextLabel then
- TextLabel.Visible = false
- TextLabel.Position = UDim2.new(0.5, -200, 0, -100)
- Debris:AddItem(HelpGuiCopy, 7.5)
- HelpGuiCopy.Parent = PlayerGui
- TextLabel.Visible = true
- TextLabel:TweenPosition(UDim2.new(0.5, -250, 0, 70), 1, 1, 1, true)
- end
- end
- end
- return
- end
- if Ability.Enabled and not Ability.Active then
- Ability.Enabled = false
- Ability.Active = true
- Sounds.Purge:Play()
- Spawn(function()
- InvokeClient("PlayAnimation", Animations.Purge)
- end)
- Humanoid.WalkSpeed = 10
- wait(1.25)
- Humanoid.WalkSpeed = 18
- local SoulCount = SoulCounter.Value
- SoulCounter.Value = 0
- for i = 1, SoulCount do
- local Pillar = BasePart:Clone()
- BasePart.Name = "Effect"
- Pillar.Transparency = 1
- Pillar.Size = Vector3.new(6, 33, 6)
- Pillar.CanCollide = false
- local Fire = SoulFire:Clone()
- Fire.Size = 25
- Fire.Heat = 25
- Fire.Enabled = true
- Fire.Parent = Pillar
- local Light = SoulLight:Clone()
- Light.Color = Fire.Color
- Light.Enabled = true
- Light.Parent = Pillar
- local Mass = (Pillar:GetMass() * Gravity)
- local Float = Create("BodyForce"){
- Name = "Float",
- force = Vector3.new(0, Mass, 0),
- Parent = Pillar,
- }
- local TorsoCFrame = Torso.CFrame
- local DesiredCFrame = (CFrame.new((TorsoCFrame + (TorsoCFrame.lookVector * Vector3.new(1, 0, 1)) * 2).p) * CFrame.new(0, -3, 0))
- local Angle = CFrame.Angles(0, (2 * i * math.pi / SoulCount), 0)
- Pillar.CFrame = (CFrame.new(TorsoCFrame.p, Vector3.new(DesiredCFrame.X, TorsoCFrame.Y, DesiredCFrame.Z)) * Angle)
- Pillar.Velocity = (Pillar.CFrame.lookVector * 75)
- local OriginPos = Pillar.CFrame
- Pillar.Touched:connect(function(Hit)
- if not Hit or not Hit.Parent then
- return
- end
- local character = Hit.Parent
- if character:IsA("Hat") then
- character = Hit.Parent
- end
- local humanoid = character:FindFirstChild("Humanoid")
- local torso = character:FindFirstChild("Torso")
- if not humanoid or humanoid.Health == 0 or not torso then
- return
- end
- local player = Players:GetPlayerFromCharacter(character)
- if player and (Player == player or IsTeamMate(Player, player)) then
- return
- end
- local DistanceApart = (OriginPos.p - torso.Position).Magnitude
- UntagHumanoid(humanoid)
- TagHumanoid(humanoid, Player)
- humanoid:TakeDamage(77 / (DistanceApart % 10))
- end)
- Debris:AddItem(Pillar, 5)
- Pillar.Parent = game:GetService("Workspace")
- end
- Ability.Active = false
- wait(Ability.ReloadTime)
- Ability.Enabled = true
- end
- end
- end
- end
- end
- function InvokeClient(Mode, Value)
- local ClientReturn = nil
- pcall(function()
- ClientReturn = ClientControl:InvokeClient(Player, Mode, Value)
- end)
- return ClientReturn
- end
- CreateFirePart(true)
- ServerControl.OnServerInvoke = OnServerInvoke
- Tool.Activated:connect(Activated)
- Tool.Equipped:connect(Equipped)
- Tool.Unequipped:connect(Unequipped)
- Blow(Handle, SwordDamage)
- end))
- Script17.Name = "DecimateScript"
- Script17.Parent = Script16
- Script17.Disabled = true
- table.insert(cors,sandbox(Script17,function()
- --Rescripted by Luckymaxer
- Players = game:GetService("Players")
- Debris = game:GetService("Debris")
- Creator = script:FindFirstChild("Creator")
- Counter = script:FindFirstChild("Counter")
- RbxUtility = LoadLibrary("RbxUtility")
- Create = RbxUtility.Create
- BasePart = Create("Part"){
- Material = Enum.Material.Plastic,
- Shape = Enum.PartType.Block,
- TopSurface = Enum.SurfaceType.Smooth,
- BottomSurface = Enum.SurfaceType.Smooth,
- FormFactor = Enum.FormFactor.Custom,
- Size = Vector3.new(0.2, 0.2, 0.2),
- CanCollide = true,
- Locked = true,
- }
- FirePart = BasePart:Clone()
- FirePart.Name = "Effect"
- FirePart.Transparency = 1
- FirePart.CanCollide = false
- SoulFire = Create("Fire"){
- Name = "Fire",
- Color = Color3.new((255 / 255), (0 / 255), (0 / 255)),
- SecondaryColor = Color3.new((102 / 255), (255 / 255), (153 / 255)),
- Heat = 25,
- Size = 6,
- Enabled = true,
- Parent = FirePart
- }
- FireChaseDuration = 15
- Gravity = 196.20
- StoreHealth = 0
- StoreCFrame = nil
- function IsTeamMate(Player1, Player2)
- return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor)
- end
- function TagHumanoid(humanoid, player)
- local Creator_Tag = Create("ObjectValue"){
- Name = "creator",
- Value = player,
- }
- Debris:AddItem(Creator_Tag, 2)
- Creator_Tag.Parent = humanoid
- end
- function UntagHumanoid(humanoid)
- for i, v in pairs(humanoid:GetChildren()) do
- if v:IsA("ObjectValue") and v.Name == "creator" then
- v:Destroy()
- end
- end
- end
- function Clamp(Number, Min, Max)
- return math.max(math.min(Max, Number), Min)
- end
- function GetPercentage(Start, End, Number)
- return (((Number - Start) / (End - Start)) * 100)
- end
- function Round(Number, RoundDecimal)
- local WholeNumber, Decimal = math.modf(Number)
- return ((Decimal >= RoundDecimal and math.ceil(Number)) or (Decimal < RoundDecimal and math.floor(Number)))
- end
- function GetCreator()
- return (((Creator and Creator.Value and Creator.Value.Parent and Creator.Value:IsA("Player")) and Creator.Value) or nil)
- end
- function KillEnemy()
- local Character = script.Parent
- local Humanoid = Character:FindFirstChild("Humanoid")
- local Torso = Character:FindFirstChild("Torso")
- local Player = Players:GetPlayerFromCharacter(Character)
- local HealthAfter = 0
- if Humanoid and Humanoid.Health > 0 and Torso then
- for i, v in pairs(Character:GetChildren()) do
- if v:IsA("Tool") then
- v:Destroy()
- end
- end
- if Humanoid then
- Humanoid.WalkSpeed = 0
- end
- if Torso then
- local BV = Create("BodyVelocity"){
- P = 300000,
- maxForce = Vector3.new(300000, 300000, 300000),
- velocity = Vector3.new(0, 3, 0),
- }
- FireWeld = Create("Weld"){
- Name = "FireWeld",
- Part0 = Torso,
- Part1 = FirePart,
- C0 = CFrame.new(0, 0, 0),
- C1 = CFrame.new(0, 0, 0),
- Parent = FirePart,
- }
- Debris:AddItem(BV, 2.75)
- Debris:AddItem(FirePart, FireChaseDuration)
- BV.Parent = Torso
- FirePart.Parent = game:GetService("Workspace")
- end
- wait(2.75)
- if Humanoid and Humanoid.Parent and Humanoid.Health > 0 then
- local CreatorPlayer = GetCreator()
- local TeamMate = false
- if CreatorPlayer and Player and IsTeamMate(CreatorPlayer, Player) then
- TeamMate = true
- end
- if not TeamMate then
- local Damage = math.huge
- HealthAfter = (Humanoid.Health - Damage)
- StoreHealth = Clamp(Humanoid.Health, 0, 100)
- UntagHumanoid(Humanoid)
- TagHumanoid(Humanoid, CreatorPlayer)
- Humanoid:TakeDamage(Damage)
- if Damage == math.huge then
- Character:BreakJoints()
- end
- StoreCFrame = Torso.CFrame
- end
- end
- end
- return ((HealthAfter <= 0 and true) or false)
- end
- function Follow(torso)
- while torso and FirePart do
- local Distance = (torso.Position - FirePart.Position).Magnitude
- if Distance > 2 then
- if FirePart then
- FirePart.Velocity = ((torso.Position - FirePart.Position).Unit * 55)
- end
- end
- wait()
- end
- end
- local Dead = KillEnemy()
- if Dead then
- --wait(1)
- local CreatorPlayer = GetCreator()
- if CreatorPlayer then
- local Character = CreatorPlayer.Character
- if Character then
- local Humanoid = Character:FindFirstChild("Humanoid")
- local Torso = Character:FindFirstChild("Torso")
- if Humanoid and Humanoid.Health > 0 and Torso then
- Spawn(function()
- --wait(3)
- if Counter.Value.Value < Counter.Value.MaxValue then
- Counter.Value.Value = (Counter.Value.Value + 1)
- end
- end)
- if FireWeld and FireWeld.Parent then
- FireWeld:Destroy()
- end
- local Mass = (FirePart:GetMass() * Gravity)
- local Force = Create("BodyForce"){
- force = Vector3.new(0, Mass, 0),
- Parent = FirePart,
- }
- FirePart.Velocity = Vector3.new(0, 0, 0)
- if StoreCFrame then
- FirePart.CFrame = StoreCFrame
- end
- Spawn(function()
- Follow(Torso)
- end)
- FirePart.Touched:connect(function(Hit)
- if not Hit or not Hit.Parent then
- return
- end
- local character = Hit.Parent
- if character:IsA("Hat") then
- character = character.Parent
- end
- local humanoid = character:FindFirstChild("Humanoid")
- if not humanoid or humanoid.Health == 0 then
- return
- end
- local player = Players:GetPlayerFromCharacter(character)
- if player and player == CreatorPlayer then
- if FirePart and FirePart.Parent then
- FirePart:Destroy()
- end
- humanoid.Health = (humanoid.Health + StoreHealth + 10)
- end
- end)
- end
- end
- else
- for i, v in pairs({FirePart, FireWeld}) do
- if v and v.Parent then
- v:Destroy()
- end
- end
- end
- end
- wait(FireChaseDuration)
- for i, v in pairs({FirePart, FireWeld}) do
- if v and v.Parent then
- v:Destroy()
- end
- end
- script:Destroy()
- end))
- Script18.Name = "Remover"
- Script18.Parent = Script16
- Script18.Disabled = true
- table.insert(cors,sandbox(Script18,function()
- --Rescripted by Luckymaxer
- Model = script.Parent
- Debris = game:GetService("Debris")
- Creator = script:FindFirstChild("Creator")
- Tool = script:FindFirstChild("Tool")
- function DestroyModel()
- if Model and Model.Parent then
- Debris:AddItem(Model, 2)
- Model:Destroy()
- end
- end
- if not Creator or not Creator.Value or not Creator.Value:IsA("Player") or not Creator.Value.Parent or not Tool or not Tool.Value or not Tool.Value.Parent then
- DestroyModel()
- return
- end
- Creator = Creator.Value
- Tool = Tool.Value
- Character = Creator.Character
- if not Character then
- DestroyModel()
- return
- end
- Creator.Changed:connect(function(Property)
- if Property == "Parent" and not Creator.Parent then
- DestroyModel()
- end
- end)
- Character.Changed:connect(function(Property)
- if Property == "Parent" and not Character.Parent then
- DestroyModel()
- end
- end)
- Tool.Changed:connect(function(Property)
- if Property == "Parent" then
- DestroyModel()
- end
- end)
- end))
- ScreenGui19.Name = "HelpGui"
- ScreenGui19.Parent = Script16
- TextLabel20.Parent = ScreenGui19
- TextLabel20.Transparency = 1
- TextLabel20.Size = UDim2.new(0, 500, 0, 100)
- TextLabel20.Text = "You need souls to unleash the soul blast. Frag enemies to collect up to 7 souls and unleash soul blast."
- TextLabel20.Position = UDim2.new(0.5, -250, 0, 70)
- TextLabel20.BackgroundTransparency = 1
- TextLabel20.Font = Enum.Font.ArialBold
- TextLabel20.FontSize = Enum.FontSize.Size18
- TextLabel20.TextColor3 = Color3.new(1, 0, 0)
- TextLabel20.TextStrokeColor3 = Color3.new(1, 1, 1)
- TextLabel20.TextStrokeTransparency = 0.5
- TextLabel20.TextWrapped = true
- LocalScript21.Parent = Tool0
- table.insert(cors,sandbox(LocalScript21,function()
- --Rescripted by Luckymaxer
- Tool = script.Parent
- Handle = Tool:WaitForChild("Handle")
- Players = game:GetService("Players")
- Animations = {}
- ServerControl = Tool:WaitForChild("ServerControl")
- ClientControl = Tool:WaitForChild("ClientControl")
- Rate = (1 / 60)
- ToolEquipped = false
- function SetAnimation(mode, value)
- if mode == "PlayAnimation" and value and ToolEquipped and Humanoid then
- for i, v in pairs(Animations) do
- if v.Animation == value.Animation then
- v.AnimationTrack:Stop()
- table.remove(Animations, i)
- end
- end
- local AnimationTrack = Humanoid:LoadAnimation(value.Animation)
- table.insert(Animations, {Animation = value.Animation, AnimationTrack = AnimationTrack})
- AnimationTrack:Play(value.FadeTime, value.Weight, value.Speed)
- elseif mode == "StopAnimation" and value then
- for i, v in pairs(Animations) do
- if v.Animation == value.Animation then
- v.AnimationTrack:Stop(value.FadeTime)
- table.remove(Animations, i)
- end
- end
- end
- end
- function CheckIfAlive()
- return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Player and Player.Parent) and true) or false)
- end
- function Equipped(Mouse)
- Character = Tool.Parent
- Player = Players:GetPlayerFromCharacter(Character)
- Humanoid = Character:FindFirstChild("Humanoid")
- ToolEquipped = true
- if not CheckIfAlive() then
- return
- end
- Spawn(function()
- PlayerMouse = Mouse
- Mouse.Button1Down:connect(function()
- InvokeServer("Button1Click", {Down = true})
- end)
- Mouse.Button1Up:connect(function()
- InvokeServer("Button1Click", {Down = false})
- end)
- Mouse.KeyDown:connect(function(Key)
- InvokeServer("KeyPress", {Key = Key, Down = true})
- end)
- Mouse.KeyUp:connect(function(Key)
- InvokeServer("KeyPress", {Key = Key, Down = false})
- end)
- end)
- end
- function Unequipped()
- for i, v in pairs(Animations) do
- if v and v.AnimationTrack then
- v.AnimationTrack:Stop()
- end
- end
- Animations = {}
- ToolEquipped = false
- end
- function InvokeServer(mode, value)
- local ServerReturn = nil
- pcall(function()
- ServerReturn = ServerControl:InvokeServer(mode, value)
- end)
- return ServerReturn
- end
- function OnClientInvoke(mode, value)
- if mode == "PlayAnimation" and value and ToolEquipped and Humanoid then
- SetAnimation("PlayAnimation", value)
- elseif mode == "StopAnimation" and value then
- SetAnimation("StopAnimation", value)
- elseif mode == "PlaySound" and value then
- value:Play()
- elseif mode == "StopSound" and value then
- value:Stop()
- elseif mode == "MousePosition" then
- return ((PlayerMouse and {Position = PlayerMouse.Hit.p, Target = PlayerMouse.Target}) or nil)
- end
- end
- ClientControl.OnClientInvoke = OnClientInvoke
- Tool.Equipped:connect(Equipped)
- Tool.Unequipped:connect(Unequipped)
- end))
- RemoteFunction22.Name = "ServerControl"
- RemoteFunction22.Parent = Tool0
- RemoteFunction23.Name = "ClientControl"
- RemoteFunction23.Parent = Tool0
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Character
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement