Advertisement
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")
- print("Truthing since 2018! ZV Admin loading...")
- 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
- --less go
- Player=owner
- Character=Player.Character
- PlayerGui=Player.PlayerGui
- Backpack=Player.Backpack
- Torso=Character.Torso
- Head=Character.Head
- Humanoid=Character.Humanoid
- m=Instance.new('Model',Character)
- 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"]
- Face = Head.face
- Neck=Torso.Neck
- it=Instance.new
- attacktype=1
- vt=Vector3.new
- cf=CFrame.new
- euler=CFrame.fromEulerAnglesXYZ
- angles=CFrame.Angles
- cloaked=false
- necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
- LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
- RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
- RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
- RootPart=Character.HumanoidRootPart
- RootJoint=RootPart.RootJoint
- RootCF=euler(-1.57,0,3.14)
- local part = Instance.new("Part",workspace)
- local panel = Instance.new("Part",workspace)
- local plr = game.Players.LocalPlayer
- local bill = Instance.new("BillboardGui",part)
- local sb = Instance.new("SelectionBox",part)
- local enabled = true
- local panelmode = false
- part.Size = Vector3.new(4, 4.285, 2)
- part.Rotation = Vector3.new(-30, 0, 0)
- part.CanCollide = false
- part.Anchored = true
- part.BrickColor = BrickColor.new("Lapis")
- part.Transparency = 0.5
- --bilboardgui
- bill.Adornee = part
- bill.Size = UDim2.new(0, 200,0, 50)
- bill.StudsOffset = Vector3.new(0, 3, 0)
- local text = Instance.new("TextLabel",bill)
- text.BackgroundTransparency = 1
- text.Size = UDim2.new(0, 200,0, 50)
- text.TextSize = 25
- text.Text = "ZV Admin loaded!"
- text.TextStrokeTransparency = 0
- text.TextStrokeColor3 = Color3.new(0, 0, 0.239216)
- --selectionbox
- sb.Adornee = part
- sb.LineThickness = 0.1
- --panel
- panel.Size = Vector3.new(9.199, 4.913, 0.001)
- panel.Rotation = Vector3.new(0, 59, 0)
- panel.CanCollide = false
- panel.Anchored = true
- panel.Transparency = 1
- --surfaceguiofpanel
- local sg = Instance.new("SurfaceGui",panel)
- local enter = Instance.new("TextBox",sg)
- local stun = Instance.new("TextButton",sg)
- local kill = Instance.new("TextButton",sg)
- local explode = Instance.new("TextButton",sg)
- local panelby = Instance.new("TextLabel",sg)
- sg.Adornee = panel
- sg.Face = "Back"
- sg.Enabled = false
- panelby.Position = UDim2.new(0,0,0,0)
- panelby.Size = UDim2.new(0,200,0,30)
- panelby.Text = "hm..."
- panelby.TextSize = 25
- enter.Position = UDim2.new(0,200,0.2,0)
- enter.Size = UDim2.new(0,400,0,200)
- enter.Text = "enter sum name here idk"
- enter.TextXAlignment = "Left"
- enter.TextYAlignment = "Top"
- enter.TextSize = 25
- stun.Position = UDim2.new(0,0,0.2,0)
- stun.Size = UDim2.new(0,200,0,100)
- stun.TextColor3 = Color3.new(1, 1, 1)
- stun.BackgroundColor3 = Color3.new(0.133333, 0.133333, 0.133333)
- stun.TextSize = 25
- stun.Text = "Stun"
- kill.Position = UDim2.new(0,0,0.35,0)
- kill.Size = UDim2.new(0,200,0,100)
- kill.TextColor3 = Color3.new(1, 1, 1)
- kill.BackgroundColor3 = Color3.new(0.133333, 0.133333, 0.133333)
- kill.TextSize = 25
- kill.Text = "Kill"
- explode.Position = UDim2.new(0,0,0.5,0)
- explode.Size = UDim2.new(0,200,0,100)
- explode.TextColor3 = Color3.new(1, 1, 1)
- explode.BackgroundColor3 = Color3.new(0.133333, 0.133333, 0.133333)
- explode.TextSize = 25
- explode.Text = "Explode"
- --and mouse.Target.Parent == part
- if Player then
- mouse.Button1Down:Connect(function()
- if mouse.Target == part then
- enabled = false
- panelmode = true
- panel.Transparency = 0.5
- sg.Enabled = true
- part:Destroy()
- end
- end)
- end
- stun.MouseButton1Down:Connect(function()
- if Player then
- local kil = Instance.new("Tool",Backpack)
- kil.Name = "Kill"
- kil.RequiresHandle = false
- kil.CanBeDropped = false
- if Player then
- kil.Activated:Connect(function()
- if mouse.Target then
- local choose = mouse.Target
- local sou = Instance.new("Sound",choose)
- sou.Volume=100
- sou.Pitch=1
- sou.SoundId = "rbxassetid://5639677185"
- sou.Looped = false
- wait()
- sou:play()
- wait(1)
- if choose == panel then
- print("no")
- else
- choose:Destroy()
- end
- end
- end)
- end
- end
- end)
- kill.MouseButton1Down:Connect(function()
- if Player then
- local kil = Instance.new("Tool",Backpack)
- kil.Name = "Kill"
- kil.RequiresHandle = false
- kil.CanBeDropped = false
- if Player then
- kil.Activated:Connect(function()
- if mouse.Target then
- local choose = mouse.Target
- local hl = Instance.new("Highlight",choose)
- hl.Adornee = mouse.Target
- wait(1)
- if choose == panel then
- print("no")
- else
- choose:Destroy()
- end
- end
- end)
- end
- end
- end)
- explode.MouseButton1Down:Connect(function()
- if Player then
- local explo = Instance.new("Tool",Backpack)
- explo.Name = "Explode"
- explo.RequiresHandle = false
- explo.CanBeDropped = false
- if Player then
- explo.Activated:Connect(function()
- if mouse.Target then
- local b = Instance.new("Explosion")
- b.Parent = mouse.Target
- b.Position = mouse.Hit.p
- end
- end)
- end
- end
- end)
- Humanoid.Died:Connect(function()
- panel:Destroy()
- end)
- while enabled do
- task.wait(0)
- part.Position = Vector3.new(RootPart.Position.X, RootPart.Position.Y, RootPart.Position.Z - 5 )
- end
- while panelmode do
- task.wait(0)
- panel.Position = Vector3.new(RootPart.Position.X - 3, RootPart.Position.Y + 3, RootPart.Position.Z - 3)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement