Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local convert = {}
- local FuncPbL = Instance.new("RemoteFunction")
- FuncPbL.Name = "Pbl"
- FuncPbL.Parent = NLS([[
- local Function = script.Pbl
- if Function ~= nil then
- Function.OnClientInvoke = function(Sound)
- return Sound.PlaybackLoudness
- end
- end
- ]], owner.Character)
- local Funcmouse = Instance.new("RemoteFunction")
- Funcmouse.Name = "mouse"
- Funcmouse.Parent = NLS([[
- local Function = script.mouse
- local uis = game:GetService("UserInputService")
- if Function ~= nil then
- Function.OnClientInvoke = function(type_, key, func)
- if type_ == "hit" then
- return owner:GetMouse().Hit
- end
- if type_ == "target" then
- return owner:GetMouse().Target
- end
- if type_ == "x" then
- return owner:GetMouse().x
- end
- if type_ == "y" then
- return owner:GetMouse().y
- end
- if type_ == "ViewSizeX" then
- return owner:GetMouse().ViewSizeX
- end
- if type_ == "ViewSizeY" then
- return owner:GetMouse().ViewSizeY
- end
- if type_ == "UnitRay" then
- return owner:GetMouse().UnitRay
- end
- if type_ == "TargetFilter" then
- return owner:GetMouse().TargetFilter
- end
- if type_ == "TargetSurface" then
- return owner:GetMouse().TargetSurface
- end
- if type_ == "origin" then
- return owner:GetMouse().Origin
- end
- if type_ == "Idle" then
- local currentcframe = owner:GetMouse().Hit
- while wait() do
- local t = 0
- if t > 1 then
- if owner:GetMouse().Hit == currentcframe then
- wait(0.5)
- spawn(function()
- func()
- end)
- end
- end
- t = t + ((0.001 + math.sin(0.1)) + 0.01 + 0.055)
- end
- end
- if type_ == "Move" then
- local currenthit = owner:GetMouse().Hit
- while wait() do
- if owner:GetMouse().Hit ~= currenthit then
- wait(0.5)
- spawn(function()
- func()
- end)
- currenthit = owner:GetMouse().Hit
- end
- end
- end
- if type_ == "KeyDown" then
- local function onInputBegan(input, gameProcessed)
- if input.UserInputType == Enum.UserInputType.Keyboard then
- if input.KeyCode == key then
- func()
- end
- end
- end
- uis.InputBegan:Connect(onInputBegan)
- end
- if type_ == "KeyUp" then
- local function onInputEnd(input, gameProcessed)
- if input.UserInputType == Enum.UserInputType.Keyboard then
- if input.KeyCode == key then
- func()
- end
- end
- end
- uis.InputEnded:Connect(onInputBegan)
- end
- if type_ == "Button1Down" then
- local function InputBegan(input, gameProcessed)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- func()
- end
- end
- uis.InputBegan:Connect(InputBegan)
- end
- if type_ == "Button1Up" then
- local function InputEnd(input, gameProcessed)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- func()
- end
- end
- uis.InputEnd:Connect(InputBegan)
- end
- if type_ == "Button2Down" then
- local function InputBegan(input, gameProcessed)
- if input.UserInputType == Enum.UserInputType.MouseButton2 then
- func()
- end
- end
- uis.InputBegan:Connect(InputBegan)
- end
- if type_ == "Button2Up" then
- local function InputEnd(input, gameProcessed)
- if input.UserInputType == Enum.UserInputType.MouseButton2 then
- func()
- end
- end
- uis.InputEnd:Connect(InputBegan)
- end
- if type_ == "WheelBackward" then
- return owner:GetMouse().WheelBackward(func)
- end
- if type_ == "WheelForward" then
- return owner:GetMouse().WheelForward(func)
- end
- end
- end
- ]], owner.Character)local Character = owner.Character
- convert.PlaybackLoudness = function(sound)
- return FuncPbL:InvokeClient(owner, sound)
- end
- Mouse = {}
- Mouse.Hit = function(func)
- return Funcmouse:InvokeClient(owner, "hit", "", func)
- end
- Mouse.Target = function(func)
- return Funcmouse:InvokeClient(owner, "target", "", func)
- end
- Mouse.Origin = function(func)
- return Funcmouse:InvokeClient(owner, "origin", "", func)
- end
- Mouse.X = function(func)
- return Funcmouse:InvokeClient(owner, "x", "", func)
- end
- Mouse.Y = function(func)
- return Funcmouse:InvokeClient(owner, "y", "", func)
- end
- Mouse.ViewSizeX = function(func)
- return Funcmouse:InvokeClient(owner, "ViewSizeX", "", func)
- end
- Mouse.ViewSizeY = function(func)
- return Funcmouse:InvokeClient(owner, "ViewSizeX", "", func)
- end
- Mouse.UnitRay = function(func)
- return Funcmouse:InvokeClient(owner, "UnitRay", "", func)
- end
- Mouse.TargetFilter = function(func)
- return Funcmouse:InvokeClient(owner, "TargetFilter", "", func)
- end
- Mouse.TargetSurface = function(func)
- return Funcmouse:InvokeClient(owner, "TargetSurface", "", func)
- end
- Mouse.Idle = function(func)
- return Funcmouse:InvokeClient(owner, "Idle", "", func)
- end
- Mouse.Move = function(func)
- return Funcmouse:InvokeClient(owner, "Move", "", func)
- end
- Mouse.KeyDown= function(key,func)
- if typeof(key) ~= nil then
- if Enum.KeyCode[key] ~= nil then
- return Funcmouse:InvokeClient(owner, "KeyDown", "", func)
- end
- end
- end
- Mouse.KeyUp= function(key,func)
- if typeof(key) ~= nil then
- if Enum.KeyCode[key] ~= nil then
- return Funcmouse:InvokeClient(owner, "KeyUp", "", func)
- end
- end
- end
- Mouse.Button1Down = function(func)
- return Funcmouse:InvokeClient(owner, "Button1Down", "", func)
- end
- Mouse.Button1Up = function(func)
- return Funcmouse:InvokeClient(owner, "Button1Up", "", func)
- end
- Mouse.Button2Down = function(func)
- return Funcmouse:InvokeClient(owner, "Button1Down", "", func)
- end
- Mouse.WheelBackward = function(func)
- return Funcmouse:InvokeClient(owner, "WheelBackward", "", func)
- end
- Mouse.WheelForward = function(func)
- return Funcmouse:InvokeClient(owner, "WheelForward", "", func)
- end
- convert.Create = function(inst, prop)
- local i = Instance.new(inst)
- for v, k in next, prop do
- if i.Parent == nil then
- i[v] = k
- end
- end
- if i.Parent ~= nil then
- return i
- end
- end
- convert.Mouse = Mouse
- convert.workspace = workspace
- local Funcuis = Instance.new("RemoteFunction")
- Funcuis.Name = "UIS"
- Funcuis.Parent = NLS([[
- local Function = script.UIS
- local UIS = game:GetService("UserInputService")
- if Function ~= nil then
- Function.OnClientInvoke = function(type_, gamepadnum, userinput, key, func)
- if type == "InputBegan" then
- local function InputBegan(input, gameProcessed)
- if input.UserInputType == userinput then
- if input.UserInputType == Enum.UserInputType.KeyBoard then
- if input.KeyCode == key then
- func()
- end
- else
- func()
- end
- end
- end
- UIS.InputBegan:Connect(InputBegan)
- end
- if type == "InputEnded" then
- local function InputEnded(input, gameProcessed)
- if input.UserInputType == userinput then
- if input.UserInputType == Enum.UserInputType.KeyBoard then
- if input.KeyCode == key then
- func()
- end
- else
- func()
- end
- end
- end
- UIS.InputEnded:Connect(InputBegan)
- end
- if type == "InputChanged" then
- local function InputChanged(input, gameProcessed)
- if input.UserInputType == userinput then
- if input.UserInputType == Enum.UserInputType.KeyBoard then
- if input.KeyCode == key then
- func()
- end
- else
- func()
- end
- end
- end
- UIS.InputChanged:Connect(InputBegan)
- end
- end
- end
- ]], owner.Character)
- -- end of converter and simplifier
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement