SHARE
TWEET

Untitled

a guest Aug 20th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5.     local rp = RealPlayer
  6.     script.Parent = rp.Character
  7.    
  8.     --RemoteEvent for communicating
  9.     local Event = Instance.new("RemoteEvent")
  10.     Event.Name = "UserInput_Event"
  11.  
  12.     --Fake event to make stuff like Mouse.KeyDown work
  13.     local function fakeEvent()
  14.         local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  15.         t.connect = t.Connect
  16.         return t
  17.     end
  18.  
  19.     --Creating fake input objects with fake variables
  20.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  21.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  22.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  23.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  24.     end}
  25.     --Merged 2 functions into one by checking amount of arguments
  26.     CAS.UnbindAction = CAS.BindAction
  27.  
  28.     --This function will trigger the events that have been :Connect()'ed
  29.     local function te(self,ev,...)
  30.         local t = m[ev]
  31.         if t and t._fakeEvent then
  32.             for _,f in pairs(t.Functions) do
  33.                 f(...)
  34.             end
  35.         end
  36.     end
  37.     m.TrigEvent = te
  38.     UIS.TrigEvent = te
  39.  
  40.     Event.OnServerEvent:Connect(function(plr,io)
  41.         if plr~=rp then return end
  42.         m.Target = io.Target
  43.         m.Hit = io.Hit
  44.         if not io.isMouse then
  45.             local b = io.UserInputState == Enum.UserInputState.Begin
  46.             if io.UserInputType == Enum.UserInputType.MouseButton1 then
  47.                 return m:TrigEvent(b and "Button1Down" or "Button1Up")
  48.             end
  49.             for _,t in pairs(CAS.Actions) do
  50.                 for _,k in pairs(t.Keys) do
  51.                     if k==io.KeyCode then
  52.                         t.Function(t.Name,io.UserInputState,io)
  53.                     end
  54.                 end
  55.             end
  56.             m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  57.             UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  58.         end
  59.     end)
  60.     Event.Parent = NLS([==[
  61.     local Player = game:GetService("Players").LocalPlayer
  62.     local Event = script:WaitForChild("UserInput_Event")
  63.  
  64.     local Mouse = Player:GetMouse()
  65.     local UIS = game:GetService("UserInputService")
  66.     local input = function(io,a)
  67.         if a then return end
  68.         --Since InputObject is a client-side instance, we create and pass table instead
  69.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  70.     end
  71.     UIS.InputBegan:Connect(input)
  72.     UIS.InputEnded:Connect(input)
  73.  
  74.     local h,t
  75.     --Give the server mouse data 30 times every second, but only if the values changed
  76.     --If player is not moving their mouse, client won't fire events
  77.     while wait(1/30) do
  78.         if h~=Mouse.Hit or t~=Mouse.Target then
  79.             h,t=Mouse.Hit,Mouse.Target
  80.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  81.         end
  82.     end]==],Player.Character)
  83.  
  84.     ----Sandboxed game object that allows the usage of client-side methods and services
  85.     --Real game object
  86.     local _rg = game
  87.  
  88.     --Metatable for fake service
  89.     local fsmt = {
  90.         __index = function(self,k)
  91.             local s = rawget(self,"_RealService")
  92.             if s then return s[k] end
  93.         end,
  94.         __newindex = function(self,k,v)
  95.             local s = rawget(self,"_RealService")
  96.             if s then s[k]=v end
  97.         end,
  98.         __call = function(self,...)
  99.             local s = rawget(self,"_RealService")
  100.             if s then return s(...) end
  101.         end
  102.     }
  103.     local function FakeService(t,RealService)
  104.         t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  105.         return setmetatable(t,fsmt)
  106.     end
  107.  
  108.     --Fake game object
  109.     local g = {
  110.         GetService = function(self,s)
  111.             return self[s]
  112.         end,
  113.         Players = FakeService({
  114.             LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  115.         },"Players"),
  116.         UserInputService = FakeService(UIS,"UserInputService"),
  117.         ContextActionService = FakeService(CAS,"ContextActionService"),
  118.     }
  119.     rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  120.     g.service = g.GetService
  121.    
  122.     g.RunService = FakeService({
  123.         RenderStepped = _rg:GetService("RunService").Heartbeat,
  124.         BindToRenderStep = function(self,name,_,fun)
  125.             self._btrs[name] = self.Heartbeat:Connect(fun)
  126.         end,
  127.         UnbindFromRenderStep = function(self,name)
  128.             self._btrs[name]:Disconnect()
  129.         end,
  130.     },"RunService")
  131.  
  132.     setmetatable(g,{
  133.         __index=function(self,s)
  134.             return _rg:GetService(s) or typeof(_rg[s])=="function"
  135.             and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  136.         end,
  137.         __newindex = fsmt.__newindex,
  138.         __call = fsmt.__call
  139.     })
  140.     --Changing owner to fake player object to support owner:GetMouse()
  141.     game,owner = g,g.Players.LocalPlayer
  142.     end
  143.    
  144.    
  145.    
  146. local player = game.Players.LocalPlayer
  147. local char = player.Character
  148. local mouse = player:GetMouse()
  149. local larm = char["Left Arm"]
  150. local rarm = char["Right Arm"]
  151. local lleg = char["Left Leg"]
  152. local rleg = char["Right Leg"]
  153. local hed = char.Head
  154. local torso = char.Torso
  155. local ASD = BrickColor.new("Pastel brown")
  156. local hum = char.Humanoid
  157. local cam = game.Workspace.CurrentCamera
  158. local root = char.HumanoidRootPart
  159. local deb = false
  160. local shot = 0
  161. local l = game:GetService("Lighting")
  162. local rs = game:GetService("RunService").RenderStepped
  163. local stanceToggle = "Normal"
  164.  
  165. function tag()
  166.         local cool = Instance.new("BillboardGui")
  167.     cool.Parent = player.Character.Head
  168.     cool.Size = UDim2.new(3, 0,3, 0)
  169.     cool.Name = "cool"
  170.     cool.MaxDistance = 150
  171.     cool.StudsOffset = Vector3.new(0,4,0)
  172.     local text = Instance.new("TextLabel")
  173.     text.Parent = player.Character.Head.cool
  174.     text.Text = "this script was made by masonsteinmet (why do I put this in every script I make)"
  175.     text.Font = "Cartoon"
  176.     text.TextStrokeTransparency = 0
  177.     text.TextStrokeColor3 = Color3.new(255, 255, 255)
  178.     text.Size = UDim2.new(1,0,1,0)
  179.     text.BackgroundTransparency = 1
  180.     text.TextScaled = true
  181.     player.Character.Humanoid.BreakJointsOnDeath = false
  182.     player.Character.Humanoid.DisplayDistanceType = "None"
  183.     end
  184.    
  185.  
  186. -- Warning Press
  187. local a = true
  188. mouse.KeyDown:Connect(function(key)
  189.     if key == "k" then
  190.     local a = Instance.new("Part")
  191.     a.Parent = workspace
  192.     a.Position = player.Character.Head.Position + (player.Character.Head.CFrame.lookVector * 4)
  193.     a.Name = "Detector"
  194.     a.Size = Vector3.new(1.27, 1, 1.38)
  195.     a.Transparency = 0
  196.     a.Material = Enum.Material.Neon
  197.     a.Touched:Connect(function(hit)
  198.          if hit.parent:FindFirstChild("Humanoid") then
  199.             local w = Instance.new("Weld")
  200.             a.Parent = workspace
  201.             a.Position = hit.Parent.Torso.Position or hit.Parent.LowerTorso.Position
  202.             w.Part0 = hit.Parent.Torso
  203.             w.Part1 = a
  204.     end
  205.  
  206. end)
  207.         local b = Instance.new("BodyForce")
  208.         b.Parent = a
  209.         b.Force = player.Character.Head.CFrame.lookVector * 80 + Vector3.new(0,225,0)
  210.         a.CanCollide = true
  211.         wait(25)
  212.         b:Destroy()
  213.         wait(0.8)
  214.         a.Transparency = 1
  215.         a.Anchored = true
  216. end
  217. end)
  218. mouse.KeyDown:Connect(function(key)
  219.         if key == "l" then
  220.         local aa = Instance.new("Part")
  221.         aa.Parent = workspace
  222.         aa.Material = Enum.Material.Neon
  223.         aa.Position = player.Character.Head.Position + (player.Character.Head.CFrame.lookVector * 4)
  224.         aa.BrickColor = BrickColor.new("Cyan")
  225.         aa.Size = Vector3.new(1.27, 1, 1.38)
  226.         local bb = Instance.new("BodyForce")
  227.         bb.Parent = aa
  228.         bb.Force = player.Character.Head.CFrame.lookVector * 80 + Vector3.new(0,225,0)
  229.         aa.CanCollide = true
  230.         wait(25)
  231.         bb:Destroy()
  232.         wait(0.8)
  233.         aa.Transparency = 1
  234.         aa.Anchored = true
  235.         aa.Touched:Connect(function(hit)
  236.          if hit.parent:FindFirstChild("Humanoid") then
  237.             aa.CanCollide = false
  238.             local w = Instance.new("Weld")
  239.             aa.Parent = workspace
  240.             aa.Position = hit.Parent.Head.Position
  241.             w.Part0 = hit.Parent.Head
  242.             w.Part1 = aa
  243.         hit.Parent.Humanoid.WalkSpeed = 1
  244.         local cool = Instance.new("BillboardGui")
  245.     cool.Parent = hit.parent.Head
  246.     cool.Size = UDim2.new(3, 0,3, 0)
  247.     cool.Name = "cool"
  248.     cool.MaxDistance = 150
  249.     cool.StudsOffset = Vector3.new(0,4,0)
  250.     local text = Instance.new("ImageLabel")
  251.     text.Parent = hit.Parent.Head.cool
  252.     text.Image = "rbxassetid://98481952"
  253.     text.Size = UDim2.new(1,0,1,0)
  254.     text.BackgroundTransparency = 1
  255.     text.TextScaled = true
  256.         end
  257.         end)
  258.     end
  259.     end)
  260.  
  261.     tag()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top