Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script has been converted to FE by iPxter
- 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
- --[[ This script was converted by WafflesAreVeryGood(Nobody#3907 on discord) ]]--
- local plr=owner
- repeat wait() until plr.Character
- wait(0.5)
- local char=plr.Character
- local hum=char:WaitForChild("Humanoid")
- local torso=char:WaitForChild("Torso")
- local hrp=char:WaitForChild("HumanoidRootPart")
- local check=false
- local dmg=false
- local size="M"
- local type="Normal"
- local equipped=false
- local combo=false
- local comboing=false
- --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"))
- Tool0 = Instance.new("Tool")
- Folder1 = Instance.new("Folder")
- Sound2 = Instance.new("Sound")
- Sound3 = Instance.new("Sound")
- Part4 = Instance.new("Part")
- SpecialMesh5 = Instance.new("SpecialMesh")
- Part6 = Instance.new("Part")
- BlockMesh7 = Instance.new("BlockMesh")
- ManualWeld8 = Instance.new("ManualWeld")
- Part9 = Instance.new("Part")
- SpecialMesh10 = Instance.new("SpecialMesh")
- Part11 = Instance.new("Part")
- BlockMesh12 = Instance.new("BlockMesh")
- ManualWeld13 = Instance.new("ManualWeld")
- Animation14 = Instance.new("Animation")
- Tool0.Name = "Mettaton"
- Tool0.Parent = mas
- Tool0.TextureId = "http://www.roblox.com/asset/?id=316134665"
- Tool0.ToolTip = "Bombs and Bots: Used by Mettaton"
- Tool0.CanBeDropped = false
- Tool0.RequiresHandle = false
- Folder1.Parent = Tool0
- Sound2.Name = "Launch"
- Sound2.Parent = Folder1
- Sound2.Pitch = 0.30000001192093
- Sound2.SoundId = "rbxassetid://298553078"
- Sound2.Volume = 1
- Sound3.Name = "Prepare"
- Sound3.Parent = Folder1
- Sound3.Pitch = 0.69999998807907
- Sound3.SoundId = "rbxassetid://297237983"
- Part4.Name = "BigSpear"
- Part4.Parent = Folder1
- Part4.Rotation = Vector3.new(-180, 0, -180)
- Part4.Anchored = true
- Part4.CanCollide = false
- Part4.FormFactor = Enum.FormFactor.Custom
- Part4.Size = Vector3.new(2, 24, 2)
- Part4.CFrame = CFrame.new(-700.027527, 2111.1001, 184.568634, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- Part4.BottomSurface = Enum.SurfaceType.Smooth
- Part4.TopSurface = Enum.SurfaceType.Smooth
- Part4.Position = Vector3.new(-700.027527, 2111.1001, 184.568634)
- Part4.Orientation = Vector3.new(0, 180, 0)
- SpecialMesh5.Parent = Part4
- SpecialMesh5.MeshId = "http://www.roblox.com/asset/?id=431180351"
- SpecialMesh5.Scale = Vector3.new(0.00499999989, 0.00499999989, 0.00499999989)
- SpecialMesh5.TextureId = "rbxassetid://431180357"
- SpecialMesh5.VertexColor = Vector3.new(0.400000006, 0.400000006, 0.5)
- SpecialMesh5.MeshType = Enum.MeshType.FileMesh
- SpecialMesh5.Scale = Vector3.new(0.00499999989, 0.00499999989, 0.00499999989)
- Part6.Name = "Glow"
- Part6.Parent = Part4
- Part6.Material = Enum.Material.Neon
- Part6.CanCollide = false
- Part6.FormFactor = Enum.FormFactor.Custom
- Part6.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part6.CFrame = CFrame.new(-700.028015, 2111.1001, 184.569, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part6.Position = Vector3.new(-700.028015, 2111.1001, 184.569)
- BlockMesh7.Parent = Part6
- BlockMesh7.Scale = Vector3.new(0, 0, 0)
- BlockMesh7.VertexColor = Vector3.new(0.400000006, 0.400000006, 0.5)
- BlockMesh7.Scale = Vector3.new(0, 0, 0)
- ManualWeld8.Name = "Weld"
- ManualWeld8.Parent = Part4
- ManualWeld8.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- ManualWeld8.C1 = CFrame.new(0.000503540039, 0, -0.000381469727, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- ManualWeld8.Part0 = Part4
- ManualWeld8.Part1 = Part6
- Part9.Name = "Spear"
- Part9.Parent = Folder1
- Part9.BrickColor = BrickColor.new("Really black")
- Part9.Rotation = Vector3.new(-180, 0, -180)
- Part9.Anchored = true
- Part9.CanCollide = false
- Part9.FormFactor = Enum.FormFactor.Custom
- Part9.Size = Vector3.new(0.5, 7.80000019, 0.5)
- Part9.CFrame = CFrame.new(-695.627502, 2111.1001, 184.168625, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- Part9.BottomSurface = Enum.SurfaceType.Smooth
- Part9.TopSurface = Enum.SurfaceType.Smooth
- Part9.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part9.Position = Vector3.new(-695.627502, 2111.1001, 184.168625)
- Part9.Orientation = Vector3.new(0, 180, 0)
- Part9.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- SpecialMesh10.Parent = Part9
- SpecialMesh10.MeshId = "rbxassetid://448093537"
- SpecialMesh10.Scale = Vector3.new(0.00999999978, 0.00999999978, 0.00999999978)
- SpecialMesh10.VertexColor = Vector3.new(0.300000012, 0, 0.300000012)
- SpecialMesh10.MeshType = Enum.MeshType.FileMesh
- SpecialMesh10.Scale = Vector3.new(0.00999999978, 0.00999999978, 0.00999999978)
- Part11.Name = "Glow"
- Part11.Parent = Part9
- Part11.Material = Enum.Material.Neon
- Part11.CanCollide = false
- Part11.FormFactor = Enum.FormFactor.Custom
- Part11.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part11.CFrame = CFrame.new(-695.627991, 2111.1001, 184.169006, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part11.Position = Vector3.new(-695.627991, 2111.1001, 184.169006)
- BlockMesh12.Parent = Part11
- BlockMesh12.Scale = Vector3.new(0, 0, 0)
- BlockMesh12.VertexColor = Vector3.new(0.300000012, 0.300000012, 0.300000012)
- BlockMesh12.Scale = Vector3.new(0, 0, 0)
- ManualWeld13.Name = "Weld"
- ManualWeld13.Parent = Part9
- ManualWeld13.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- ManualWeld13.C1 = CFrame.new(0.000503540039, 0, -0.000381469727, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- ManualWeld13.Part0 = Part9
- ManualWeld13.Part1 = Part11
- Animation14.Name = "GBSend"
- Animation14.Parent = Folder1
- Animation14.AnimationId = "http://www.roblox.com/GBSend-item?id=388238523"
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = owner
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
- local tool=Tool0
- tool.Parent = plr.Backpack
- script.Parent = tool
- for i,v in pairs(tool.Folder:GetChildren()) do
- v.Parent = script
- end
- tool.Folder:Destroy()
- local gbsend=hum:LoadAnimation(script.GBSend)
- local srot=0
- local closest=nil
- local attacklist={}
- local spears={}
- local spos={
- [1]={110},
- [2]={60}
- }
- function Loop()
- coroutine.resume(coroutine.create(function()
- while equipped==true do
- if #spears==2 then
- for i,v in pairs(spears) do
- v.BodyPosition.Position=(hrp.CFrame*CFrame.new(math.cos(math.rad(spos[i][1]))*10,math.sin(math.rad(spos[i][1]))*7,6)).p
- v.BodyGyro.CFrame=CFrame.new(v.Position,mouse.Hit.p)*CFrame.Angles(-math.pi/0.5,math.rad(srot),0)
- srot=srot+0
- if srot==360 then srot=0 end
- end
- end
- wait()
- end
- end))
- end
- function PrepareHurt(proj,dmgcheck,dmg)
- proj.Touched:connect(function(hit)
- if hit.Parent:FindFirstChildOfClass("Humanoid") and hit.Parent ~= char and proj.Transparency<1 and dmgcheck==false then
- dmgcheck=true
- hit.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(dmg)
- end
- end)
- end
- local function FIRE(obj,mode)
- coroutine.resume(coroutine.create(function()
- local dmgcheck=false
- if mode=="Normal" then
- local bv=Instance.new("BodyVelocity",obj)
- bv.MaxForce=Vector3.new(math.huge,math.huge,math.huge)
- wait(0.5)
- local faiya=script.Launch:Clone()
- faiya.Parent=obj
- faiya:Play()
- bv.Velocity=(obj.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector*300
- PrepareHurt(obj,dmgcheck,15)
- end
- wait(0.5)
- end))
- end
- function Lerp(obj,kind,nb,total,spec)
- local mousehit=CFrame.new(mouse.Hit.X,mouse.Hit.Y,mouse.Hit.Z)
- if kind~="Square" then
- obj.Anchored=false
- end
- if kind=="Front" then
- obj.CFrame=hrp.CFrame*CFrame.new(math.random(-10,10),math.random(0,5),-5)
- elseif kind=="Circle" then
- if closest==nil then
- obj.CFrame=mousehit*CFrame.new(math.cos(math.rad(nb*(360/total)))*20,obj.Size.X/2,math.sin(math.rad(nb*(360/total)))*20)
- else
- obj.CFrame=closest.HumanoidRootPart.CFrame*CFrame.new(math.cos(math.rad(nb*(360/total)))*20,-2+(obj.Size.X/2),math.sin(math.rad(nb*(360/total)))*20)
- end
- elseif kind=="Square" then
- if closest==nil then
- obj.CFrame=mousehit
- wait(0.2)
- for i=1,5 do
- obj.Transparency=1
- wait(0.1)
- obj.Transparency=0.1
- wait(0.1)
- end
- FIRE(obj,"Square")
- end
- end
- local bodyg=Instance.new("BodyGyro",obj)
- bodyg.MaxTorque=Vector3.new(math.huge,math.huge,math.huge)
- bodyg.D=160
- if spec=="Multi" then
- bodyg.CFrame=CFrame.new(obj.Position,hitpos)*CFrame.Angles(-math.pi/2,0,0)
- elseif spec=="Normal" then
- bodyg.CFrame=CFrame.new(obj.Position,hitpos)*CFrame.Angles(-math.pi/2,0,0)
- end
- end
- function PrepareAttack(key)
- if check==false and hum.Health>0 then
- if closest==nil then
- hitpos=mouse.Hit.p
- else
- hitpos=closest.Torso.Position
- end
- if equipped==true then
- if key=="q" then
- combo=true
- elseif key=="e" then
- if combo==false then
- check=true
- hum.WalkSpeed=0
- gbsend:Play()
- for i=1,5 do
- local s=script.BigSpear:Clone()
- s.Parent=workspace
- local prep=script.Prepare:Clone()
- prep.Parent=s
- prep:Play()
- coroutine.resume(coroutine.create(function()
- Lerp(s,"Front",1,1,"Normal")
- FIRE(s,"Normal")
- end))
- wait(0.1)
- end
- hum.WalkSpeed=30
- if comboing==false then
- wait(0.4)
- else
- wait(0.25)
- end
- check=false
- elseif combo==true and #attacklist<5 then
- table.insert(attacklist,key)
- end
- elseif key=="r" then
- if combo==false then
- check=true
- hum.WalkSpeed=0
- gbsend:Play()
- for i=1,#spears do
- local s=script.Spear:Clone()
- s.Parent=workspace
- s.CFrame=spears[i].CFrame
- local prep=script.Prepare:Clone()
- prep.Parent=s
- prep:Play()
- spears[i].Transparency=0
- coroutine.resume(coroutine.create(function()
- Lerp(s,"Circle",i,2,"Normal")
- FIRE(s,"Normal")
- end))
- wait(0.1)
- end
- hum.WalkSpeed=30
- if comboing==false then
- wait(0.4)
- else
- wait(0.35)
- end
- for _,v in pairs(spears) do
- v.Transparency=0
- end
- check=false
- elseif combo==true and #attacklist<5 then
- table.insert(attacklist,key)
- end
- elseif key=="t" then
- if combo==false then
- check=true
- hum.WalkSpeed=0
- gbsend:Play()
- for i=1,10 do
- local s=script.Spear:Clone()
- s.Parent=workspace
- local prep=script.Prepare:Clone()
- prep.Parent=s
- prep:Play()
- coroutine.resume(coroutine.create(function()
- Lerp(s,"Front",i,10,"Multi")
- FIRE(s,"Normal")
- end))
- end
- hum.WalkSpeed=30
- if comboing==false then
- wait(3)
- else
- wait(0.5)
- end
- check=false
- elseif combo==true and #attacklist<5 then
- table.insert(attacklist,key)
- end
- end
- end
- end
- end
- mouse.KeyUp:connect(function(key)
- if key=="q" and combo==true and check==false then
- combo=false
- comboing=true
- for _,v in pairs(attacklist) do
- PrepareAttack(v)
- end
- attacklist={}
- comboing=false
- check=true
- wait(2)
- check=false
- end
- end)
- mouse.KeyDown:connect(PrepareAttack)
- tool.Equipped:connect(function()
- for i=1,2 do
- local spear=script.BigSpear:Clone()
- spear.Parent=char
- spear.Anchored=false
- spear.CFrame=(hrp.CFrame*CFrame.new(math.cos(math.rad((2*36)-(i*36)))*10,math.sin(math.rad((2*36)-(i*36)))*-10,0))
- table.insert(spears,spear)
- local sbp=Instance.new("BodyPosition",spear)
- sbp.MaxForce=Vector3.new(math.huge,math.huge,math.huge)
- sbp.D=800
- local sbg=Instance.new("BodyGyro",spear)
- sbg.MaxTorque=Vector3.new(math.huge,math.huge,math.huge)
- sbg.D=400
- end
- equipped=true
- Loop()
- end)
- tool.Unequipped:connect(function()
- equipped=false
- for _,v in pairs(spears) do
- v:Destroy()
- end
- spears={}
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement