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,Mouse,mouse,UserInputService,ContextActionService = owner
- do
- print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
- script.Parent = Player.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,Connect=function(self,f)self.Function=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()}
- 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 and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- 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 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})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- 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)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- Phoenix = game.Players.PhoenixClockworks
- bag = Phoenix.Backpack
- equipped = false
- demolition = false
- stairs = false
- anger = false
- shield = false
- GemShine = nil
- transformed = false
- fol = Instance.new("Folder", Phoenix.Character)
- Gem = Instance.new("Part")
- Gem.CanCollide = false
- Gem.Material = "Neon"
- Gem.Size = Vector3.new(1.5,1.5,1.5)
- Gem.Color = BrickColor.new("White").Color
- Gem.Name = "Handle"
- GemShine = Gem:Clone()
- GemShine.Size = Vector3.new(1.55,1.55,1.55)
- GemShine.Material = "Glass"
- GemShine.Color = BrickColor.new("Medium blue").Color
- GemShine.Transparency = 0.5
- GemShine.Reflectance = 0.5
- GemShine.Name = "TheHandlesShine"
- Gem.Locked = true
- GemShine.Locked = true
- GemWeld = Instance.new("Weld", Gem)
- GemWeld.Part0 = Gem
- GemWeld.Part1 = GemShine
- Tool = Instance.new("Tool", bag)
- Gem.Parent = Tool
- GemShine.Parent = Gem
- ch = owner.Character
- tor = ch.HumanoidRootPart
- local whitelist = {"Anime_fivers","Lewzys","Astr0_Food","DrakerMaker","Disrevoid","EwncewlEthel","VarixDog"}
- --[[ball = function()
- B = Instance.new("Part", script)
- B.CanCollide = false
- B.Shape = "Ball"
- B.Material = "ForceField"
- B.Size = Vector3.new(12.5,12.5,12.5)
- B.Anchored = true
- B.Color = Color3.fromRGB(0,255,50)
- return B
- end
- Ball = nil
- Ball = ball()
- ]]
- local Pt = Instance.new('ParticleEmitter', tor)
- Pt.Rate = 0
- Pt.Drag = 3
- Pt.SpreadAngle = Vector2.new(-180, 180)
- Pt.Color = ColorSequence.new(Color3.fromRGB(0,255,100))
- Pt.LightEmission = 1
- Pt.ZOffset = 1
- Pt.LockedToPart = true
- Pt.Speed = NumberRange.new(20)
- Pt.Lifetime = NumberRange.new(3)
- Pt.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0), NumberSequenceKeypoint.new(0.7,0,0), NumberSequenceKeypoint.new(1,1,0)})
- Pt.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0), NumberSequenceKeypoint.new(1,5,0)})
- Pt.RotSpeed = NumberRange.new(1,10)
- ForceField = Instance.new("ForceField")
- ForceField.Parent = owner.Character
- ForceField.Visible = false
- paused = true
- CreateRegion3FromLocAndSize = function(Position, Size)
- local SizeOffset = Size / 2
- local Point1 = Position - SizeOffset
- local Point2 = Position + SizeOffset
- return Region3.new(Point1, Point2)
- end
- game:GetService("RunService").Heartbeat:connect(function()
- if paused == true then return end
- pcall(function()
- local void = ch:GetChildren()
- for _,pl in pairs(whitelist) do
- if game.Players:FindFirstChild(pl) ~= nil and game.Players:FindFirstChild(pl).Character ~= nil then
- for i,v in pairs(game.Players[pl].Character:GetChildren()) do
- table.insert(void, v)
- end
- end
- end
- local reg = CreateRegion3FromLocAndSize(tor.CFrame.p, Vector3.new(15, 15, 15))
- for i,v in pairs(game.Workspace:FindPartsInRegion3WithIgnoreList(reg, void, 100)) do
- if v.Name ~= "Base" then
- v:Destroy()
- end
- end
- end)
- end)
- function fling(hit)
- if hit.Parent.Parent.ClassName == "Script" or hit.Parent.Parent.ClassName == "LocalScript" then hit.Parent.Parent = workspace end
- if hit.Name ~= "Base" and hit.Parent ~= char and hit.Parent.Parent ~= char and hit ~= Gem and hit ~= GemShine then
- if hit.ClassName == "Part" or hit.ClassName == "MeshPart" or hit.ClassName == "BasePart" or hit.ClassName == "CornerWedgePart" or hit.ClassName == "WedgePart" or hit.ClassName == "TrussPart" then
- pcall(function() hit:BreakJoints() end)
- hit.Anchored = false
- A1 = Instance.new("Attachment",hit)
- A1.Position = Vector3.new(0, 2, 0)
- local A2 = Instance.new("Attachment",hit)
- A2.Position = Vector3.new(0, -2, 0)
- local Trail = Instance.new("Trail",hit)
- Trail.LightEmission = 1
- Trail.FaceCamera = true
- Trail.Texture = "rbxassetid://945758042"
- Trail.Attachment0 = A1
- Trail.Attachment1 = A2
- Trail.Lifetime = 1
- Trail.MinLength = 0
- Trail.Transparency = NumberSequence.new(0, 0)
- Trail.Color = ColorSequence.new(BrickColor.new("Dark indigo").Color,BrickColor.new("Royal purple").Color)
- hit.Velocity = Vector3.new(hit.Velocity.X+ math.random(-200,200), hit.Velocity.Y + math.random(-200,200), hit.Velocity.Z+ math.random(-200,200))
- end
- end
- end
- function rainbowmode()
- if transformed == false then
- ch.Head.Anchored = true
- cf = ch.Head.Position
- ch:MoveTo(cf + Vector3.new(0,20,0))
- Gem.Anchored = true
- GemShine.Anchored = true
- GemShine.CFrame = Gem.CFrame
- GemShine.Orientation = Vector3.new(0,GemShine.Orientation.Y,0)
- GemShine.Color = Color3.new(.5,.5,.5)
- Gem.Orientation = Vector3.new(0,Gem.Orientation.Y,0)
- force = GemShine:Clone()
- force.Material = "ForceField"
- force.Reflectance = 0
- force.Transparency = 0
- force.Color = Color3.new(1,1,1)
- local Theme = Instance.new('Sound',ch.HumanoidRootPart)
- Theme.Looped = true
- Theme.Volume = 10
- Theme.MaxDistance=1000
- Theme.EmitterSize=20
- Theme.SoundId = 'rbxassetid://1825836370'
- Theme:Play()
- for i = 1,30 do
- GemShine.Size = GemShine.Size:Lerp(Vector3.new(21,21,21),0.1)
- force.Size = force.Size:Lerp(Vector3.new(21,21,21),0.1)
- Gem.Size = Gem.Size:Lerp(Vector3.new(20,20,20),0.1)
- Gem.Color = Gem.Color:Lerp(Color3.new(0,0,0),0.1)
- wait()
- end
- a = 0.1
- spawn(function()
- for i = 1,40 do
- Gem.Color = Gem.Color:Lerp(Color3.fromRGB(255,0,0),0.1)
- wait()
- end
- for i = 1,57 do
- Gem.Color = Gem.Color:Lerp(Color3.fromRGB(255,85,0),0.1)
- wait()
- end
- for i = 1,57 do
- Gem.Color = Gem.Color:Lerp(Color3.fromRGB(255,255,0),0.1)
- wait()
- end
- for i = 1,57 do
- Gem.Color = Gem.Color:Lerp(Color3.fromRGB(0,255,0),0.1)
- wait()
- end
- for i = 1,40 do
- Gem.Color = Gem.Color:Lerp(Color3.fromRGB(0,255,255),0.1)
- wait()
- end
- for i = 1,37 do
- Gem.Color = Gem.Color:Lerp(Color3.fromRGB(0,0,255),0.1)
- wait()
- end
- for i = 1,57 do
- Gem.Color = Gem.Color:Lerp(Color3.fromRGB(100,0,255),0.1)
- wait()
- end
- end)
- for i = 1,330 do
- Gem.Orientation = Gem.Orientation + Vector3.new(0,a,0)
- force.Orientation = force.Orientation + Vector3.new(0,a,0)
- GemShine.Orientation = GemShine.Orientation + Vector3.new(0,a,0)
- a = a + 0.1
- wait()
- end
- local Pt = Instance.new('ParticleEmitter', tor)
- Pt.Rate = 0
- Pt.Drag = 10
- Pt.SpreadAngle = Vector2.new(360, 360)
- Pt.Color = ColorSequence.new(Color3.fromRGB(255,255,255))
- Pt.Texture = "rbxassetid://2273224484"
- Pt.LightEmission = 1
- Pt.ZOffset = 3
- Pt.LockedToPart = false
- Pt.Speed = NumberRange.new(700,1000)
- Pt.Lifetime = NumberRange.new(3)
- Pt.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0), NumberSequenceKeypoint.new(0.2,0,0), NumberSequenceKeypoint.new(.8,0,0),NumberSequenceKeypoint.new(1,1,0)})
- Pt.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,50,0), NumberSequenceKeypoint.new(1,70,0)})
- Pt.RotSpeed = NumberRange.new(1,10)
- transformed = true
- Pt:Emit(200)
- ch.Head.Anchored = false
- GemShine:Destroy()
- Gem:Destroy()
- Gem = Instance.new("Part")
- Gem.CanCollide = false
- Gem.Material = "Neon"
- Gem.Size = Vector3.new(1.5,1.5,1.5)
- Gem.Color = BrickColor.new("Really black").Color
- Gem.Name = "Handle"
- GemShine = Gem:Clone()
- GemShine.Size = Vector3.new(1.55,1.55,1.55)
- GemShine.Material = "ForceField"
- GemShine.Color = BrickColor.new("Black").Color
- GemShine.Transparency = 0
- GemShine.Reflectance = 0
- GemShine.Name = "TheHandlesShine"
- Gem.Locked = true
- GemShine.Locked = true
- GemWeld = Instance.new("Weld", Gem)
- GemWeld.Part0 = Gem
- GemWeld.Part1 = GemShine
- Gem.Parent = Tool
- GemShine.Parent = Gem
- Part = Instance.new('Part', ch)
- Part.Size = Vector3.new(0.1,0.1,0.1)
- Part.CanCollide = false
- Part.Transparency = 1
- Gem.Color = BrickColor.new("Really black").Color
- weld = Instance.new("Weld")
- weld.Parent = Part
- weld.Part0 = ch.HumanoidRootPart
- weld.Name = "WeldToEmitter"
- weld.Part1 = Part
- weld.C1 = CFrame.new(0, 7, 0)
- local Pta = Instance.new('ParticleEmitter', Part)
- Pta.Rate = 100
- Pta.Drag = 5
- Pta.EmissionDirection = 'Front'
- Pta.SpreadAngle = Vector2.new(0, 360)
- Pta.LightEmission = 1
- Pta.Speed = NumberRange.new(50)
- Pta.Lifetime = NumberRange.new(1)
- Pta.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0), NumberSequenceKeypoint.new(0.7,0,0), NumberSequenceKeypoint.new(1,1,0)})
- Pta.RotSpeed = NumberRange.new(1,10)
- Pta.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,5,0), NumberSequenceKeypoint.new(0.7,5,0), NumberSequenceKeypoint.new(1,5,0)})
- ch.Humanoid.HipHeight = 6
- ch.Humanoid.WalkSpeed = 100
- ch.Humanoid.JumpPower = 200
- spawn(function()
- while true do
- Gem.Color = BrickColor.new("Really black").Color
- for i = 1,40 do
- GemShine.Color = GemShine.Color:Lerp(Color3.fromRGB(255,0,0),0.1)
- Pta.Color = ColorSequence.new(GemShine.Color)
- Gem.Color = BrickColor.new("Really black").Color
- wait()
- end
- for i = 1,57 do
- GemShine.Color = GemShine.Color:Lerp(Color3.fromRGB(255,85,0),0.1)
- Pta.Color = ColorSequence.new(GemShine.Color)
- wait()
- end
- for i = 1,57 do
- GemShine.Color = GemShine.Color:Lerp(Color3.fromRGB(255,255,0),0.1)
- Pta.Color = ColorSequence.new(GemShine.Color)
- wait()
- end
- for i = 1,57 do
- GemShine.Color = GemShine.Color:Lerp(Color3.fromRGB(0,255,0),0.1)
- Pta.Color = ColorSequence.new(GemShine.Color)
- wait()
- end
- for i = 1,40 do
- GemShine.Color = GemShine.Color:Lerp(Color3.fromRGB(0,255,255),0.1)
- Pta.Color = ColorSequence.new(GemShine.Color)
- wait()
- end
- for i = 1,37 do
- GemShine.Color = GemShine.Color:Lerp(Color3.fromRGB(0,0,255),0.1)
- Pta.Color = ColorSequence.new(GemShine.Color)
- wait()
- end
- for i = 1,57 do
- GemShine.Color = GemShine.Color:Lerp(Color3.fromRGB(100,0,255),0.1)
- Pta.Color = ColorSequence.new(GemShine.Color)
- wait()
- end
- end
- end)
- else
- spawn(function()
- local ray = Ray.new(Gem.CFrame.p,(mouse.Hit.p-Gem.CFrame.p).unit*1000)
- local part,position = workspace:FindPartOnRay(ray,Phoenix.Character, false, true)
- local distance = (Gem.CFrame.p - position).magnitude
- if part then
- if part.Parent:FindFirstChild("Humanoid") then
- part:BreakJoints()
- part.Anchored=false
- end
- end
- local beam = Instance.new("Part", fol)
- beam.BrickColor = BrickColor.Black()
- beam.FormFactor = "Custom"
- beam.Material = "Neon"
- beam.Transparency = 0.5
- beam.Anchored = true
- beam.Locked = true
- beam.CanCollide = false
- beam.Size = Vector3.new(0.3, 0.3, distance)
- beam.CFrame = CFrame.new((Gem.CFrame*CFrame.new(0,0,0)).p, mouse.Hit.p) * CFrame.new(0, 0, -distance/2)
- hole = Instance.new("Part", fol)
- hole.Size = Vector3.new(1,1,1)
- hole.Shape = "Ball"
- hole.Material = "Neon"
- hole.Anchored = true
- hole.BrickColor = BrickColor.Black()
- hole.CanCollide = false
- hole.Locked = true
- hole.CFrame = CFrame.new(mouse.Hit.p)
- hole2 = Instance.new("Part", fol)
- hole2.Size = Vector3.new(2,2,2)
- hole2.Shape = "Ball"
- hole2.Transparency = 0.75
- hole2.Material = "Neon"
- hole2.BrickColor = BrickColor.Black()
- hole2.CanCollide = false
- hole2.Anchored = true
- hole2.Locked = true
- hole2.CFrame = CFrame.new(mouse.Hit.p)
- smite = Instance.new("Part", fol)
- smite.CanCollide = false
- smite.Anchored = true
- smite.Material = "Neon"
- smite.Size = Vector3.new(1,1000,1)
- smite.Color = BrickColor.Black().Color
- smite.Locked = true
- smite.CFrame = CFrame.new(mouse.Hit.p) * CFrame.new(0,500,0)
- hole.Touched:Connect(function(h)
- if h.Parent.Name ~= owner.Character.Name and h ~= Gem and h ~= GemShine and h.Parent ~= fol then
- if h.ClassName == "BasePart" or h.ClassName == "Part" or h.ClassName == "MeshPart" then
- if h.Name == "Base" then return end
- if h.Parent:IsA("Accessory") ~= false then return end
- h.Parent:BreakJoints()
- pcall(function()
- for _,v in pairs(h.Parent:GetChildren()) do
- v.Anchored = false
- v.Material = "Neon"
- v.Color = GemShine.Color
- v.Parent = fol
- BP = Instance.new("BodyPosition", v)
- BP.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- BP.Position = hole.Position
- game.Debris:AddItem(v,3)
- end
- end)
- h.Anchored = false
- h.Material = "Neon"
- h.Color = GemShine.Color
- h.Parent = fol
- BP = Instance.new("BodyPosition", h)
- BP.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- BP.Position = hole.Position
- game.Debris:AddItem(h,3)
- end
- end
- end)
- hole2.Touched:Connect(function(h)
- if h.Parent.Name ~= owner.Character.Name and h ~= Gem and h ~= GemShine and h.Parent ~= fol then
- if h.ClassName == "BasePart" or h.ClassName == "Part" or h.ClassName == "MeshPart" then
- if h.Name == "Base" then return end
- if h.Parent:IsA("Accessory") ~= false then return end
- h.Parent:BreakJoints()
- pcall(function()
- for _,v in pairs(h.Parent:GetChildren()) do
- v.Anchored = false
- v.Material = "Neon"
- v.Color = GemShine.Color
- v.Parent = fol
- BP = Instance.new("BodyPosition", v)
- BP.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- BP.Position = hole.Position
- game.Debris:AddItem(v,3)
- end
- end)
- h.Anchored = false
- h.Material = "Neon"
- h.Color = GemShine.Color
- h.Parent = fol
- BP = Instance.new("BodyPosition", h)
- BP.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- BP.Position = hole.Position
- game.Debris:AddItem(h,3)
- end
- end
- end)
- smite.Touched:Connect(function(h)
- if h.Parent.Name ~= owner.Character.Name and h ~= Gem and h ~= GemShine and h.Parent ~= fol then
- if h.ClassName == "BasePart" or h.ClassName == "Part" or h.ClassName == "MeshPart" then
- if h.Name == "Base" then return end
- if h.Parent:IsA("Accessory") ~= false then return end
- h.Parent:BreakJoints()
- pcall(function()
- for _,v in pairs(h.Parent:GetChildren()) do
- v.Anchored = false
- v.Material = "Neon"
- v.Color = GemShine.Color
- v.Parent = fol
- BP = Instance.new("BodyPosition", v)
- BP.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- BP.Position = hole.Position
- game.Debris:AddItem(v,3)
- end
- end)
- h.Anchored = false
- h.Material = "Neon"
- h.Color = GemShine.Color
- h.Parent = fol
- BP = Instance.new("BodyPosition", h)
- BP.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- BP.Position = hole.Position
- game.Debris:AddItem(h,3)
- end
- end
- end)
- beam.Touched:Connect(function(h)
- if h.Parent.Name ~= owner.Character.Name and h ~= Gem and h ~= GemShine and h.Parent ~= fol then
- if h.ClassName == "BasePart" or h.ClassName == "Part" or h.ClassName == "MeshPart" then
- if h.Name == "Base" then return end
- h.Anchored = false
- if h.Parent.ClassName == "Model" then
- h.Parent:BreakJoints()
- for _,v in pairs(h:GetChildren()) do
- if v.ClassName == "Part" or v.ClassName == "MeshPart" or v.ClassName == "BasePart" then
- v.Parent = workspace
- v.Anchored = false
- v.Velocity = Vector3.new(math.random(-1000,1000), math.random(-1000,1000), math.random(-1000,1000))
- elseif v.ClassName == "Weld" then
- v:Remove()
- end
- end
- end
- h.Velocity = Vector3.new(math.random(-1000,1000), math.random(-1000,1000), math.random(-1000,1000))
- end
- if h.Parent.ClassName == "Accessory" or h.ClassName == "Accessory" then return end
- game.Debris:AddItem(h,3)
- end
- end)
- spawn(function()
- game.Debris:AddItem(beam,2)
- for i=1,30 do
- beam.Transparency=i/30
- wait()
- end
- end)
- spawn(function()
- game.Debris:AddItem(hole,2)
- for i=1,30 do
- hole.Transparency=i/30
- wait()
- end
- end)
- spawn(function()
- game.Debris:AddItem(hole2,2)
- for i=1,30 do
- hole2.Transparency=i/30
- wait()
- end
- end)
- spawn(function()
- game.Debris:AddItem(smite,2)
- for i=1,30 do
- smite.Transparency=i/30
- wait()
- end
- end)
- spawn(function()
- for i=1,30 do
- beam.Size=Vector3.new(i,i,beam.Size.Z)
- wait()
- end
- end)
- spawn(function()
- for i=1,30 do
- hole.Size=hole.Size:Lerp(Vector3.new(40,40,40),0.1)
- wait()
- end
- end)
- spawn(function()
- for i=1,30 do
- hole2.Size=hole2.Size:Lerp(Vector3.new(50,50,50),0.1)
- wait()
- end
- end)
- spawn(function()
- for i=1,30 do
- smite.Size=smite.Size:Lerp(Vector3.new(i,1000,i),0.1)
- wait()
- end
- end)
- spawn(function()
- for i=1,30 do
- beam.Color = beam.Color:Lerp(GemShine.Color,0.1)
- wait()
- end
- end)
- spawn(function()
- for i=1,30 do
- hole2.Color = hole2.Color:Lerp(GemShine.Color,0.1)
- wait()
- end
- end)
- spawn(function()
- for i=1,30 do
- beam.CFrame = beam.CFrame * CFrame.Angles(0,0,0.1)
- wait()
- end
- end)
- end)
- end
- end
- rainbow = false
- mouse.Button1Down:Connect(function()
- if equipped == true then
- if rainbow == false then
- if shield ~= true then
- spawn(function()
- local ray = Ray.new(Gem.CFrame.p,(mouse.Hit.p-Gem.CFrame.p).unit*1000)
- local part,position = workspace:FindPartOnRay(ray,Phoenix.Character, false, true)
- local distance = (Gem.CFrame.p - position).magnitude
- if part then
- if part.Parent:FindFirstChild("Humanoid") then
- part:BreakJoints()
- part.Anchored=false
- end
- end
- local beam = Instance.new("Part", fol)
- beam.BrickColor = GemShine.BrickColor
- beam.FormFactor = "Custom"
- beam.Material = "Neon"
- beam.Transparency = 0.5
- if shield == true then
- beam.Transparency = 1
- end
- if stairs == true then
- beam.Transparency = 1
- end
- beam.Anchored = true
- beam.Locked = true
- beam.CanCollide = false
- beam.Size = Vector3.new(0.3, 0.3, distance)
- beam.CFrame = CFrame.new((Gem.CFrame*CFrame.new(0,0,0)).p, mouse.Hit.p) * CFrame.new(0, 0, -distance/2)
- staircasing = false
- if stairs == true then
- staircase()
- end
- beam.Touched:Connect(function(h)
- if stairs == false then
- if anger == true then
- if h.Parent.Name ~= owner.Character.Name and h ~= Gem and h ~= GemShine and h.Parent ~= fol then
- if h.ClassName == "BasePart" or h.ClassName == "Part" or h.ClassName == "MeshPart" then
- if h.Name == "Base" then return end
- h.Anchored = false
- if h.Parent.ClassName == "Model" then
- h.Parent:BreakJoints()
- for _,v in pairs(h:GetChildren()) do
- if v.ClassName == "Part" or v.ClassName == "MeshPart" or v.ClassName == "BasePart" then
- v.Parent = workspace
- v.Anchored = false
- v.Velocity = Vector3.new(math.random(-1000,1000), math.random(-1000,1000), math.random(-1000,1000))
- elseif v.ClassName == "Weld" then
- v:Remove()
- end
- end
- end
- h.Velocity = Vector3.new(math.random(-1000,1000), math.random(-1000,1000), math.random(-1000,1000))
- end
- if h.Parent.ClassName == "Accessory" or h.ClassName == "Accessory" then return end
- game.Debris:AddItem(h,3)
- end
- elseif demolition == true then
- if h.Parent ~= workspace and h.Locked ~= true and h.Parent ~= ch then
- for _,v in pairs(h.Parent:GetChildren()) do
- if v:IsA("Weld") or v:IsA("Attachment") then
- v:Destroy()
- end
- end
- h.Parent:BreakJoints()
- for _,v in pairs(h.Parent:GetChildren()) do
- if v:IsDescendantOf(Phoenix) then return end
- v.Anchored = false
- v.Parent:BreakJoints()
- v.Velocity = Vector3.new(v.Velocity.X+ math.random(-200,200), v.Velocity.Y + math.random(-200,200), v.Velocity.Z+ math.random(-200,200))
- end
- end
- end
- end
- end)
- spawn(function()
- game.Debris:AddItem(beam,2)
- for i=1,30 do
- if stairs == true then
- beam.Transparency=1
- end
- if shield == true then
- beam.Transparency=1
- end
- if shield == false and stairs == false then
- beam.Transparency=i/30
- end
- wait()
- end
- end)
- spawn(function()
- for i=1,30 do
- if anger == false then
- beam.Size=Vector3.new(i/4,i/4,beam.Size.Z)
- else
- beam.Size=Vector3.new(i,i,beam.Size.Z)
- end
- wait()
- end
- end)
- spawn(function()
- for i=1,30 do
- beam.CFrame = beam.CFrame * CFrame.Angles(0,0,0.1)
- wait()
- end
- end)
- end)
- elseif shield == true then
- if paused == true then
- paused = false
- Pt.Rate = 75
- elseif paused == false then
- paused =true
- Pt.Rate = 0
- end
- end
- elseif rainbow == true then
- rainbowmode()
- end
- end
- end)
- function staircase()
- Part1 = Instance.new("Part", fol)
- Part1.Size = Vector3.new(5,1,5)
- Part1.Material = "Neon"
- Part1.Anchored = true
- Part1.CFrame = Phoenix.Character.HumanoidRootPart.CFrame * CFrame.new(0,-3,0)
- Part2 = Instance.new("Part", fol)
- Part2.Size = Vector3.new(5.05,1.05,5.05)
- Part2.Material = "Glass"
- Part2.Anchored = true
- Part2.CFrame = Phoenix.Character.HumanoidRootPart.CFrame * CFrame.new(0,-3,0)
- Part2.Transparency = 0.5
- Part2.Color = BrickColor.new("Bright orange").Color
- Part2.Reflectance = 0.5
- game.Debris:AddItem(Part1,10)
- game.Debris:AddItem(Part2,10)
- number = 0
- spawn(function()
- for i = 1,9 do
- number = number + 5
- Part1 = Instance.new("Part", fol)
- Part1.Size = Vector3.new(5,1,5)
- Part1.Material = "Neon"
- Part1.Anchored = true
- Part1.CFrame = Phoenix.Character.HumanoidRootPart.CFrame * CFrame.new(math.random(-3,3),number,0-number)
- Part2 = Instance.new("Part", fol)
- Part2.Size = Vector3.new(5.05,1.05,5.05)
- Part2.Material = "Glass"
- Part2.Anchored = true
- Part2.CFrame = Part1.CFrame
- Part2.Transparency = 0.5
- Part2.Color = BrickColor.new("Bright orange").Color
- Part2.Reflectance = 0.5
- game.Debris:AddItem(Part1,10)
- game.Debris:AddItem(Part2,10)
- wait()
- end
- end)
- end
- Tool.Equipped:Connect(function()
- equipped = true
- end)
- Tool.Unequipped:Connect(function()
- equipped = false
- end)
- transforming = false
- Part = Instance.new('Part', ch)
- Part.Size = Vector3.new(0.1,0.1,0.1)
- Part.CanCollide = false
- Part.Transparency = 1
- weld = Instance.new("Weld")
- weld.Parent = Part
- weld.Part0 = ch.HumanoidRootPart
- weld.Name = "WeldToEmitter"
- weld.Part1 = Part
- weld.C1 = CFrame.new(0, 7, 0)
- local Pta = Instance.new('ParticleEmitter', Part)
- Pta.Rate = 0
- Pta.Drag = 5
- Pta.EmissionDirection = 'Front'
- Pta.SpreadAngle = Vector2.new(0, 360)
- Pta.LightEmission = 1
- Pta.Texture = "http://www.roblox.com/asset/?id=258128463"
- Pta.Speed = NumberRange.new(100)
- Pta.Lifetime = NumberRange.new(1)
- Pta.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0), NumberSequenceKeypoint.new(0.7,0,0), NumberSequenceKeypoint.new(1,1,0)})
- Pta.RotSpeed = NumberRange.new(1,10)
- Pta.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,7.5,0), NumberSequenceKeypoint.new(0.5,10,0), NumberSequenceKeypoint.new(1,10,0)})
- Mouse.KeyDown:Connect(function(k)
- if k == "z" then
- if transforming == true then return end
- transforming = true
- anger = true
- stairs = false
- shield = false
- demolition = false
- rainbow = false
- spawn(function()
- for i = 1,30 do
- GemShine.Color = GemShine.Color:Lerp(Color3.fromRGB(255,0,0),0.1)
- wait()
- end
- transforming = false
- end)
- elseif k == "x" then
- if transforming == true then return end
- transforming = true
- anger = false
- stairs = false
- shield = false
- demolition = true
- rainbow = false
- spawn(function()
- for i = 1,30 do
- GemShine.Color = GemShine.Color:Lerp(BrickColor.new("Dark indigo").Color,0.1)
- wait()
- end
- transforming = false
- end)
- elseif k == "c" then
- if transforming == true then return end
- transforming = true
- anger = false
- stairs = true
- shield = false
- demolition = false
- rainbow = false
- spawn(function()
- for i = 1,30 do
- GemShine.Color = GemShine.Color:Lerp(BrickColor.new("Bright orange").Color,0.1)
- wait()
- end
- transforming = false
- end)
- elseif k == "b" then
- if transforming == true then return end
- transforming = true
- anger = false
- stairs = false
- shield = false
- demolition = false
- rainbow = false
- spawn(function()
- for i = 1,30 do
- GemShine.Color = GemShine.Color:Lerp(BrickColor.new("Medium blue").Color,0.1)
- wait()
- end
- transforming = false
- end)
- elseif k == "v" then
- if transforming == true then return end
- transforming = true
- anger = false
- stairs = false
- shield = true
- demolition = false
- rainbow = false
- spawn(function()
- for i = 1,30 do
- GemShine.Color = GemShine.Color:Lerp(BrickColor.new("Lime green").Color,0.1)
- wait()
- end
- transforming = false
- end)
- elseif k == "p" then
- if transforming == true then return end
- transforming = true
- anger = false
- stairs = false
- shield = false
- demolition = false
- rainbow = true
- spawn(function()
- for i = 1,30 do
- GemShine.Color = GemShine.Color:Lerp(BrickColor.new("White").Color,0.1)
- wait()
- end
- transforming = false
- end)
- elseif k == " " and rainbow == true then
- Pta:Emit(100)
- end
- end)
Add Comment
Please, Sign In to add comment