sIendytubble

cleetus

May 14th, 2020
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.92 KB | None | 0 0
  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 V2 by Mokiros")
  6. local RealPlayer = RealPlayer
  7. script.Parent = RealPlayer.Character
  8.  
  9. --Fake event to make stuff like Mouse.KeyDown work
  10. local Disconnect_Function = function(this)
  11. this[1].Functions[this[2]] = nil
  12. end
  13. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  14. local FakeEvent_Metatable = {__index={
  15. Connect = function(this,f)
  16. local i = tostring(math.random(0,10000))
  17. while this.Functions[i] do
  18. i = tostring(math.random(0,10000))
  19. end
  20. this.Functions[i] = f
  21. return setmetatable({this,i},Disconnect_Metatable)
  22. end
  23. }}
  24. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  25. local function fakeEvent()
  26. return setmetatable({Functions={}},FakeEvent_Metatable)
  27. end
  28.  
  29. --Creating fake input objects with fake variables
  30. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  31. FakeMouse.keyUp = FakeMouse.KeyUp
  32. FakeMouse.keyDown = FakeMouse.KeyDown
  33. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  34. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  35. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  36. end}
  37. --Merged 2 functions into one by checking amount of arguments
  38. CAS.UnbindAction = CAS.BindAction
  39.  
  40. --This function will trigger the events that have been :Connect()'ed
  41. local function TriggerEvent(self,ev,...)
  42. for _,f in pairs(self[ev].Functions) do
  43. f(...)
  44. end
  45. end
  46. FakeMouse.TriggerEvent = TriggerEvent
  47. UIS.TriggerEvent = TriggerEvent
  48.  
  49. --Client communication
  50. local Event = Instance.new("RemoteEvent")
  51. Event.Name = "UserInput_Event"
  52. Event.OnServerEvent:Connect(function(plr,io)
  53. if plr~=RealPlayer then return end
  54. FakeMouse.Target = io.Target
  55. FakeMouse.Hit = io.Hit
  56. if not io.isMouse then
  57. local b = io.UserInputState == Enum.UserInputState.Begin
  58. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  59. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  60. end
  61. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  62. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  63. end
  64. for _,t in pairs(CAS.Actions) do
  65. for _,k in pairs(t.Keys) do
  66. if k==io.KeyCode then
  67. t.Function(t.Name,io.UserInputState,io)
  68. end
  69. end
  70. end
  71. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  72. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  73. end
  74. end)
  75. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  76. local Mouse = owner:GetMouse()
  77. local UIS = game:GetService("UserInputService")
  78. local input = function(io,RobloxHandled)
  79. if RobloxHandled then return end
  80. --Since InputObject is a client-side instance, we create and pass table instead
  81. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  82. end
  83. UIS.InputBegan:Connect(input)
  84. UIS.InputEnded:Connect(input)
  85.  
  86. local h,t
  87. --Give the server mouse data every second frame, but only if the values changed
  88. --If player is not moving their mouse, client won't fire events
  89. local HB = game:GetService("RunService").Heartbeat
  90. while true do
  91. if h~=Mouse.Hit or t~=Mouse.Target then
  92. h,t=Mouse.Hit,Mouse.Target
  93. Event:FireServer({isMouse=true,Target=t,Hit=h})
  94. end
  95. --Wait 2 frames
  96. for i=1,2 do
  97. HB:Wait()
  98. end
  99. end]==],script)
  100.  
  101. ----Sandboxed game object that allows the usage of client-side methods and services
  102. --Real game object
  103. local RealGame = game
  104.  
  105. --Metatable for fake service
  106. local FakeService_Metatable = {
  107. __index = function(self,k)
  108. local s = rawget(self,"_RealService")
  109. if s then
  110. return typeof(s[k])=="function"
  111. and function(_,...)return s[k](s,...)end or s[k]
  112. end
  113. end,
  114. __newindex = function(self,k,v)
  115. local s = rawget(self,"_RealService")
  116. if s then s[k]=v end
  117. end
  118. }
  119. local function FakeService(t,RealService)
  120. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  121. return setmetatable(t,FakeService_Metatable)
  122. end
  123.  
  124. --Fake game object
  125. local FakeGame = {
  126. GetService = function(self,s)
  127. return rawget(self,s) or RealGame:GetService(s)
  128. end,
  129. Players = FakeService({
  130. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  131. },"Players"),
  132. UserInputService = FakeService(UIS,"UserInputService"),
  133. ContextActionService = FakeService(CAS,"ContextActionService"),
  134. RunService = FakeService({
  135. _btrs = {},
  136. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  137. BindToRenderStep = function(self,name,_,fun)
  138. self._btrs[name] = self.Heartbeat:Connect(fun)
  139. end,
  140. UnbindFromRenderStep = function(self,name)
  141. self._btrs[name]:Disconnect()
  142. end,
  143. },"RunService")
  144. }
  145. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  146. FakeGame.service = FakeGame.GetService
  147. FakeService(FakeGame,game)
  148. --Changing owner to fake player object to support owner:GetMouse()
  149. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  150. end
  151. corl = owner
  152. mouse = corl:GetMouse()
  153. char = corl.Character
  154. mas = char
  155. mas2 = char.Head
  156. Figure = char
  157. local head = char:WaitForChild("Head")
  158. local Torso = char:WaitForChild("Torso")
  159. local LArm = char:WaitForChild("Left Arm")
  160. local RArm = char:WaitForChild("Right Arm")
  161. local LLeg = char:WaitForChild("Left Leg")
  162. local RLeg = char:WaitForChild("Right Leg")
  163. local humanoid = char:WaitForChild("Humanoid")
  164. local rootpart = char:WaitForChild("HumanoidRootPart")
  165. for i,v in pairs(char:GetChildren()) do
  166. if v.ClassName == "Accessory" then
  167. v:remove()
  168. v.Parent = nil
  169. v:Destroy()
  170. end
  171. end
  172. BODYCOLORS = char:WaitForChild("Body Colors")
  173. BODYCOLORS.HeadColor = BrickColor.new("Light orange")
  174. BODYCOLORS.TorsoColor = BrickColor.new("Light orange")
  175. BODYCOLORS.LeftArmColor = BrickColor.new("Light orange")
  176. BODYCOLORS.LeftLegColor = BrickColor.new("Light orange")
  177. BODYCOLORS.RightArmColor = BrickColor.new("Light orange")
  178. BODYCOLORS.RightLegColor = BrickColor.new("Light orange")
  179. for i,v in pairs(char.Head:GetChildren()) do
  180. if v.ClassName == "Decal" then
  181. v:remove()
  182. v.Parent = nil
  183. v:Destroy()
  184. end
  185. end
  186. for i,v in pairs(char:GetChildren()) do
  187. if v.ClassName == "CharacterMesh" then
  188. v:remove()
  189. v.Parent = nil
  190. v:Destroy()
  191. end
  192. end
  193. for i,v in pairs(char:GetChildren()) do
  194. if v.ClassName == "Shirt" then
  195. v:remove()
  196. v.Parent = nil
  197. v:Destroy()
  198. end
  199. end
  200. for i,v in pairs(char:GetChildren()) do
  201. if v.ClassName == "Pants" then
  202. v:remove()
  203. v.Parent = nil
  204. v:Destroy()
  205. end
  206. end
  207. for i,v in pairs(char.Head:GetChildren()) do
  208. v.Parent = nil
  209. end
  210. mas = char
  211. BodyColors0 = Instance.new("BodyColors")
  212. Pants1 = Instance.new("Pants")
  213. Accessory2 = Instance.new("Accessory")
  214. Part3 = Instance.new("Part")
  215. SpecialMesh4 = Instance.new("SpecialMesh")
  216. Vector3Value5 = Instance.new("Vector3Value")
  217. CharacterMesh6 = Instance.new("CharacterMesh")
  218. CharacterMesh7 = Instance.new("CharacterMesh")
  219. CharacterMesh8 = Instance.new("CharacterMesh")
  220. CharacterMesh9 = Instance.new("CharacterMesh")
  221. CharacterMesh10 = Instance.new("CharacterMesh")
  222. BodyColors0.Parent = mas
  223. BodyColors0.HeadColor = BrickColor.new("Light orange")
  224. BodyColors0.HeadColor3 = Color3.new(0.917647, 0.721569, 0.572549)
  225. BodyColors0.LeftArmColor = BrickColor.new("Light orange")
  226. BodyColors0.LeftArmColor3 = Color3.new(0.917647, 0.721569, 0.572549)
  227. BodyColors0.LeftLegColor = BrickColor.new("Light orange")
  228. BodyColors0.LeftLegColor3 = Color3.new(0.917647, 0.721569, 0.572549)
  229. BodyColors0.RightArmColor = BrickColor.new("Light orange")
  230. BodyColors0.RightArmColor3 = Color3.new(0.917647, 0.721569, 0.572549)
  231. BodyColors0.RightLegColor = BrickColor.new("Light orange")
  232. BodyColors0.RightLegColor3 = Color3.new(0.917647, 0.721569, 0.572549)
  233. BodyColors0.TorsoColor = BrickColor.new("Light orange")
  234. BodyColors0.TorsoColor3 = Color3.new(0.917647, 0.721569, 0.572549)
  235. Pants1.Name = "Pants"
  236. Pants1.Parent = mas
  237. Pants1.PantsTemplate = "http://www.roblox.com/asset/?id=3767402973"
  238. Accessory2.Name = "Mellow Cowboy"
  239. Accessory2.Parent = mas
  240. Accessory2.AttachmentForward = Vector3.new(-0, -0.196096897, -0.980584502)
  241. Accessory2.AttachmentPoint = CFrame.new(0, -0.170000002, 0.0500000007, 1, 0, 0, -0, 0.980584562, 0.196096897, 0, -0.196096912, 0.980584502)
  242. Accessory2.AttachmentPos = Vector3.new(0, -0.170000002, 0.0500000007)
  243. Accessory2.AttachmentUp = Vector3.new(0, 0.980584562, -0.196096912)
  244. Part3.Name = "Handle"
  245. Part3.Parent = Accessory2
  246. Part3.CFrame = CFrame.new(0, 6.19630814, -0.0154210003, 1, -7.71854047e-09, 1.5435262e-09, 7.87136223e-09, 0.980584562, -0.196096912, 2.39808173e-14, 0.196096912, 0.980584562)
  247. Part3.Orientation = Vector3.new(11.3100004, 0, 0)
  248. Part3.Position = Vector3.new(0, 6.19630814, -0.0154210003)
  249. Part3.Rotation = Vector3.new(11.3100004, 0, 0)
  250. Part3.Size = Vector3.new(1, 1, 2)
  251. Part3.BottomSurface = Enum.SurfaceType.Smooth
  252. Part3.CanCollide = false
  253. Part3.Locked = true
  254. Part3.TopSurface = Enum.SurfaceType.Smooth
  255. Part3.FormFactor = Enum.FormFactor.Symmetric
  256. Part3.formFactor = Enum.FormFactor.Symmetric
  257. SpecialMesh4.Parent = Part3
  258. SpecialMesh4.MeshId = "http://www.roblox.com/asset/?id=45915012"
  259. SpecialMesh4.Scale = Vector3.new(1, 1, 1.01999998)
  260. SpecialMesh4.TextureId = "http://www.roblox.com/asset/?id=45915003"
  261. SpecialMesh4.MeshType = Enum.MeshType.FileMesh
  262. Vector3Value5.Name = "OriginalSize"
  263. Vector3Value5.Parent = Part3
  264. Vector3Value5.Value = Vector3.new(1, 1, 2)
  265. CharacterMesh6.Name = "Penguin Torso"
  266. CharacterMesh6.Parent = mas
  267. CharacterMesh6.BaseTextureId = 46345362
  268. CharacterMesh6.BodyPart = Enum.BodyPart.Torso
  269. CharacterMesh6.MeshId = 46345096
  270. CharacterMesh6.OverlayTextureId = 46345222
  271. CharacterMesh7.Name = "ROBLOX Boy Left Arm"
  272. CharacterMesh7.Parent = mas
  273. CharacterMesh7.BodyPart = Enum.BodyPart.LeftArm
  274. CharacterMesh7.MeshId = 279174949
  275. CharacterMesh8.Name = "ROBLOX Boy Left Leg"
  276. CharacterMesh8.Parent = mas
  277. CharacterMesh8.BodyPart = Enum.BodyPart.LeftLeg
  278. CharacterMesh8.MeshId = 319336109
  279. CharacterMesh9.Name = "ROBLOX Boy Right Arm"
  280. CharacterMesh9.Parent = mas
  281. CharacterMesh9.BodyPart = Enum.BodyPart.RightArm
  282. CharacterMesh9.MeshId = 279174886
  283. CharacterMesh10.Name = "ROBLOX Boy Right Leg"
  284. CharacterMesh10.Parent = mas
  285. CharacterMesh10.BodyPart = Enum.BodyPart.RightLeg
  286. CharacterMesh10.MeshId = 319336155
  287. SpecialMesh0 = Instance.new("SpecialMesh")
  288. Decal1 = Instance.new("Decal")
  289. SpecialMesh0.Parent = head
  290. SpecialMesh0.Scale = Vector3.new(1.25, 1.25, 1.25)
  291. Decal1.Name = "face"
  292. Decal1.Parent = head
  293. Decal1.Texture = "http://www.roblox.com/asset/?id=27134272"
  294. cleetus = Instance.new("Sound",head)
  295. cleetus.SoundId = "rbxassetid://2254648568"
  296. cleetus.Volume = 2
  297. cleetus:Play()
  298. player = owner
  299. shooting = false
  300. Part0 = Instance.new("Part")
  301. SpecialMesh1 = Instance.new("SpecialMesh")
  302. Part0.Name = "Assault Rifle"
  303. Part0.Parent = mas
  304. enabled = false
  305. function shootsound()
  306. coroutine.resume(coroutine.create(function()
  307. shoot = Instance.new("Sound",Part0)
  308. shoot.Volume = 10
  309. shoot.PlaybackSpeed = 1
  310. shoot.SoundId = "rbxassetid://3289652262"
  311. shoot:Play()
  312. wait(2)
  313. shoot:Destroy()
  314. end))
  315. end
  316. function equip()
  317. coroutine.resume(coroutine.create(function()
  318. equipsound = Instance.new("Sound",Part0)
  319. equipsound.Volume = 10
  320. equipsound.PlaybackSpeed = 1
  321. equipsound.SoundId = "rbxassetid://3666863095"
  322. equipsound:Play()
  323. wait(2)
  324. equipsound:Destroy()
  325. end))
  326. end
  327. Part0.CFrame = CFrame.new(-7.32639599, 14.2976122, 14.3406916, -0.106925137, 0.994266748, 0.000791709346, 1.85333519e-12, -0.000796274282, 0.999999642, 0.994266987, 0.106925115, 8.51417499e-05)
  328. Part0.Orientation = Vector3.new(-89.9499969, 83.8600006, 180)
  329. Part0.Position = Vector3.new(-7.32639599, 14.2976122, 14.3406916)
  330. Part0.Rotation = Vector3.new(-90, 0.0500000007, -96.1399994)
  331. Part0.Color = Color3.new(0.105882, 0.164706, 0.207843)
  332. Part0.Size = Vector3.new(0.400000006, 3.4000001, 0.800000012)
  333. Part0.BrickColor = BrickColor.new("Black")
  334. Part0.brickColor = BrickColor.new("Black")
  335. Part0.FormFactor = Enum.FormFactor.Custom
  336. Part0.CanCollide = false
  337. Part0.formFactor = Enum.FormFactor.Custom
  338. Part0.CanCollide = false
  339. SpecialMesh1.Parent = Part0
  340. SpecialMesh1.MeshId = "http://www.roblox.com/asset/?id=72012671"
  341. SpecialMesh1.VertexColor = Vector3.new(2, 2, 2)
  342. SpecialMesh1.TextureId = "http://www.roblox.com/asset/?id=72012605"
  343. SpecialMesh1.MeshType = Enum.MeshType.FileMesh
  344. weld = Instance.new("Weld",Part0)
  345. weld.Part0 = nil
  346. weld.Part1 = Part0
  347. weld.C0 = CFrame.new(0,-1.5,-0.5) * CFrame.Angles(math.rad(180),math.rad(0),math.rad(-30))
  348. rs = Instance.new("Weld",char.Torso)
  349. rs.Part0 = nil
  350. rs.Part1 = nil
  351. rs.C0 = CFrame.new(0.5,0.5,-0.5) * CFrame.Angles(math.rad(0),math.rad(120),math.rad(90))
  352. rs.C1 = char.Torso["Right Shoulder"].C1
  353. ls = Instance.new("Weld",char.Torso)
  354. ls.Part0 = nil
  355. ls.Part1 = nil
  356. ls.C0 = CFrame.new(-0.6,0.5,-1) * CFrame.Angles(math.rad(180),math.rad(-57),math.rad(90))
  357. ls.C1 = char.Torso["Left Shoulder"].C1
  358. holster = Instance.new("Weld",char.Torso)
  359. holster.C0 = CFrame.new(1,-1,0) * CFrame.Angles(math.rad(65),0,0)
  360. holster.Part0 = char.Torso
  361. holster.Part1 = Part0
  362. Weld1 = Instance.new("Weld")
  363. BillboardGui2 = Instance.new("BillboardGui")
  364. ImageLabel3 = Instance.new("ImageLabel")
  365. Part02 = Instance.new("Part")
  366. Part02.Parent = Part0
  367. Part02.CFrame = CFrame.new(-7.52682972, 18.6985626, 9.31794739, 1, -5.96046448e-08, 6.5567086e-08, -6.55670789e-08, 1.1356552e-07, 1, -5.96046448e-08, -1, 1.1356552e-07)
  368. Part02.Orientation = Vector3.new(-90, 0, 0)
  369. Part02.Position = Vector3.new(-7.52682972, 18.6985626, 9.31794739)
  370. Part02.Rotation = Vector3.new(-90, 0, 0)
  371. Part02.Transparency = 1
  372. Part02.Size = Vector3.new(1, 1, 1)
  373. Part02.BottomSurface = Enum.SurfaceType.Smooth
  374. Part02.TopSurface = Enum.SurfaceType.Smooth
  375. Part02.CanCollide = false
  376. Weld1.Parent = Part02
  377. Weld1.C0 = CFrame.new(0, 2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  378. Weld1.Part0 = Part0
  379. Weld1.Part1 = Part02
  380. Weld1.part1 = Part02
  381. BillboardGui2.Parent = Part02
  382. BillboardGui2.LightInfluence = 1
  383. BillboardGui2.Size = UDim2.new(2, 0, 2, 0)
  384. BillboardGui2.Active = true
  385. BillboardGui2.ClipsDescendants = true
  386. BillboardGui2.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  387. ImageLabel3.Parent = BillboardGui2
  388. ImageLabel3.Size = UDim2.new(1, 0, 1, 0)
  389. ImageLabel3.BackgroundColor = BrickColor.new("Institutional white")
  390. ImageLabel3.BackgroundColor3 = Color3.new(1, 1, 1)
  391. ImageLabel3.BackgroundTransparency = 1
  392. ImageLabel3.ImageTransparency = 1
  393. ImageLabel3.Image = "http://www.roblox.com/asset/?id=156580315"
  394. head = char.Head
  395. gun = false
  396. game:GetService("RunService").RenderStepped:Connect(function()
  397. if shooting == true and gun == true then
  398. shootsound()
  399. ImageLabel3.ImageTransparency = 0
  400. ImageLabel3.Rotation = ImageLabel3.Rotation + 90
  401. if mouse.Target.Anchored == false then
  402. mouse.Target:BreakJoints()
  403. p = mouse.Target
  404. p.Velocity = Vector3.new(p.Velocity.X + (head.CFrame.lookVector.X * 18), p.Velocity.Y + (head.CFrame.lookVector.Y * 18) + 8, p.Velocity.Z + (head.CFrame.lookVector.Z * 18))
  405. end
  406. if mouse.Target.Parent:FindFirstChildOfClass("Humanoid") then
  407. mouse.Target.Parent:FindFirstChildOfClass("Humanoid").Health = mouse.Target.Parent:FindFirstChildOfClass("Humanoid").Health - 43.5
  408. end
  409. wait(0.6)
  410. else
  411. ImageLabel3.ImageTransparency = 1
  412. end
  413. end)
  414. mouse.Button1Down:Connect(function()
  415. shooting = true
  416. end)
  417. mouse.Button1Up:Connect(function()
  418. shooting = false
  419. end)
  420. mouse.KeyDown:Connect(function(key)
  421. if key == "g" then
  422. if gun == false then
  423. gun = true
  424. weld.Part0 = char["Right Arm"]
  425. weld.Part1 = Part0
  426. holster.Part0 = nil
  427. holster.Part1 = nil
  428. equip()
  429. ls.Part0 = char.Torso["Left Shoulder"].Part0
  430. ls.Part1 = char.Torso["Left Shoulder"].Part1
  431. rs.Part0 = char.Torso["Right Shoulder"].Part0
  432. rs.Part1 = char.Torso["Right Shoulder"].Part1
  433. else
  434. gun = false
  435. weld.Part0 = nil
  436. weld.Part1 = Part0
  437. holster.Part0 = char.Torso
  438. holster.Part1 = Part0
  439. ls.Part0 = nil
  440. ls.Part1 = nil
  441. rs.Part0 = nil
  442. rs.Part1 = nil
  443. end
  444. end
  445. end)
Add Comment
Please, Sign In to add comment