Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --//Created in lua, by: boshjio15854
- --//2019/April/21 {13:54 AM}
- --//measvx.lua
- --//Please dont leak it.
- --FE Script--
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,game,owner = owner,game
- local RealPlayer = Player
- do
- warn("whos dis")
- local rp = RealPlayer
- script.Parent = rp.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,Functions={},Connect=function(self,f)table.insert(self.Functions,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 then
- for _,f in pairs(t.Functions) do
- f(...)
- end
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=rp then return end
- m.Target = io.Target
- m.Hit = io.Hit
- if not io.isMouse then
- 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 Mouse = Player:GetMouse()
- 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,Hit=Mouse.Hit,Target=Mouse.Target})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- 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)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local _rg = game
- --Metatable for fake service
- local fsmt = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then return s[k] end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end,
- __call = function(self,...)
- local s = rawget(self,"_RealService")
- if s then return s(...) end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
- return setmetatable(t,fsmt)
- end
- --Fake game object
- local g = {
- GetService = function(self,s)
- return self[s]
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- }
- rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
- g.service = g.GetService
- g.RunService = FakeService({
- RenderStepped = _rg:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- setmetatable(g,{
- __index=function(self,s)
- return _rg:GetService(s) or typeof(_rg[s])=="function"
- and function(_,...)return _rg[s](_rg,...)end or _rg[s]
- end,
- __newindex = fsmt.__newindex,
- __call = fsmt.__call
- })
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = g,g.Players.LocalPlayer
- end
- --Credits--
- print("//Created in lua, by: boshjio15854")
- print("//2019/April/21 {13:54 AM}")
- print("//measvx.lua")
- print("")
- print("//Please dont leak it.")
- --Player--
- local p = owner
- local c = p.Character
- local t = c.Torso
- local h = c.Head
- local hum = c.Humanoid
- local hrp = c.HumanoidRootPart
- --Usefull variables--
- local txt = Instance.new("BillboardGui", h)
- local tag = Instance.new("TextLabel", txt)
- --local mainsmt = game.Mainsmyt:LoadScript(File.measvx.lua) == true
- --mainsmt:Load()
- --Gui--
- local no = Instance.new("ScreenGui") --
- local say = Instance.new("TextBox") --
- local explode = Instance.new("TextButton") --
- local sparkly = Instance.new("TextButton") --
- local titled = Instance.new("TextButton")
- local rainbow = Instance.new("TextButton") --
- local burn = Instance.new("TextButton") --
- no.Name = "no"
- no.Parent = p.PlayerGui
- no.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- say.Name = "say"
- say.Parent = no
- say.BackgroundColor3 = Color3.new(1, 1, 1)
- say.BackgroundTransparency = 0.60000002384186
- say.BorderSizePixel = 3
- say.Position = UDim2.new(0.427641153, 0, 0.89403975, 0)
- say.Size = UDim2.new(0, 200, 0, 31)
- say.Font = Enum.Font.GothamBlack
- say.Text = "Say anything here"
- say.TextColor3 = Color3.new(1, 1, 1)
- say.TextSize = 20
- say.TextStrokeTransparency = 0
- explode.Name = "explode"
- explode.Parent = no
- explode.BackgroundColor3 = Color3.new(1, 1, 1)
- explode.BackgroundTransparency = 1
- explode.Position = UDim2.new(0.0303907376, 0, 0.826158941, 0)
- explode.Size = UDim2.new(0, 144, 0, 24)
- explode.Font = Enum.Font.GothamBlack
- explode.Text = "Explode"
- explode.TextColor3 = Color3.new(1, 1, 1)
- explode.TextScaled = true
- explode.TextSize = 14
- explode.TextStrokeTransparency = 0
- explode.TextWrapped = true
- sparkly.Name = "sparkly"
- sparkly.Parent = no
- sparkly.BackgroundColor3 = Color3.new(1, 1, 1)
- sparkly.BackgroundTransparency = 1
- sparkly.Position = UDim2.new(0.0303907376, 0, 0.786423862, 0)
- sparkly.Size = UDim2.new(0, 144, 0, 24)
- sparkly.Font = Enum.Font.GothamBlack
- sparkly.Text = "Sparkly"
- sparkly.TextColor3 = Color3.new(1, 1, 1)
- sparkly.TextScaled = true
- sparkly.TextSize = 14
- sparkly.TextStrokeTransparency = 0
- sparkly.TextWrapped = true
- titled.Name = "titled"
- titled.Parent = no
- titled.BackgroundColor3 = Color3.new(1, 1, 1)
- titled.BackgroundTransparency = 1
- titled.Position = UDim2.new(0.0303907376, 0, 0.746688783, 0)
- titled.Size = UDim2.new(0, 144, 0, 24)
- titled.Font = Enum.Font.GothamBlack
- titled.Text = "Titled"
- titled.TextColor3 = Color3.new(1, 1, 1)
- titled.TextScaled = true
- titled.TextSize = 14
- titled.TextStrokeTransparency = 0
- titled.TextWrapped = true
- rainbow.Name = "rainbow"
- rainbow.Parent = no
- rainbow.BackgroundColor3 = Color3.new(1, 1, 1)
- rainbow.BackgroundTransparency = 1
- rainbow.Position = UDim2.new(0.0303907376, 0, 0.706953704, 0)
- rainbow.Size = UDim2.new(0, 144, 0, 24)
- rainbow.Font = Enum.Font.GothamBlack
- rainbow.Text = "[Broken]"
- rainbow.TextColor3 = Color3.new(1, 1, 1)
- rainbow.TextScaled = true
- rainbow.TextSize = 14
- rainbow.TextStrokeTransparency = 0
- rainbow.TextWrapped = true
- burn.Name = "burn"
- burn.Parent = no
- burn.BackgroundColor3 = Color3.new(1, 1, 1)
- burn.BackgroundTransparency = 1
- burn.Position = UDim2.new(0.0303907376, 0, 0.627483487, 0)
- burn.Size = UDim2.new(0, 144, 0, 24)
- burn.Font = Enum.Font.GothamBlack
- burn.Text = "Burn"
- burn.TextColor3 = Color3.new(1, 1, 1)
- burn.TextScaled = true
- burn.TextSize = 14
- burn.TextStrokeTransparency = 0
- burn.TextWrapped = true
- --Some functions--
- function explodes()
- local b = Instance.new("Explosion", t)
- b.Visible = false
- end
- function sparkl()
- local sp = Instance.new("Sparkles", t)
- end
- function burns()
- local idk = Instance.new("Fire", t)
- wait(1)
- hum.Health = hum.Health - 10
- wait(1)
- hum.Health = hum.Health - 10
- wait(1)
- hum.Health = hum.Health - 10
- wait(1)
- hum.Health = hum.Health - 10
- wait(1)
- hum.Health = hum.Health - 10
- wait(1)
- hum.Health = hum.Health - 10
- wait(1)
- hum.Health = hum.Health - 10
- wait(1)
- hum.Health = hum.Health - 10
- wait(1)
- hum.Health = hum.Health - 10
- wait(1)
- hum.Health = hum.Health - 10
- wait(1)
- hum.Health = hum.Health - 10
- wait(1)
- hum.Health = hum.Health - 10
- wait(1)
- hum.Health = hum.Health - 10
- wait(1)
- hum.Health = hum.Health - 10
- end
- function title()
- local txt = Instance.new("BillboardGui", c)
- txt.Adornee = c.Head
- txt.Name = "_status"
- txt.Size = UDim2.new(2, 0, 1.2, 0)
- txt.StudsOffset = Vector3.new(-9, 7, 0)
- local text = Instance.new("TextLabel", txt)
- text.Size = UDim2.new(10, 0, 7, 0)
- text.FontSize = Enum.FontSize.Size24
- text.TextScaled = true
- text.TextTransparency = 0
- text.BackgroundTransparency = 1
- text.TextTransparency = 0
- text.TextStrokeTransparency = 0
- text.Font = Enum.Font.Fantasy
- text.Text = p.Name
- end
- --Gui FocusLost / OnClick
- say.FocusLost:connect(function()
- local txt = Instance.new("BillboardGui", c)
- txt.Adornee = c.Head
- txt.Name = "_status"
- txt.Size = UDim2.new(2, 0, 1.2, 0)
- txt.StudsOffset = Vector3.new(-9, 5, 0)
- local text = Instance.new("TextLabel", txt)
- text.Size = UDim2.new(10, 0, 7, 0)
- text.FontSize = Enum.FontSize.Size24
- text.TextScaled = false
- text.TextTransparency = 0
- text.BackgroundTransparency = 1
- text.TextTransparency = 0
- text.TextStrokeTransparency = 0
- text.Font = Enum.Font.Arcade
- text.TextStrokeColor3 = Color3.new(255, 255, 255)
- text.Text = say.Text
- wait(5)
- txt:Destroy()
- end)
- explode.MouseButton1Click:connect(function()
- explodes()
- end)
- sparkly.MouseButton1Click:connect(function()
- sparkl()
- end)
- burn.MouseButton1Click:connect(function()
- burns()
- end)
- titled.MouseButton1Click:connect(function()
- title()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement