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
- ----------
- wait(2)
- -------
- newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
- local wld = Instance.new("Weld", wp1)
- wld.Part0 = wp0
- wld.Part1 = wp1
- wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
- end
- -------
- local oznu = game.Workspace["Professor_Girafaless"]
- local eyeone = Instance.new("Part",oznu)
- eyeone.Shape = "Ball"
- eyeone.Material = "Neon"
- eyeone.BrickColor = BrickColor.new("Really red")
- eyeone.CanCollide = false
- eyeone.Size = Vector3.new(0.35, 0.35, 0.35)
- eyeone.Name = "eyeone"
- local Sound = Instance.new("Sound",oznu.Head)
- Sound.Playing = true
- Sound.Looped = true
- Sound.Volume = 1
- Sound.SoundId = "rbxassetid://3823529284"
- local eyetwo = Instance.new("Part",oznu)
- eyetwo.Shape = "Ball"
- eyetwo.Material = "Neon"
- eyetwo.BrickColor = BrickColor.new("Really red")
- eyetwo.CanCollide = false
- eyetwo.Size = Vector3.new(0.35, 0.35, 0.35)
- eyetwo.Name = "eyetwo"
- local katone = Instance.new("Part",oznu)
- katone.Name = "katanaone"
- katone.Transparency = 0.4
- katone.BrickColor = BrickColor.new("Really Red")
- katone.Material = "Neon"
- local kattwo = Instance.new("Part",oznu)
- kattwo.Name = "katanatwo"
- kattwo.Transparency = 0.4
- kattwo.BrickColor = BrickColor.new("Really Red")
- kattwo.Material = "Neon"
- local kata2 = Instance.new("SpecialMesh",oznu.katanatwo)
- kata2.MeshId = "http://www.roblox.com/asset/?id=11442510"
- kata2.TextureId = "http://www.roblox.com/asset/?id=18016060"
- kata2.Scale = Vector3.new(2.5, 2.5, 2.5)
- kata2.VertexColor = Vector3.new(255, 1, 1)
- local kata = Instance.new("SpecialMesh",oznu.katanaone)
- kata.MeshId = "http://www.roblox.com/asset/?id=11442510"
- kata.TextureId = "http://www.roblox.com/asset/?id=18016060"
- kata.Scale = Vector3.new(2.5, 2.5, 2.5)
- kata.VertexColor = Vector3.new(255, 1, 1)
- local atch = Instance.new("Attachment",oznu["Left Arm"])
- atch.Name = "Attachmenttwo"
- local atch = Instance.new("Attachment",oznu["Torso"])
- atch.Name = "Attachmentone"
- local atch = Instance.new("Attachment",oznu["Right Arm"])
- atch.Name = "Attachmentthree"
- local atch = Instance.new("Attachment",oznu["Torso"])
- atch.Name = "Attachmentfour"
- local atch = Instance.new("Attachment",oznu["Left Arm"])
- atch.Name = "Attachmentfive"
- local atch = Instance.new("Attachment",oznu["katanaone"])
- atch.Name = "Attachmentzix"
- local atch = Instance.new("Attachment",oznu["Right Arm"])
- atch.Name = "Attachmentzeven"
- local atch = Instance.new("Attachment",oznu["katanatwo"])
- atch.Name = "Attachmenteight"
- -----------
- local larm = oznu["Left Arm"]
- local rarm = oznu["Right Arm"]
- local lleg = oznu["Left Leg"]
- local rleg = oznu["Right Leg"]
- local hum = oznu.Humanoid
- local hum2 = oznu.HumanoidRootPart
- local hed = oznu.Head
- local torso = oznu.Torso
- local atchtwo = oznu["Left Arm"].Attachmenttwo
- local atchone = oznu["Torso"].Attachmentone
- local atchthree = oznu["Right Arm"].Attachmentthree
- local atchfour = oznu["Torso"].Attachmentfour
- local atchfive = oznu["Left Arm"].Attachmentfive
- local atchzix = oznu["katanaone"].Attachmentzix
- local atchzeven = oznu["Right Arm"].Attachmentzeven
- local atcheight = oznu["katanatwo"].Attachmenteight
- -----------
- larm.BrickColor = BrickColor.new("Really black")
- rleg.BrickColor = BrickColor.new("Really black")
- lleg.BrickColor = BrickColor.new("Really black")
- rarm.BrickColor = BrickColor.new("Really black")
- torso.BrickColor = BrickColor.new("Really black")
- hed.BrickColor = BrickColor.new("Really black")
- hed.Transparency = 0.2
- torso.Transparency = 0.2
- larm.Transparency = 0.2
- rarm.Transparency = 0.2
- lleg.Transparency = 2
- rleg.Transparency = 2
- hum.DisplayName = " "
- hum.WalkSpeed = 80
- hed.face:remove()
- hum.JumpPower = 160
- hum.MaxHealth = math.huge
- hum.Health = math.huge
- larm.CanCollide = false
- rarm.CanCollide = false
- katone.Size = Vector3.new(0.35, 0.2, 4.7)
- katone.CanCollide = true
- kattwo.Size = Vector3.new(0.35, 0.2, 4.7)
- kattwo.CanCollide = true
- oznu.Torso["Left Shoulder"]:remove()
- oznu.Torso["Right Shoulder"]:remove()
- newWeld(hed, eyeone, 0.25, 0.55, -0.45)
- eyeone.Weld.C1 = CFrame.new(0, 0.5, 0)
- newWeld(hed, eyetwo, -0.25, 0.55, -0.45)
- eyetwo.Weld.C1 = CFrame.new(0, 0.5, 0)
- -----------
- rd = function(wp0, wp1)
- local rope = Instance.new("RopeConstraint", wp1)
- rope.Attachment0 = wp0
- rope.Attachment1 = wp1
- end
- -----------
- rd(atchtwo, atchone)
- rd(atchthree, atchfour)
- rd(atchfive, atchzix)
- rd(atchzeven, atcheight)
- -----------
- local ropel = oznu["Torso"].Attachmentone.RopeConstraint
- ropel.Length = 0
- atchtwo.Position = Vector3.new(0.4, 0.8, 0)
- atchone.Position = Vector3.new(-0.95, 0.8, 0)
- local rope2 = oznu["Torso"].Attachmentfour.RopeConstraint
- rope2.Length = 0
- atchthree.Position = Vector3.new(-0.4, 0.8, 0)
- atchfour.Position = Vector3.new(0.95, 0.8, 0)
- local rope3 = oznu["katanaone"].Attachmentzix.RopeConstraint
- rope3.Length = 0
- atchfive.Position = Vector3.new(0, -1, 0)
- atchzix.Position = Vector3.new(0.027, 0, -2.35)
- local rope4 = oznu["katanatwo"].Attachmenteight.RopeConstraint
- rope4.Length = 0
- atchzeven.Position = Vector3.new(0, -1, 0)
- atcheight.Position = Vector3.new(0.127, -0, -2.35)
- -------------
- local kone = script.Parent:FindFirstChild("katanaone")
- local ktwo = script.Parent:FindFirstChild("katanatwo")
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 1000
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- if (temp ~= nil) and (human ~= nil) and (human > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- function Hit(hit)
- local human = hit.Parent:FindFirstChild("Humanoid")
- if human ~= nil then
- human.Health = human.Health -math.huge
- end
- end
- kone.Touched:connect(Hit)
- ktwo.Touched:connect(Hit)
Add Comment
Please, Sign In to add comment