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
- -- hecknes1800
- print("This script not yet to be finished. Current Status: 3/19/2020")
- local plr = owner
- local tool = Instance.new("Tool")
- tool.TextureId = ("http://www.roblox.com/asset/?id=4753123741")
- tool.CanBeDropped = false
- tool.RequiresHandle = false
- local char = game.Workspace:WaitForChild(plr.Name)
- local hum = char:WaitForChild("Humanoid")
- local root = char:WaitForChild("HumanoidRootPart")
- local dmg = 85
- local Wait = 0
- local fired = false
- local eq = false
- tool.Parent = plr.Backpack
- local function Pressed()
- local bp = Instance.new("BodyPosition")
- bp.Position = char.HumanoidRootPart.Position
- bp.Parent = char.HumanoidRootPart
- bp.MaxForce = Vector3.new(1e8,1e8,1e8)
- hum.PlatformStand = true
- Wait = 1
- local mousehit = mouse.Hit
- root.CFrame = CFrame.new(root.Position, mousehit.p)
- --Making Magic Circle
- local circle = Instance.new("Part")
- local weld = Instance.new("Weld")
- local weld2 = Instance.new("Weld")
- local light = Instance.new("PointLight")
- light.Name = ("Light")
- light.Color = Color3.fromRGB(31,0,124)
- light.Brightness = 100
- light.Parent = circle
- circle.Name = ("AstroCircle")
- circle.Massless = true
- circle.Size = Vector3.new(1,1,0.0000001)
- circle.Anchored = false
- circle.Transparency = 1
- circle.CanCollide = false
- local circle2 = circle:Clone()
- circle2.Name = ("Secondary")
- circle2.Size = Vector3.new(0.05,0.05,0.0000001)
- circle.CFrame = root.CFrame + root.CFrame.lookVector * -4
- weld2.Part0 = root
- weld2.Part1 = circle
- weld2.C1 = root.CFrame:Inverse()
- weld2.C0 = circle.CFrame:Inverse()
- weld2.Parent = circle
- circle.Parent = root
- circle2.CFrame = circle.CFrame + circle.CFrame.lookVector * -1
- weld.Part0 = circle
- weld.Part1 = circle2
- weld.C1 = circle.CFrame:Inverse()
- weld.C0 = circle2.CFrame:Inverse()
- weld.Parent = circle2
- circle2.Parent = root
- local dec = Instance.new("Decal")
- dec.Parent = circle
- dec.Texture = ("http://www.roblox.com/asset/?id=1003309602")
- dec.Face = ("Front")
- local cdec = dec:Clone()
- cdec.Parent = circle
- cdec.Face = ("Back")
- local dec2 = dec:Clone()
- dec2.Parent = circle2
- local cdec2 = cdec:Clone()
- cdec2.Parent = circle2
- local atta = Instance.new("Attachment")
- atta.Parent = circle
- local shine = Instance.new("ParticleEmitter")
- shine.Parent = atta
- shine.Color = ColorSequence.new(Color3.fromRGB(10,0,124))
- shine.LightEmission = 1
- shine.LightInfluence = 0
- shine.LockedToPart = true
- local SizeKeyPoints = {NumberSequenceKeypoint.new(0,2); NumberSequenceKeypoint.new(1,10)}
- shine.Size = NumberSequence.new(SizeKeyPoints)
- shine.Texture = ("http://www.roblox.com/asset/?id=313951123")
- local TKeyPoints = {NumberSequenceKeypoint.new(0,0); NumberSequenceKeypoint.new(0.9,0); NumberSequenceKeypoint.new(1,1)}
- shine.Transparency = NumberSequence.new(TKeyPoints)
- shine.Lifetime = NumberRange.new(1.5)
- shine.Rate = NumberRange.new(0)
- shine.Speed = NumberRange.new(0)
- shine:Emit(26)
- local sound = Instance.new("Sound",char["Right Arm"])
- sound.SoundId = ("rbxassetid://160772554")
- local pitch = Instance.new("PitchShiftSoundEffect",sound)
- sound.Parent = circle
- sound:Play()
- -- Increasing Size
- for i = 1,27,1 do
- circle.Size = circle.Size + Vector3.new(0.4,0.4,0)
- circle2.Size = circle2.Size + Vector3.new(0.3,0.3,0)
- light.Range = light.Range + 0.3
- wait(0.01)
- end
- end
- local function Hold(mousehit)
- root.CFrame = CFrame.new(root.Position, mousehit.p)
- local circle = root:FindFirstChild("AstroCircle")
- local circle2 = root:FindFirstChild("Secondary")
- local light = circle:FindFirstChild("Light")
- circle.Size = circle.Size + Vector3.new(0.001,0.001,0)
- light.Range = light.Range + 0.1
- print("increasing")
- circle2.Size = circle2.Size + Vector3.new(0.001,0.001,0)
- end
- local function Attack(mousehit, dmg)
- wait(0.2)
- print(dmg)
- if dmg > 105 then
- game:GetService("Chat"):Chat(char.Head, "ASTRO NOVA!!!", Enum.ChatColor.Red)
- elseif dmg < 105 then
- game:GetService("Chat"):Chat(char.Head, "Astro Nova!", Enum.ChatColor.Red)
- end
- -- creating projectile
- local astro = Instance.new("Part")
- local atta = Instance.new("Attachment")
- local shine = Instance.new("ParticleEmitter")
- local light = Instance.new("PointLight")
- local bv = Instance.new("BodyVelocity")
- astro.Color = Color3.fromRGB(121,121,255)
- astro.CanCollide = false
- astro.Material = ("Neon")
- astro.Size = Vector3.new(6,6,6)
- astro.Position = root.Position + root.CFrame.lookVector * 6
- astro.Parent = game.Workspace
- astro.Shape = ("Ball")
- astro.CastShadow = false
- atta.Parent = astro
- shine.Color = ColorSequence.new(Color3.fromRGB(121,121,255))
- shine.LightEmission = 1
- shine.LightInfluence = 0
- shine.Size = NumberSequence.new(10)
- shine.Texture = ("http://www.roblox.com/asset/?id=1534596857")
- local TKeyPoints = {NumberSequenceKeypoint.new(0,1); NumberSequenceKeypoint.new(1,0)}
- shine.Transparency = NumberSequence.new(TKeyPoints)
- shine.LockedToPart = true
- shine.Lifetime = NumberRange.new(10)
- shine.Rate = NumberRange.new(0)
- shine.Speed = NumberRange.new(0)
- shine.Parent = atta
- light.Brightness = 100
- light.Color = Color3.fromRGB(121,121,255)
- light.Range = 20
- light.Parent = astro
- bv.MaxForce = Vector3.new(1e8,1e8,1e8)
- bv.Velocity = mousehit.lookVector * 25
- bv.Parent = astro
- shine:Emit(1)
- wait(0.35)
- if root:FindFirstChild("AstroCircle") then
- root:FindFirstChild("AstroCircle"):Destroy()
- root:FindFirstChild("Secondary"):Destroy()
- end
- local sfx = Instance.new("Sound")
- sfx.Name = ("Astro")
- sfx.SoundId = ("rbxassetid://3277257601")
- sfx.Parent = astro
- local sfx2 = Instance.new("Sound")
- sfx2.Name = ("SuperNova")
- sfx2.SoundId = ("rbxassetid://169628396")
- sfx2.Parent = astro
- local sfx3 = Instance.new("Sound")
- sfx3.Name = ("SemiExplosion")
- sfx3.SoundId = ("rbxassetid://138186576")
- sfx3.Parent = astro
- sfx:Play() -- astro ariborne
- local en = true
- astro.Touched:Connect(function(hit)
- if not en then return end
- en = false
- if hit.Parent:FindFirstChild("Humanoid") then
- local ehum = hit.Parent:FindFirstChild("Humanoid")
- if ehum and ehum ~= hum then
- ehum:TakeDamage(dmg)
- sfx:Stop()
- sfx2:Play() -- astro explodes
- shine:Destroy()
- astro.Anchored = true
- bv:Destroy()
- for i = 1,10,1 do
- astro.Size = astro.Size + Vector3.new(5,5,5)
- if i >= 6 then
- astro.Transparency = astro.Transparency + 0.265
- end
- wait(0.05)
- end
- sfx3:Play() -- astro decay
- local cloud = Instance.new("Part")
- cloud.BrickColor = BrickColor.new("Dark stone grey")
- cloud.Anchored = true
- cloud.CanCollide = false
- local C = Instance.new("SpecialMesh",cloud)
- C.Name = ("C")
- C.MeshType = ("FileMesh")
- C.MeshId = ("http://www.roblox.com/asset/?id=1095708")
- C.Scale = Vector3.new(30,30,30)
- cloud.Parent = game.Workspace
- cloud.Position = astro.Position
- cloud.Orientation = Vector3.new(math.random(-180,180),math.random(-180,180),math.random(-180,180))
- local cloud2 = cloud:Clone()
- cloud2.Parent = game.Workspace
- cloud2.Position = astro.Position
- cloud2.Orientation = Vector3.new(math.random(-180,180),math.random(-180,180),math.random(-180,180))
- local cloud3 = cloud:Clone()
- cloud3.Parent = game.Workspace
- cloud3.Position = astro.Position
- cloud3.Orientation = Vector3.new(math.random(-180,180),math.random(-180,180),math.random(-180,180))
- for i = 1,10,1 do
- cloud.C.Scale = cloud.C.Scale + Vector3.new(1,1,1)
- cloud2.C.Scale = cloud2.C.Scale + Vector3.new(1,1,1)
- cloud3.C.Scale = cloud3.C.Scale + Vector3.new(1,1,1)
- wait(0.03)
- end
- for i = 1,10,1 do
- cloud.Transparency = cloud.Transparency + 0.1
- cloud2.Transparency = cloud.Transparency + 0.1
- cloud3.Transparency = cloud.Transparency + 0.1
- wait(0.03)
- end
- light:Destroy()
- wait(4)
- astro:Destroy()
- cloud:Destroy()
- cloud2:Destroy()
- cloud3:Destroy()
- end
- end
- if hit.Anchored == true and hit.CanCollide == true then
- sfx:Destroy()
- sfx2:Play() -- astro explodes
- shine:Destroy()
- astro.Anchored = true
- bv:Destroy()
- for i = 1,10,1 do
- astro.Size = astro.Size + Vector3.new(5,5,5)
- if i >= 6 then
- astro.Transparency = astro.Transparency + 0.265
- end
- wait(0.05)
- end
- sfx3:Play() -- astro decay
- local cloud = Instance.new("Part")
- cloud.BrickColor = BrickColor.new("Dark stone grey")
- cloud.Anchored = true
- cloud.CanCollide = false
- local C = Instance.new("SpecialMesh",cloud)
- C.Name = ("C")
- C.MeshType = ("FileMesh")
- C.MeshId = ("http://www.roblox.com/asset/?id=1095708")
- C.Scale = Vector3.new(30,30,30)
- cloud.Parent = game.Workspace
- cloud.Position = astro.Position
- cloud.Orientation = Vector3.new(math.random(-180,180),math.random(-180,180),math.random(-180,180))
- local cloud2 = cloud:Clone()
- cloud2.Parent = game.Workspace
- cloud2.Position = astro.Position
- cloud2.Orientation = Vector3.new(math.random(-180,180),math.random(-180,180),math.random(-180,180))
- local cloud3 = cloud:Clone()
- cloud3.Parent = game.Workspace
- cloud3.Position = astro.Position
- cloud3.Orientation = Vector3.new(math.random(-180,180),math.random(-180,180),math.random(-180,180))
- for i = 1,10,1 do
- cloud.C.Scale = cloud.C.Scale + Vector3.new(1,1,1)
- cloud2.C.Scale = cloud2.C.Scale + Vector3.new(1,1,1)
- cloud3.C.Scale = cloud3.C.Scale + Vector3.new(1,1,1)
- wait(0.03)
- end
- for i = 1,10,1 do
- cloud.Transparency = cloud.Transparency + 0.1
- cloud2.Transparency = cloud.Transparency + 0.1
- cloud3.Transparency = cloud.Transparency + 0.1
- wait(0.03)
- end
- light:Destroy()
- wait(4)
- astro:Destroy()
- cloud:Destroy()
- cloud2:Destroy()
- cloud3:Destroy()
- end
- wait(1)
- en = true
- end)
- wait(6.5)
- astro:Destroy()
- end
- tool.Equipped:Connect(function()
- eq = true
- print("equipped")
- local pressed = false
- local en = true
- mouse.KeyDown:Connect(function(key)
- if eq == false then return end
- if not en then return end
- en = false
- if key == "q" then
- print(key)
- pressed = true
- Pressed()
- mouse.TargetFilter = char.HumanoidRootPart:WaitForChild("AstroCircle") and char.HumanoidRootPart:WaitForChild("Secondary")
- wait(0.27)
- if pressed == true then
- for i = 1,250,1 do
- if pressed == false then
- break
- end
- if i <= 10 then
- Wait = 0
- else
- Wait = 1
- end
- fired = true
- dmg = dmg + 0.1
- Hold(mouse.Hit)
- wait(0.001)
- end
- pressed = false
- Attack(mouse.Hit, dmg)
- end
- dmg = 85
- end
- wait(Wait)
- if char.HumanoidRootPart:FindFirstChild("BodyPosition") then
- char.HumanoidRootPart:FindFirstChild("BodyPosition"):Destroy()
- end
- hum.PlatformStand = false
- en = true
- Wait = 0
- end)
- mouse.KeyUp:Connect(function(key)
- if eq == false then return end
- pressed = false
- if key == "q" then
- if fired == false then
- Attack(mouse.Hit, dmg)
- dmg = 85
- end
- fired = false
- end
- wait(Wait)
- if char.HumanoidRootPart:FindFirstChild("BodyPosition") then
- char.HumanoidRootPart:FindFirstChild("BodyPosition"):Destroy()
- end
- hum.PlatformStand = false
- en = true
- Wait = 0
- end)
- end)
- tool.Unequipped:Connect(function()
- eq = false
- end)
Add Comment
Please, Sign In to add comment