Advertisement
plytalent

something

Mar 8th, 2019
217
0
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. print("FE Compatibility code by Mokiros")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local Mouse = Player:GetMouse()
  66. local UIS = game:GetService("UserInputService")
  67. local input = function(io,a)
  68. if a then return end
  69. --Since InputObject is a client-side instance, we create and pass table instead
  70. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84.  
  85. ----Sandboxed game object that allows the usage of client-side methods and services
  86. --Real game object
  87. local _rg = game
  88.  
  89. --Metatable for fake service
  90. local fsmt = {
  91. __index = function(self,k)
  92. local s = rawget(self,"_RealService")
  93. if s then return s[k] end
  94. end,
  95. __newindex = function(self,k,v)
  96. local s = rawget(self,"_RealService")
  97. if s then s[k]=v end
  98. end,
  99. __call = function(self,...)
  100. local s = rawget(self,"_RealService")
  101. if s then return s(...) end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return self[s]
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. }
  120. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  121. g.service = g.GetService
  122.  
  123. g.RunService = FakeService({
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126.  
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132.  
  133. setmetatable(g,{
  134. __index=function(self,s)
  135. return _rg:GetService(s) or typeof(_rg[s])=="function"
  136. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  137. end,
  138. __newindex = fsmt.__newindex,
  139. __call = fsmt.__call
  140. })
  141. --Changing owner to fake player object to support owner:GetMouse()
  142. game,owner = g,g.Players.LocalPlayer
  143. end
  144.  
  145.  
  146. Player = owner
  147. ----//=================================\\
  148. ----|| SAZERENOS' ARTIFICIAL HEARTBEAT
  149. ----\\=================================//
  150.  
  151. ArtificialHB = Instance.new("BindableEvent", script)
  152. ArtificialHB.Name = "ArtificialHB"
  153.  
  154. script:WaitForChild("ArtificialHB")
  155.  
  156. frame = 1/60
  157. tf = 0
  158. allowframeloss = false
  159. tossremainder = false
  160. lastframe = tick()
  161. script.ArtificialHB:Fire()
  162.  
  163. game:GetService("RunService").Heartbeat:connect(function(s, p)
  164. tf = tf + s
  165. if tf >= frame then
  166. if allowframeloss then
  167. script.ArtificialHB:Fire()
  168. lastframe = tick()
  169. else
  170. for i = 1, math.floor(tf / frame) do
  171. script.ArtificialHB:Fire()
  172. end
  173. lastframe = tick()
  174. end
  175. if tossremainder then
  176. tf = 0
  177. else
  178. tf = tf - frame * math.floor(tf / frame)
  179. end
  180. end
  181. end)
  182.  
  183. --//=================================\\
  184. --\\=================================//
  185. function rswait(NUMBER)
  186. if NUMBER == 0 or NUMBER == nil then
  187. ArtificialHB.Event:wait()
  188. else
  189. for i = 1, NUMBER do
  190. ArtificialHB.Event:wait()
  191. end
  192. end
  193. end
  194. function swait(NUMBER)
  195. if NUMBER == 0 or NUMBER == nil then
  196. ArtificialHB.Event:wait()
  197. else
  198. for i = 1, NUMBER do
  199. ArtificialHB.Event:wait()
  200. end
  201. end
  202. end
  203. --
  204. local p = Player
  205. local char = p.Character
  206. --from lost hope
  207. local Create = LoadLibrary("RbxUtility").Create
  208. local targetted = nil
  209. local Humanoid = char:FindFirstChildOfClass("Humanoid")
  210. --end
  211. local mouse = p:GetMouse()
  212. local larm = char:WaitForChild("Left Arm")
  213. local rarm = char:WaitForChild("Right Arm")
  214. local lleg = char:WaitForChild("Left Leg")
  215. local rleg = char:WaitForChild("Right Leg")
  216. local hed = char:WaitForChild("Head")
  217. local torso = char:WaitForChild("Torso")
  218. local root = char:WaitForChild("HumanoidRootPart")
  219. local hum = char:FindFirstChildOfClass("Humanoid")
  220. --modify
  221. function RemoveOutlines(part)
  222. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  223. end
  224. local function FindHumanoid(Part)local humanoid=nil if Part.Parent then if Part.Parent~=Player.Character and Part.Parent:FindFirstChildOfClass("Humanoid")~=nil then humanoid=Part.Parent:FindFirstChildOfClass("Humanoid")else if Part.Parent.Parent then if Part.Parent.Parent:FindFirstChildOfClass("Humanoid")and Part.Parent.Parent~=Player.Character then humanoid=Part.Parent.Parent:FindFirstChildOfClass("Humanoid")end end end end if humanoid==Humanoid then humanoid=nil end return humanoid end
  225. Humanoid.Animator.Parent = nil
  226. char.Animate.Parent = nil
  227. if char:FindFirstChild("Health")then char.Health.Parent = nil end
  228. function CreateBeam(Parent,isReversed)local p=Instance.new("Beam",Parent)local a0=Instance.new("Attachment",Parent)local a1=Instance.new("Attachment",Parent)if isReversed then p.Attachment0=a1 p.Attachment1=a0 else p.Attachment0=a0 p.Attachment1=a1 end return a0,a1,p end
  229. function CTE(Part)Part.Size=Vector3.new()Part.Transparency=1 Part.CanCollide=false Part.Anchored=true local j=Instance.new("BodyVelocity",Part)j.MaxForce=Vector3.new(1/0,1/0,1/0)j.Velocity=Vector3.new(0,0,0)end
  230. function RingE(pos,siz,tim,dsiz,seg,wid,z,col,w)local IDK=.7
  231. local p=Instance.new("Part",workspace)if col==nil then col=ColorSequence.new(Color3.new())end if z==nil then z=0 end
  232. CTE(p)p.CFrame=pos
  233. local a0,a1,b=CreateBeam(p)a0.Position=Vector3.new(0,0,-dsiz)a1.Position=-a0.Position b.Texture="rbxassetid://1251856844"b.Color=col
  234. local b2=Instance.new("Beam",b.Parent)b2.Attachment0=a1 b2.Attachment1=a0 b2.Texture="rbxassetid://1251856844"b2.Color=col
  235. b.CurveSize0=math.abs(a0.Position.Z)*2 *IDK b.CurveSize1=math.abs(a0.Position.Z)*2 *IDK b2.CurveSize0=-math.abs(a0.Position.Z)*2 *IDK b2.CurveSize1=math.abs(a0.Position.Z)*2 *IDK
  236. b.Segments=seg b2.Segments=seg b.ZOffset=z b2.ZOffset=z b.Width0=wid b.Width1=wid b2.Width0=wid b2.Width1=wid spawn(function()
  237. for i=1,tim do if p.Parent then
  238. a0.Position=a0.Position-Vector3.new(0,0,siz)a1.Position=a1.Position+Vector3.new(0,0,siz)b.CurveSize0=(a1.Position.Z*2)*IDK b.CurveSize1=-(a1.Position.Z*2)*IDK
  239. b2.CurveSize0=-(a1.Position.Z*2)*IDK b2.CurveSize1=(a1.Position.Z*2)*IDK
  240. if w~=nil then b.Width0=b.Width0+w b.Width1=b.Width0 b2.Width0=b.Width0 b2.Width1=b.Width0 end b.Transparency=NumberSequence.new(i/tim)b2.Transparency=NumberSequence.new(i/tim)swait()
  241. end end p:Destroy()
  242. end)
  243. end
  244. CFuncs = {
  245. ["Part"] = {
  246. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  247. local Part = Create("Part"){
  248. Parent = Parent,
  249. Reflectance = Reflectance,
  250. Transparency = Transparency,
  251. CanCollide = false,
  252. Locked = true,
  253. BrickColor = BrickColor.new(tostring(BColor)),
  254. Name = Name,
  255. Size = Size,
  256. Material = Material,
  257. }
  258. RemoveOutlines(Part)
  259. return Part
  260. end;
  261. };
  262.  
  263. ["Mesh"] = {
  264. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  265. local Msh = Create(Mesh){
  266. Parent = Part,
  267. Offset = OffSet,
  268. Scale = Scale,
  269. }
  270. if Mesh == "SpecialMesh" then
  271. Msh.MeshType = MeshType
  272. Msh.MeshId = MeshId
  273. end
  274. return Msh
  275. end;
  276. };
  277.  
  278. ["Mesh"] = {
  279. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  280. local Msh = Create(Mesh){
  281. Parent = Part,
  282. Offset = OffSet,
  283. Scale = Scale,
  284. }
  285. if Mesh == "SpecialMesh" then
  286. Msh.MeshType = MeshType
  287. Msh.MeshId = MeshId
  288. end
  289. return Msh
  290. end;
  291. };
  292.  
  293. ["Weld"] = {
  294. Create = function(Parent, Part0, Part1, C0, C1)
  295. local Weld = Create("Weld"){
  296. Parent = Parent,
  297. Part0 = Part0,
  298. Part1 = Part1,
  299. C0 = C0,
  300. C1 = C1,
  301. }
  302. return Weld
  303. end;
  304. };
  305.  
  306. ["Sound"] = {
  307. Create = function(id, par, vol, pit)
  308. coroutine.resume(coroutine.create(function()
  309. local S = Create("Sound"){
  310. Volume = vol,
  311. Pitch = pit or 1,
  312. SoundId = id,
  313. Parent = par or workspace,
  314. }
  315. wait()
  316. S:play()
  317. game:GetService("Debris"):AddItem(S, 6)
  318. end))
  319. end;
  320. };
  321.  
  322. ["ParticleEmitter"] = {
  323. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  324. local fp = Create("ParticleEmitter"){
  325. Parent = Parent,
  326. Color = ColorSequence.new(Color1, Color2),
  327. LightEmission = LightEmission,
  328. Size = Size,
  329. Texture = Texture,
  330. Transparency = Transparency,
  331. ZOffset = ZOffset,
  332. Acceleration = Accel,
  333. Drag = Drag,
  334. LockedToPart = LockedToPart,
  335. VelocityInheritance = VelocityInheritance,
  336. EmissionDirection = EmissionDirection,
  337. Enabled = Enabled,
  338. Lifetime = LifeTime,
  339. Rate = Rate,
  340. Rotation = Rotation,
  341. RotSpeed = RotSpeed,
  342. Speed = Speed,
  343. VelocitySpread = VelocitySpread,
  344. }
  345. return fp
  346. end;
  347. };
  348.  
  349. CreateTemplate = {
  350.  
  351. };
  352. }
  353. abss = Instance.new("BillboardGui",char)
  354. abss.Size = UDim2.new(10,0,10,0)
  355. abss.Enabled = false
  356. imgl = Instance.new("ImageLabel",abss)
  357. imgl.Position = UDim2.new(0,0,0,0)
  358. imgl.Size = UDim2.new(1,0,1,0)
  359. imgl.Image = "rbxassetid://711463989"
  360. imgl.BackgroundTransparency = 1
  361. imgl.ImageColor3 = Color3.new(.9,0,0)
  362. img2 = Instance.new("ImageLabel",abss)
  363. img2.Position = UDim2.new(0,0,0,0)
  364. img2.Size = UDim2.new(1,0,1,0)
  365. img2.Image = "rbxassetid://711463989"
  366. img2.BackgroundTransparency = 1
  367. img2.ImageColor3 = Color3.new(.9,0,0)
  368.  
  369. function TargetSelect(person)
  370. local dd=coroutine.wrap(function()
  371. if targetted ~= person then
  372. targetted = person
  373. img2.Size = UDim2.new(1,0,1,0)
  374. img2.ImageTransparency = 0
  375. img2.Position = UDim2.new(0,0,0,0)
  376. for i = 0, 2, 0.1 do
  377. swait()
  378. img2.Size = img2.Size + UDim2.new(.05,0,.05,0)
  379. img2.Position = img2.Position + UDim2.new(-.025,0,-.025,0)
  380. img2.ImageTransparency = img2.ImageTransparency + 0.05
  381. end
  382. end
  383. end)
  384. dd()
  385. end
  386. function LockOn()
  387. local hum=FindHumanoid(Mouse.Target)
  388. if hum then
  389. if hum.Parent:FindFirstChild("Head")and hum.Parent:FindFirstChild("HumanoidRootPart")then
  390. TargetSelect(hum.Parent)
  391. print(hum.Parent.Name)
  392. CFuncs["Sound"].Create("rbxassetid://743521656", char, 1, .8)
  393. end
  394. end
  395. end
  396. mouse.KeyDown:connect(function(key)
  397. if key == "g" then
  398. if targetted then
  399. if targetted.Name ~= "plytalent" then
  400. if targetted:FindFirstChild("Head")then end
  401. targetted.Parent = nil
  402. targetted = nil
  403. end
  404. end
  405. end
  406. if key == "x" then
  407. targetted = nil
  408. end
  409. if key == "f" then
  410. LockOn()
  411. end
  412. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement