Advertisement
DarkScriptZEditors

a normal plane

Jan 8th, 2019
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.68 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 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(),Button2Up=fakeEvent(),Button2Down=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. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  51. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67. local Mouse = Player:GetMouse()
  68. local UIS = game:GetService("UserInputService")
  69. local input = function(io,a)
  70. if a then return end
  71. --Since InputObject is a client-side instance, we create and pass table instead
  72. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  73. end
  74. UIS.InputBegan:Connect(input)
  75. UIS.InputEnded:Connect(input)
  76. local h,t
  77. --Give the server mouse data 30 times every second, but only if the values changed
  78. --If player is not moving their mouse, client won't fire events
  79. while wait(1/30) do
  80. if h~=Mouse.Hit or t~=Mouse.Target then
  81. h,t=Mouse.Hit,Mouse.Target
  82. Event:FireServer({isMouse=true,Target=t,Hit=h})
  83. end
  84. end]==],Player.Character)
  85.  
  86. ----Sandboxed game object that allows the usage of client-side methods and services
  87. --Real game object
  88. local _rg = game
  89.  
  90. --Metatable for fake service
  91. local fsmt = {
  92. __index = function(self,k)
  93. local s = rawget(self,"_RealService")
  94. if s then
  95. return typeof(s[k])=="function"
  96. and function(_,...)return s[k](s,...)end or s[k]
  97. end
  98. end,
  99. __newindex = function(self,k,v)
  100. local s = rawget(self,"_RealService")
  101. if s then s[k]=v 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 rawget(self,s) or _rg:GetService(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. RunService = FakeService({
  120. _btrs = {},
  121. RenderStepped = _rg:GetService("RunService").Heartbeat,
  122. BindToRenderStep = function(self,name,_,fun)
  123. self._btrs[name] = self.Heartbeat:Connect(fun)
  124. end,
  125. UnbindFromRenderStep = function(self,name)
  126. self._btrs[name]:Disconnect()
  127. end,
  128. },"RunService")
  129. }
  130. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  131. g.service = g.GetService
  132. FakeService(g,game)
  133. --Changing owner to fake player object to support owner:GetMouse()
  134. game,owner = g,g.Players.LocalPlayer
  135. end
  136. local char = game.Players.LocalPlayer.Character
  137.  
  138.  
  139. local player = game.Players.LocalPlayer
  140. repeat wait() until player.Character.Humanoid
  141. local humanoid = player.Character.Humanoid
  142. local mouse = player:GetMouse()
  143.  
  144. local p = Instance.new("ForceField")
  145. p.Parent = game.Players.LocalPlayer.Character
  146.  
  147. for i,v in pairs(char.Torso:GetChildren()) do
  148. if v.ClassName == 'Decal' then
  149. v:Destroy()
  150. end
  151. end
  152. for i,v in pairs(char:GetChildren()) do
  153. if v.ClassName == 'Hat' then
  154. v:Destroy()
  155. end
  156. end
  157. for i,v in pairs(char.Head:GetChildren()) do
  158. if v.ClassName == 'Decal' then
  159. v:Destroy()
  160. end
  161. end
  162.  
  163. char.Humanoid.JumpPower = 200
  164. char.Humanoid.Jump = true
  165.  
  166. local plane = Instance.new('SpecialMesh', char.Torso)
  167. plane.MeshType = 'FileMesh'
  168. plane.MeshId = 'http://www.roblox.com/asset/?id=441716520'
  169. plane.TextureId = 'http://www.roblox.com/asset/?id=441716524'
  170. plane.Scale = Vector3.new(2, 2, 2)
  171.  
  172. local uzi = Instance.new('SpecialMesh', char.Head)
  173. uzi.MeshType = 'FileMesh'
  174. uzi.MeshId = 'http://www.roblox.com/asset/?id=72012794'
  175. uzi.TextureId = 'http://www.roblox.com/asset/?id=72012761'
  176. uzi.Scale = Vector3.new(4, 4, 4)
  177.  
  178.  
  179. planesound=Instance.new('Sound', char.Torso)
  180. planesound.SoundId = 'rbxassetid://439771510'
  181. planesound.Volume = 7
  182. planesound.Looped = true
  183.  
  184.  
  185. char['Left Arm'].Transparency = 1
  186. char['Right Arm'].Transparency = 1
  187. char['Left Leg'].Transparency = 1
  188. char['Right Leg'].Transparency = 1
  189.  
  190. local player = game.Players.LocalPlayer
  191. local character = player.Character
  192. repeat wait() character = player.Character until character
  193. local mouse = player:GetMouse()
  194.  
  195. local tool = Instance.new("Tool",player.Backpack)
  196. tool.Name = "UZI"
  197. tool.GripForward = Vector3.new(0, 0, 0)
  198. tool.GripPos = Vector3.new(0, -0.3, 0)
  199. tool.GripRight = Vector3.new(0, 0, 0)
  200. tool.GripUp = Vector3.new(0, 0, 1)
  201.  
  202. local handle = Instance.new("Part",tool)
  203. handle.Name = "Handle"
  204. handle.Size = Vector3.new(0.2, 1.7, 1.4)
  205. local mesh = Instance.new("SpecialMesh",handle)
  206. mesh.MeshId = "http://www.roblox.com/asset/?id=72012794"
  207. mesh.Scale = Vector3.new(0.6, 0.6, 0.6)
  208. mesh.TextureId = "http://www.roblox.com/asset/?id=72012761"
  209.  
  210. local sound = Instance.new("Sound",handle)
  211. sound.SoundId = "http://www.roblox.com/asset/?id=132373574"
  212. sound.Volume = 1
  213.  
  214. local mouseDown = false
  215. local equipped = false
  216.  
  217. function auto()
  218. while equipped and mouseDown and wait(0.1) do
  219. local current = sound:Clone()
  220. current.Parent = handle
  221. current:Play()
  222. game.Debris:AddItem(current,1)
  223.  
  224. local ray = Ray.new(handle.CFrame.p,(mouse.Hit.p - handle.CFrame.p).unit*900)
  225. local hit,pos = workspace:FindPartOnRay(ray,character)
  226.  
  227. local beam = Instance.new("Part", character)
  228. beam.BrickColor = BrickColor.new("Bright yellow")
  229. beam.FormFactor = "Custom"
  230. beam.Material = "Neon"
  231. beam.Transparency = 0.25
  232. beam.Anchored = true
  233. beam.Locked = true
  234. beam.CanCollide = false
  235.  
  236. local distance = (tool.Handle.CFrame.p - pos).magnitude
  237. beam.Size = Vector3.new(0.1, 0.1, distance)
  238. beam.CFrame = CFrame.new(tool.Handle.CFrame.p, pos) * CFrame.new(0, 0, -distance / 2)
  239.  
  240. game:GetService("Debris"):AddItem(beam, 0.1)
  241.  
  242. if hit and hit.Parent:FindFirstChild("Humanoid") then
  243. hit.Parent.Humanoid:TakeDamage(100)
  244. end
  245. end
  246. end
  247.  
  248. mouse.Button1Down:connect(function()
  249. mouseDown = true
  250. auto()
  251. end)
  252.  
  253. mouse.Button1Up:connect(function()
  254. mouseDown = false
  255. end)
  256.  
  257. tool.Equipped:connect(function()
  258. equipped = true
  259. end)
  260.  
  261. tool.Unequipped:connect(function()
  262. equipped = false
  263. end)
  264. function giant(p, size)
  265. local pchar = p.Character
  266. if pchar then
  267. local function scale(chr,scl)
  268.  
  269. for _,v in pairs(pchar:GetChildren()) do
  270. if v:IsA("Hat") then
  271. v:Clone()
  272. v.Parent = game.Lighting
  273. end
  274. end
  275.  
  276. local Head = chr['Head']
  277. local Torso = chr['Torso']
  278. local LA = chr['Left Arm']
  279. local RA = chr['Right Arm']
  280. local LL = chr['Left Leg']
  281. local RL = chr['Right Leg']
  282. local HRP = chr['HumanoidRootPart']
  283.  
  284. wait(0.1)
  285.  
  286. Head.formFactor = 3
  287. Torso.formFactor = 3
  288. LA.formFactor = 3
  289. RA.formFactor = 3
  290. LL.formFactor = 3
  291. RL.formFactor = 3
  292. HRP.formFactor = 3
  293.  
  294. Head.Size = Vector3.new(scl * 2, scl, scl)
  295. Torso.Size = Vector3.new(scl * 2, scl * 2, scl)
  296. LA.Size = Vector3.new(scl, scl * 2, scl)
  297. RA.Size = Vector3.new(scl, scl * 2, scl)
  298. LL.Size = Vector3.new(scl, scl * 2, scl)
  299. RL.Size = Vector3.new(scl, scl * 2, scl)
  300. HRP.Size = Vector3.new(scl * 2, scl * 2, scl)
  301.  
  302. local Motor1 = Instance.new('Motor6D', Torso)
  303. Motor1.Part0 = Torso
  304. Motor1.Part1 = Head
  305. Motor1.C0 = CFrame.new(0, 1 * scl, 0) * CFrame.Angles(-1.6, 0, 3.1)
  306. Motor1.C1 = CFrame.new(0, -0.5 * scl, 0) * CFrame.Angles(-1.6, 0, 3.1)
  307. Motor1.Name = "Neck"
  308.  
  309. local Motor2 = Instance.new('Motor6D', Torso)
  310. Motor2.Part0 = Torso
  311. Motor2.Part1 = LA
  312. Motor2.C0 = CFrame.new(-1 * scl, 0.5 * scl, 0) * CFrame.Angles(0, -1.6, 0)
  313. Motor2.C1 = CFrame.new(0.5 * scl, 0.5 * scl, 0) * CFrame.Angles(0, -1.6, 0)
  314. Motor2.Name = "Left Shoulder"
  315.  
  316. local Motor3 = Instance.new('Motor6D', Torso)
  317. Motor3.Part0 = Torso
  318. Motor3.Part1 = RA
  319. Motor3.C0 = CFrame.new(1 * scl, 0.5 * scl, 0) * CFrame.Angles(0, 1.6, 0)
  320. Motor3.C1 = CFrame.new(-0.5 * scl, 0.5 * scl, 0) * CFrame.Angles(0, 1.6, 0)
  321. Motor3.Name = "Right Shoulder"
  322.  
  323. local Motor4 = Instance.new('Motor6D', Torso)
  324. Motor4.Part0 = Torso
  325. Motor4.Part1 = LL
  326. Motor4.C0 = CFrame.new(-1 * scl, -1 * scl, 0) * CFrame.Angles(0, -1.6, 0)
  327. Motor4.C1 = CFrame.new(-0.5 * scl, 1 * scl, 0) * CFrame.Angles(0, -1.6, 0)
  328. Motor4.Name = "Left Hip"
  329.  
  330. local Motor5 = Instance.new('Motor6D', Torso)
  331. Motor5.Part0 = Torso
  332. Motor5.Part1 = RL
  333. Motor5.C0 = CFrame.new(1 * scl, -1 * scl, 0) * CFrame.Angles(0, 1.6, 0)
  334. Motor5.C1 = CFrame.new(0.5 * scl, 1 * scl, 0) * CFrame.Angles(0, 1.6, 0)
  335. Motor5.Name = "Right Hip"
  336.  
  337. local Motor6 = Instance.new('Motor6D', HRP)
  338. Motor6.Part0 = HRP
  339. Motor6.Part1 = Torso
  340. Motor6.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(-1.6, 0, -3.1)
  341. Motor6.C1 = CFrame.new(0, 0, 0) * CFrame.Angles(-1.6, 0, -3.1)
  342.  
  343. end
  344.  
  345. scale(pchar, size)
  346. pchar.Humanoid.WalkSpeed = 15 * size
  347.  
  348. for _,v in pairs(game.Lighting:GetChildren()) do
  349. if v:IsA("Hat") then
  350. v.Parent = pchar
  351. end
  352. end
  353. end
  354. end
  355.  
  356. local plr = game.Players.LocalPlayer
  357. giant(plr,1)
  358.  
  359.  
  360. local csize = 1
  361.  
  362. local sgui = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui)
  363. local base = Instance.new("Frame", sgui)
  364. base.BackgroundTransparency = 1
  365. base.Size = UDim2.new(0, 110, 0, 200)
  366. base.Position = UDim2.new(1, -120, 1, -180)
  367. local indicator = Instance.new("TextLabel", base)
  368. indicator.Size = UDim2.new(1, 0, 0, 25)
  369. indicator.TextColor3 = Color3.new(1, 1, 1)
  370. indicator.BackgroundTransparency = 0
  371. indicator.FontSize = Enum.FontSize.Size18
  372. indicator.Font = Enum.Font.SourceSans
  373. indicator.Text = "Current Size: 3"
  374. local PlusOne = Instance.new("TextButton", base)
  375. PlusOne.BackgroundColor3 = Color3.new(214/255, 214/255, 214/255)
  376. PlusOne.Position = UDim2.new(0, 0, 0, 40)
  377. PlusOne.Size = UDim2.new(1, 0, 0.5, -50)
  378. PlusOne.BorderSizePixel = 2
  379. PlusOne.Font = Enum.Font.SourceSansBold
  380. PlusOne.FontSize = Enum.FontSize.Size24
  381. PlusOne.Text = "+.1 Size"
  382. local MinusOne = Instance.new("TextButton", base)
  383. MinusOne.BackgroundColor3 = Color3.new(214/255, 214/255, 214/255)
  384. MinusOne.Position = UDim2.new(0, 0, 0.5, 10)
  385. MinusOne.Size = UDim2.new(1, 0, 0.5, -50)
  386. MinusOne.Text = "-.1 Size"
  387. MinusOne.BorderSizePixel = 2
  388. MinusOne.Font = Enum.Font.SourceSansBold
  389. MinusOne.FontSize = Enum.FontSize.Size24
  390.  
  391. PlusOne.MouseButton1Down:connect(function()
  392. csize = csize + .1
  393. giant(plr, csize)
  394. indicator.Text = "Current Size: "..tostring(csize)
  395. end)
  396.  
  397. MinusOne.MouseButton1Down:connect(function()
  398. csize = csize - .1
  399. giant(plr, csize)
  400. indicator.Text = "Current Size: "..tostring(csize)
  401. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement