Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end
- print("FE Compatibility: by WaverlyCole & Mokiros")
- InternalData = {}
- do
- script.Parent = owner.Character
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput"
- local function NewFakeEvent()
- local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect
- return Fake
- end
- local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
- local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
- local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
- self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
- end};ContextActionService.UnBindAction = ContextActionService.BindAction
- local function TriggerEvent(self,Event,...)
- local Trigger = Mouse[Event]
- if Trigger and Trigger.fakeEvent and Trigger.Function then
- Trigger.Function(...)
- end
- end
- Mouse.TrigEvent = TriggerEvent
- UserInputService.TrigEvent = TriggerEvent
- Event.OnServerEvent:Connect(function(FiredBy,Input)
- if FiredBy.Name ~= owner.Name then end
- if Input.MouseEvent then
- Mouse.Target = Input.Target
- Mouse.Hit = Input.Hit
- else
- local Begin = Input.UserInputState == Enum.UserInputState.Begin
- if Input.UserInputType == Enum.UserInputType.MouseButton1 then
- return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up")
- end
- for _,Action in pairs(ContextActionService.Actions) do
- for _,Key in pairs(Action.Keys) do
- if Key==Input.KeyCode then
- Action.Function(Action.Name,Input.UserInputState,Input)
- end
- end
- end
- Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
- UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
- end
- end)
- InternalData["Mouse"] = Mouse
- InternalData["ContextActionService"] = ContextActionService
- InternalData["UserInputService"] = UserInputService
- Event.Parent = NLS([[
- local Player = owner
- local Event = script:WaitForChild("UserInput")
- local UserInputService = game:GetService("UserInputService")
- local Mouse = Player:GetMouse()
- local Input = function(Input,gameProcessedEvent)
- if gameProcessedEvent then return end
- Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
- end
- UserInputService.InputBegan:Connect(Input)
- UserInputService.InputEnded:Connect(Input)
- local Hit,Target
- while wait(1/30) do
- if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
- Hit,Target = Mouse.Hit,Mouse.Target
- Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
- end
- end
- ]],owner.Character)
- end
- RealGame = game;game = setmetatable({},{
- __index = function (self,Index)
- local Sandbox = function (Thing)
- if Thing:IsA("Player") then
- local RealPlayer = Thing
- return setmetatable({},{
- __index = function (self,Index)
- local Type = type(RealPlayer[Index])
- if Type == "function" then
- if Index:lower() == "getmouse" or Index:lower() == "mouse" then
- return function (self)
- return InternalData["Mouse"]
- end
- end
- return function (self,...)
- return RealPlayer[Index](RealPlayer,...)
- end
- else
- return RealPlayer[Index]
- end
- end;
- __tostring = function(self)
- return RealPlayer.Name
- end
- })
- end
- end
- if RealGame[Index] then
- local Type = type(RealGame[Index])
- if Type == "function" then
- if Index:lower() == "getservice" or Index:lower() == "service" then
- return function (self,Service)
- if Service:lower() == "players" then
- return setmetatable({},{
- __index = function (self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...)
- return RealService[Index2](RealService,...)
- end
- else
- if Index2:lower() == "localplayer" then
- return Sandbox(owner)
- end
- return RealService[Index2]
- end
- end;
- __tostring = function(self)
- return RealGame:GetService(Service).Name
- end
- })
- elseif Service:lower() == "contextactionservice" then
- return InternalData["ContextActionService"]
- elseif Service:lower() == "contextactionservice" then
- return InternalData["UserInputService"]
- elseif Service:lower() == "runservice" then
- return setmetatable({},{
- __index = function(self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...)
- return RealService[Index2](RealService,...)
- end
- else
- if Index2:lower() == "bindtorenderstep" then
- return function (self,Name,Priority,Function)
- return RealGame:GetService("RunService").Stepped:Connect(Function)
- end
- end
- if Index2:lower() == "renderstepped" then
- return RealService["Stepped"]
- end
- return RealService[Index2]
- end
- end
- })
- else
- return RealGame:GetService(Service)
- end
- end
- end
- return function (self,...)
- return RealGame[Index](RealGame,...)
- end
- else
- if game:GetService(Index) then
- return game:GetService(Index)
- end
- return RealGame[Index]
- end
- else
- return nil
- end
- end
- });Game = game;owner = game:GetService("Players").LocalPlayer
- print("Complete! Running... Converted by zach ( I dont know creator's name ) ")
- Player = game:GetService("Players").LocalPlayer
- Character = Player.Character
- PlayerGui = Player.PlayerGui
- Backpack = Player.Backpack
- Torso = Character.Torso
- Head = Character.Head
- Humanoid = Character.Humanoid
- LeftArm = Character["Left Arm"]
- LeftLeg = Character["Left Leg"]
- RightArm = Character["Right Arm"]
- RightLeg = Character["Right Leg"]
- LS = Torso["Left Shoulder"]
- LH = Torso["Left Hip"]
- RS = Torso["Right Shoulder"]
- RH = Torso["Right Hip"]
- Neck = Torso.Neck
- it=Instance.new
- vt=Vector3.new
- cf=CFrame.new
- euler=CFrame.fromEulerAnglesXYZ
- angles=CFrame.Angles
- function swait(num)
- if num==0 or num==nil then
- game:service'RunService'.RenderStepped:wait()
- else
- for i=0,num do
- game:service'RunService'.RenderStepped:wait()
- end
- end
- end
- if Character:findFirstChild("SwordBall",true) ~= nil then
- Character:findFirstChild("SwordBall",true).Parent = nil
- end
- function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
- local fp = it("Part")
- fp.formFactor = formfactor
- fp.Parent = parent
- fp.Reflectance = reflectance
- fp.Transparency = transparency
- fp.CanCollide = false
- fp.Locked=true
- fp.BrickColor = brickcolor
- fp.Name = name
- fp.Size = size
- fp.Position = Torso.Position
- fp.BottomSurface="Smooth"
- fp.TopSurface="Smooth"
- fp:BreakJoints()
- return fp
- end
- function mesh(Mesh,part,meshtype,meshid,offset,scale)
- local mesh = it(Mesh)
- mesh.Parent = part
- if Mesh=="SpecialMesh" then
- mesh.MeshType = meshtype
- mesh.MeshId = meshid
- end
- mesh.Offset=offset
- mesh.Scale=scale
- return mesh
- end
- function weld(parent,part0,part1,c0)
- local weld = it("Weld")
- weld.Parent = parent
- weld.Part0 = part0
- weld.Part1 = part1
- weld.C0 = c0
- return weld
- end
- showDamage=function(Char,Dealt,du,Color)
- m=Instance.new("Model")
- m.Name=tostring(Dealt)
- h=Instance.new("Humanoid")
- h.Health=0
- h.MaxHealth=0
- h.Parent=m
- c=Instance.new("Part")
- c.Transparency=0
- c.BrickColor=Color
- c.Name="Head"
- c.TopSurface=0
- c.BottomSurface=0
- c.formFactor="Plate"
- c.Size=Vector3.new(1,.4,1)
- ms=Instance.new("CylinderMesh")
- ms.Scale=Vector3.new(.8,.8,.8)
- if CRIT==true then
- ms.Scale=Vector3.new(1,1.25,1)
- end
- ms.Parent=c
- c.Reflectance=0
- Instance.new("BodyGyro").Parent=c
- c.Parent=m
- c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
- f=Instance.new("BodyPosition")
- f.P=2000
- f.D=100
- f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
- f.position=c.Position+Vector3.new(0,3,0)
- f.Parent=c
- game:GetService("Debris"):AddItem(m,.5+du)
- c.CanCollide=false
- m.Parent=workspace
- c.CanCollide=false
- end
- local swordball=Instance.new("Model")
- swordball.Parent=Character
- swordball.Name="SwordBall"
- local proppart=part(1,swordball,0,1,BrickColor.new("Black"),"Derp",vt(1,1,1))
- local sou=Instance.new("Sound")
- sou.Parent=proppart
- sou.Volume=1
- sou.Pitch=1
- sou.SoundId="http://www.roblox.com/asset/?id=168589016"
- sou.Looped=true
- --sou:play()
- local propwld=weld(proppart,proppart,Torso,euler(0,0,0)*cf(0,-9,0))
- local prt1=part(3,swordball,0,1,BrickColor:Random(),"BallRef",vt(2,2,2))
- local prt2=part(3,swordball,0,0,BrickColor:Random(),"Ball",vt(1,1,1))
- local msh2=mesh("SpecialMesh",prt2,"Sphere","",vt(0,0,0),vt(3,3,3))
- local wld2=weld(prt2,prt2,prt1,cf(0,0,0)*euler(0,0,0))
- coroutine.resume(coroutine.create(function(Weld,Part)
- derp=0
- while Part.Parent~=nil do
- swait()
- wld2.C0=euler(0,derp,0)
- derp=derp+0.1
- end
- end),wld2,prt2)
- numb=0
- numb2=0
- for i=1,8 do
- for i=1,8 do
- local prt3=part(3,swordball,0,0,BrickColor:Random(),"Sword",vt(1,1,1))
- local msh3=mesh("SpecialMesh",prt3,"FileMesh","http://www.roblox.com/asset/?id=1029523",vt(0,0,0),vt(0.05,0.05,0.05))
- --http://www.roblox.com/asset/?id=1029523
- local wld3=weld(prt3,prt3,prt2,cf(0,0,2.5)*euler(numb,numb2,numb2))
- numb=numb+0.785
- end
- numb2=numb2+0.785
- end
- prop=Instance.new("RocketPropulsion")
- prop.MaxSpeed=5000
- prop.CartoonFactor=0
- prop.MaxThrust=100000
- prop.Parent=prt2
- prop.Target=proppart
- prop.ThrustD=1.5
- prop.TurnD=0
- prop.TurnP=0
- prop:Fire()
- --[[velp=Instance.new("BodyGyro")
- velp.Parent=prt1
- velp.maxTorque=Vector3.new(4e+005,4e+005,4e+005)*math.huge
- velp.P=20e+003
- velp.cframe=cf(0,0,0)
- coroutine.resume(coroutine.create(function(Velo,Part)
- while Part.Parent~=nil do
- for i=0,1,0.1 do
- swait()
- Velo.cframe=Velo.cframe*euler(0,3.14*i,0)
- end
- end
- end),velp,sprt)]]
- --[[wait(5)
- local sou=Instance.new("Sound")
- sou.Parent=prt1
- sou.Volume=1
- sou.Pitch=1
- sou.SoundId="rbxasset://sounds\\unsheath.wav"
- sou.Looped=true
- wait()
- sou:play() ]]
- while true do
- swait(200)
- for d=1,1 do
- for _,c in pairs(workspace:children()) do
- local hum=c:findFirstChild("Humanoid")
- if hum~=nil then
- local head=c:findFirstChild("Torso")
- if head~=nil then
- local targ=head.Position-prt1.Position
- local mag=targ.magnitude
- if mag<=10000 and c.Name~=Player.Name then
- local sprt=part(3,workspace,0,1,BrickColor:Random(),"Sword",vt(6,6,6))
- local sprt2=part(3,workspace,0,0,BrickColor:Random(),"Sword",vt(1,1,1))
- local smsh=mesh("SpecialMesh",sprt2,"FileMesh","http://www.roblox.com/asset/?id=1029523",vt(0,0,0),vt(0.1,0.1,0.1))
- local swld=weld(sprt2,sprt2,sprt,euler(0,0,0))
- local teh=0
- game:GetService("Debris"):AddItem(sprt,20)
- game:GetService("Debris"):AddItem(sprt2,20)
- coroutine.resume(coroutine.create(function(Weld,Part)
- numb1=0
- while Part.Parent~=nil do
- swait()
- Part.BrickColor=BrickColor:Random()
- Weld.C0=Weld.C0*angles(0,numb1,0)
- numb1=math.pi/math.random(10,20)
- end
- end),swld,sprt2)
- sprt.CFrame=prt1.CFrame
- sprt.Velocity=vt(-math.random(20,50),math.random(20,50),-math.random(20,50))
- --[[if d==1 then
- sprt.Velocity=vt(math.random(50,200),math.random(20,50),0)
- elseif d==2 then
- sprt.Velocity=vt(-math.random(50,200),math.random(20,50),0)
- elseif d==3 then
- sprt.Velocity=vt(0,math.random(20,50),math.random(50,200))
- elseif d==4 then
- sprt.Velocity=vt(0,math.random(20,50),-math.random(50,200))
- end]]
- local sou=Instance.new("Sound")
- sou.Parent=sprt
- sou.Volume=1
- sou.Pitch=1
- sou.SoundId="http://www.roblox.com/asset/?id=166545328"
- --sou.SoundId="http://www.roblox.com/asset/?id=168589016"
- sou.Looped=true
- sou:play()
- prop=Instance.new("RocketPropulsion")
- prop.MaxSpeed=50000
- prop.CartoonFactor=0
- prop.MaxThrust=100000
- prop.Parent=sprt
- prop.Target=head
- --[[prop.TurnD=0
- prop.TurnP=100]]
- prop:Fire()
- con1=sprt.Touched:connect(function(hit)
- if hit.Parent==nil then
- return
- end
- h=hit.Parent:FindFirstChild("Humanoid")
- for _,v in pairs(hit.Parent:children()) do
- if v:IsA("Humanoid") then
- h=v
- end
- end
- if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
- if h.Health~=0 then
- sprt.Parent=nil
- sprt2.Parent=nil
- damage=math.random(999999,99999999)
- h:TakeDamage(damage)
- hit:BreakJoints()
- hit.Anchored=false
- hit.Velocity=Vector3.new(math.random(-100,100),math.random(-100,100),math.random(-100,100))
- showDamage(h.Parent,damage,1,BrickColor.new("Bright red"))
- local sou=Instance.new("Sound")
- sou.Parent=hit
- sou.Volume=1
- sou.Pitch=1
- sou.SoundId="http://www.roblox.com/asset/?id=168009623"
- sou.Looped=false
- --sou:play()
- end
- elseif hit.Name~="Base" and hit.Parent~=swordball and hit.Parent.Name~=Character.Name and hit.Name~="Sword" then
- hit:BreakJoints()
- hit.Velocity=Vector3.new(math.random(-100,100),math.random(-100,100),math.random(-100,100))
- hit.Anchored=false
- end
- end)
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement