Advertisement
InTesting

VS Mace

Dec 9th, 2018
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.21 KB | None | 0 0
  1. local player = owner
  2. local person = owner.Character
  3.  
  4. if person==nil then
  5. else
  6.     local rope = Instance.new("RopeConstraint")    
  7.     if person.Humanoid.RigType==Enum.HumanoidRigType.R15 then
  8.         rope.Attachment0 = person.LeftHand.LeftGripAttachment
  9.     elseif person.Humanoid.RigType==Enum.HumanoidRigType.R6 then
  10.         local attachment2 = Instance.new("Attachment")
  11.         attachment2.Position = Vector3.new(0,-1,0)
  12.         attachment2.Parent = person["Left Arm"]
  13.         rope.Attachment0 = attachment2
  14.     end
  15.     rope.Length = 20
  16.     rope.Visible = true
  17.     local part = Instance.new("Part")
  18.     part.Shape = "Ball"
  19.     part.Size = Vector3.new(4,4,4)
  20.     part.Material = Enum.Material.Granite
  21.     part.BrickColor = BrickColor.new("Really red")
  22.     part.Position = person.Head.Position
  23.     part.Massless = true
  24.     local attachment = Instance.new("Attachment")
  25.     attachment.Parent = part
  26.     part.Parent = game.Workspace
  27.     rope.Attachment1 = attachment
  28.     rope.Parent = person
  29.     part.Touched:Connect(function(hit)
  30.         if hit.Parent.Name==person.Name then
  31.         else
  32.         local humanoid = hit.Parent:FindFirstChild("Humanoid")
  33.         local head = hit.Parent:FindFirstChild("Head")
  34.         local HRP = hit.Parent:FindFirstChild("HumanoidRootPart")
  35.             if humanoid then
  36.                 humanoid.Health = 0
  37.             elseif head then
  38.                 head:Destroy()
  39.             elseif HRP then
  40.                 HRP:Destroy()
  41.             end
  42.         end
  43.    
  44.        
  45.        
  46.        
  47.     end)
  48. if person.Name=="SoftlockedUnderZero" then
  49.         local torso = person.UpperTorso
  50.         local part3 = Instance.new("Part")
  51.         local attachment2 = Instance.new("Attachment")
  52.         part3.CanCollide = false
  53.         attachment2.Position = Vector3.new(torso.Size.X*.25,torso.Size.Y*.15,torso.Size.Z*-.25)
  54.         part3.Shape = "Ball"
  55.         part3.Size = Vector3.new(torso.Size.X/2,torso.Size.X/2,torso.Size.X/2)
  56.         attachment2.Parent = torso
  57.         part3.Position = attachment2.WorldPosition
  58.         part3.Anchored = false
  59.         part3.BrickColor = person["Body Colors"].TorsoColor
  60.         part3.Parent = person
  61.         local weld = Instance.new("WeldConstraint")
  62.         weld.Part1 = torso
  63.         weld.Part0 = part3
  64.         weld.Parent = torso
  65.         local part4 = Instance.new("Part")
  66.         local attachment3 = Instance.new("Attachment")
  67.         part4.CanCollide = false
  68.         attachment3.Position = Vector3.new(torso.Size.X*-.25,torso.Size.Y*.15,torso.Size.Z*-.25)
  69.         part4.Shape = "Ball"
  70.         part4.Size = Vector3.new(torso.Size.X/2,torso.Size.X/2,torso.Size.X/2)
  71.         attachment3.Parent = torso
  72.         part4.Position = attachment3.WorldPosition
  73.         part4.Anchored = false
  74.         part4.BrickColor = person["Body Colors"].TorsoColor
  75.         part4.Parent = person
  76.         local weld = Instance.new("WeldConstraint")
  77.         weld.Part1 = torso
  78.         weld.Part0 = part4
  79.         weld.Parent = torso
  80.         local part5 = Instance.new("Part")
  81.         local attachment4 = Instance.new("Attachment")
  82.         part5.CanCollide = false
  83.         attachment4.Position = Vector3.new(0,torso.Size.Y*.15,torso.Size.Z*-.25)
  84.         part5.Shape = "Cylinder"
  85.         part5.Size = Vector3.new(torso.Size.X/2,torso.Size.X/2,torso.Size.X/2)
  86.         attachment4.Parent = torso
  87.         part5.Position = attachment4.WorldPosition
  88.         part5.Orientation = torso.Orientation
  89.         part5.Anchored = false
  90.         part5.BrickColor = person["Body Colors"].TorsoColor
  91.         part5.Parent = person
  92.         local weld = Instance.new("WeldConstraint")
  93.         weld.Part1 = torso
  94.         weld.Part0 = part5
  95.         weld.Parent = torso
  96.         part3.TopSurface = "Smooth"
  97.         part4.TopSurface = "Smooth"
  98.         part5.TopSurface = "Smooth"
  99.         part3.BottomSurface = "Smooth"
  100.         part4.BottomSurface = "Smooth"
  101.         part5.BottomSurface = "Smooth"
  102.     end
  103.     while true do
  104.         person.Humanoid.Health = "inf"
  105.         person.Humanoid.PlatformStand = false
  106.         person.Humanoid.WalkSpeed = 75
  107.         person.Humanoid.JumpPower = 100
  108.         person.Humanoid.MaxHealth = "inf"
  109.         wait(.5)
  110.     end
  111. end
  112.  
  113. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  114. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  115. do
  116.     print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  117.     script.Parent = Player.Character
  118.  
  119.     --RemoteEvent for communicating
  120.     local Event = Instance.new("RemoteEvent")
  121.     Event.Name = "UserInput_Event"
  122.     --Fake event to make stuff like Mouse.KeyDown work
  123.     local function fakeEvent()
  124.         local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  125.         t.connect = t.Connect
  126.         return t
  127.     end
  128.     --Creating fake input objects with fake variables
  129.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  130.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  131.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  132.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  133.     end}
  134.     --Merged 2 functions into one by checking amount of arguments
  135.     CAS.UnbindAction = CAS.BindAction
  136.  
  137.     --This function will trigger the events that have been :Connect()'ed
  138.     local function te(self,ev,...)
  139.         local t = m[ev]
  140.         if t and t._fakeEvent and t.Function then
  141.             t.Function(...)
  142.         end
  143.     end
  144.     m.TrigEvent = te
  145.     UIS.TrigEvent = te
  146.     Event.OnServerEvent:Connect(function(plr,io)
  147.         if plr~=Player then return end
  148.         if io.isMouse then
  149.             m.Target = io.Target
  150.             m.Hit = io.Hit
  151.         else
  152.             local b = io.UserInputState == Enum.UserInputState.Begin
  153.             if io.UserInputType == Enum.UserInputType.MouseButton1 then
  154.                 return m:TrigEvent(b and "Button1Down" or "Button1Up")
  155.             end
  156.             for _,t in pairs(CAS.Actions) do
  157.                 for _,k in pairs(t.Keys) do
  158.                     if k==io.KeyCode then
  159.                         t.Function(t.Name,io.UserInputState,io)
  160.                     end
  161.                 end
  162.             end
  163.             m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  164.             UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  165.         end
  166.     end)
  167.     Event.Parent = NLS([==[
  168.     local Player = game:GetService("Players").LocalPlayer
  169.     local Event = script:WaitForChild("UserInput_Event")
  170.     local UIS = game:GetService("UserInputService")
  171.     local input = function(io,a)
  172.         if a then return end
  173.         --Since InputObject is a client-side instance, we create and pass table instead
  174.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  175.     end
  176.     UIS.InputBegan:Connect(input)
  177.     UIS.InputEnded:Connect(input)
  178.     local Mouse = Player:GetMouse()
  179.     local h,t
  180.     --Give the server mouse data 30 times every second, but only if the values changed
  181.     --If player is not moving their mouse, client won't fire events
  182.     while wait(1/30) do
  183.         if h~=Mouse.Hit or t~=Mouse.Target then
  184.             h,t=Mouse.Hit,Mouse.Target
  185.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  186.         end
  187.     end]==],Player.Character)
  188.     Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  189. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement