Advertisement
McRoblox132

My Own Gui

Sep 29th, 2017
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.42 KB | None | 0 0
  1. -- Objects
  2.  
  3. local Scriptgui = Instance.new("ScreenGui")
  4. local Frame = Instance.new("Frame")
  5. local TextLabel = Instance.new("TextLabel")
  6. local Ghost = Instance.new("TextButton")
  7. local UAREANIDIOT = Instance.new("TextButton")
  8.  
  9. -- Properties
  10.  
  11. Scriptgui.Name = "Script gui"
  12. Scriptgui.Parent = game.Players.LocalPlayer.PlayerGui
  13.  
  14. Frame.Parent = Scriptgui
  15. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  16. Frame.BackgroundTransparency = 0.5
  17. Frame.Position = UDim2.new(0, 116, 0, 295)
  18. Frame.Size = UDim2.new(0, 511, 0, 139)
  19.  
  20. TextLabel.Parent = Frame
  21. TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  22. TextLabel.BackgroundTransparency = 1
  23. TextLabel.Size = UDim2.new(0, 511, 0, 47)
  24. TextLabel.Font = Enum.Font.SourceSans
  25. TextLabel.FontSize = Enum.FontSize.Size14
  26. TextLabel.Text = "Script Gui Made By SHYIME"
  27. TextLabel.TextColor3 = Color3.new(0, 1, 0.933333)
  28. TextLabel.TextScaled = true
  29. TextLabel.TextSize = 14
  30. TextLabel.TextWrapped = true
  31.  
  32. Ghost.Name = "Ghost"
  33. Ghost.Parent = Frame
  34. Ghost.BackgroundColor3 = Color3.new(1, 1, 1)
  35. Ghost.BackgroundTransparency = 0.5
  36. Ghost.Position = UDim2.new(0, 26, 0, 70)
  37. Ghost.Size = UDim2.new(0, 200, 0, 50)
  38. Ghost.Font = Enum.Font.SourceSans
  39. Ghost.FontSize = Enum.FontSize.Size14
  40. Ghost.Text = "Ghost"
  41. Ghost.TextColor3 = Color3.new(0, 1, 0.933333)
  42. Ghost.TextScaled = true
  43. Ghost.TextSize = 14
  44. Ghost.TextWrapped = true
  45.  
  46. Ghost.MouseButton1Down:connect:(function()
  47. plr = game.Players.LocalPlayer
  48. mouse = plr:GetMouse()
  49. part = nil
  50. bp = nil
  51. particles = nil
  52. function clerp(a,b,c,d)
  53. for i = 0,d,.01 do
  54. a.CFrame = CFrame.new(b:lerp(c,i))
  55. wait()
  56. end
  57. end
  58. function slerp(a2,b2,c2,d2)
  59. for i2 = 0,d2,.01 do
  60. a2.CFrame = CFrame.new(b2:lerp(c2,i2))
  61. wait()
  62. end
  63. end
  64. mouse.KeyDown:connect(function(key)
  65. if key == "e" and plr.Character.Parent == workspace then
  66. plr.Character.Parent = workspace.Camera
  67. plr.Character.Archivable = true
  68. Instance.new("ForceField",plr.Character).Visible = false
  69. for y,t in pairs(plr.Character:GetChildren()) do
  70. if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then
  71. t.Transparency = 1
  72. if t.Name == "Head" and t:FindFirstChild("face") then
  73. t.face.Transparency = 1
  74. end
  75. elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then
  76. t.Handle.Transparency = 1
  77. end
  78. end
  79. elseif key == "z" and plr.Character.Parent == workspace.Camera and part == nil then
  80. plr.Character.Torso.CFrame = CFrame.new(Vector3.new(mouse.hit.p.X,mouse.hit.p.Y+1.5,mouse.hit.p.Z),plr.Character.Torso.CFrame.p)
  81. elseif key == "x" and plr.Character.Parent == workspace.Camera and part == nil then
  82. if plr.Character.Torso.Anchored == true then
  83. for y,t in pairs(plr.Character:GetChildren()) do
  84. if t:IsA("Part") then
  85. t.Anchored = false
  86. end
  87. end
  88. else
  89. for y,t in pairs(plr.Character:GetChildren()) do
  90. if t:IsA("Part") then
  91. t.Anchored = true
  92. end
  93. end
  94. end
  95. elseif key == "c" and plr.Character.Parent == workspace.Camera and part ~= nil then
  96. local clone = part:Clone()
  97. clone.Parent = workspace
  98. clone.Anchored = false
  99. clone:ClearAllChildren()
  100. clone.CanCollide = true
  101. bp.Parent = clone
  102. particles.Parent = clone
  103. if part.Parent:FindFirstChildOfClass("Humanoid") then
  104. part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false
  105. end
  106. part:Destroy()
  107. part = clone
  108. elseif key == "t" and plr.Character.Parent == workspace.Camera and part == nil then
  109. plr.Character.Parent = workspace
  110. plr.Character.Archivable = false
  111. plr.Character:FindFirstChildOfClass("ForceField"):Remove()
  112. for y,t in pairs(plr.Character:GetChildren()) do
  113. if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then
  114. t.Transparency = 0
  115. if t.Name == "Head" and t:FindFirstChild("face") then
  116. t.face.Transparency = 0
  117. end
  118. elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then
  119. t.Handle.Transparency = 0
  120. end
  121. end
  122. end
  123. end)
  124. mouse.Button1Down:connect(function()
  125. if plr.Character.Parent == workspace.Camera then
  126. if mouse ~= nil then
  127. if mouse.Target ~= nil then
  128. part = mouse.Target
  129. bp = Instance.new("BodyPosition",part)
  130. bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  131. bp.Position = part.Position
  132. particles = Instance.new("ParticleEmitter",part)
  133. particles.Color = ColorSequence.new(Color3.new(0,0,0))
  134. particles.Size = NumberSequence.new(1)
  135. particles.Texture = "rbxassetid://292289455"
  136. particles.VelocitySpread = 360
  137. particles.Speed = NumberRange.new(0)
  138. particles.RotSpeed = NumberRange.new(0)
  139. particles.Rotation = NumberRange.new(0)
  140. particles.Rate = 250
  141. particles.Lifetime = NumberRange.new(.2,.4)
  142. particles.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(.12,.688,0),NumberSequenceKeypoint.new(.891,.887,0),NumberSequenceKeypoint.new(1,1,0)})
  143. dwn = true
  144. end
  145. end
  146. while dwn == true do
  147. wait()
  148. bp.Position = mouse.hit.p
  149. if part then
  150. if part.Parent:FindFirstChildOfClass("Humanoid") then
  151. part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true
  152. end
  153. end
  154. end
  155. end
  156. end)
  157. mouse.Button1Up:connect(function()
  158. dwn = false
  159. if part then if part.Parent:FindFirstChildOfClass("Humanoid") then part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false end part = nil end
  160. if bp then bp:Destroy() end
  161. if particles then particles:Destroy() end
  162. end)
  163. base = Instance.new("ScreenGui",plr.PlayerGui)
  164. bbg = Instance.new("BillboardGui",plr.Character.Head)
  165. bbg.Size = UDim2.new(0,200,0,50)
  166. bbg.StudsOffset = Vector3.new(0,3,0)
  167. bbgTl = Instance.new("TextLabel",bbg)
  168. bbgTl.BackgroundTransparency = 1
  169. bbgTl.Size = UDim2.new(10,0,1,0)
  170. bbgTl.Position = UDim2.new(-4.5,0,0,0)
  171. bbgTl.Font = "Code"
  172. bbgTl.Text = " "
  173. bbgTl.TextSize = 25
  174. bbgTl.TextStrokeColor3 = Color3.new(1,1,1)
  175. bbgTl.TextColor3 = Color3.new(0,0,0)
  176. bbgTl.TextStrokeTransparency = 0
  177. bbgTl.TextWrapped = true
  178. plr.Chatted:connect(function(msg)
  179. bbgTl.Text = msg
  180. wait(5)
  181. if bbgTl.Text == msg then
  182. bbgTl.Text = " "
  183. end
  184. end)
  185. touchCounter = 0
  186. while wait() do
  187. if plr.Character.Parent == workspace.Camera then
  188. local c = plr.Character:Clone()
  189. c:MakeJoints()
  190. for y,t in pairs(c:GetChildren()) do
  191. if t:IsA("Part") then
  192. t.CanCollide = false
  193. t.Anchored = true
  194. t.Transparency = .5
  195. t.TopSurface = "Smooth"
  196. t.BottomSurface = "Smooth"
  197. t.RightSurface = "Smooth"
  198. t.LeftSurface = "Smooth"
  199. t.FrontSurface = "Smooth"
  200. t.BackSurface = "Smooth"
  201. t.BrickColor = BrickColor.new("Really black")
  202. if t.Name == "Head" and t:FindFirstChild("face") then
  203. t.face:Remove()
  204. elseif t.Name == "Torso" and t:FindFirstChild("roblox") then
  205. t.roblox:Remove()
  206. elseif t.Name == "HumanoidRootPart" then
  207. t:Remove()
  208. end
  209. else
  210. t:Remove()
  211. end
  212. end
  213. c.Parent = workspace
  214. game.Debris:AddItem(c,.05)
  215. end
  216. end
  217. end)
  218.  
  219. UAREANIDIOT.Name = "U ARE AN IDIOT!"
  220. UAREANIDIOT.Parent = Frame
  221. UAREANIDIOT.BackgroundColor3 = Color3.new(1, 1, 1)
  222. UAREANIDIOT.BackgroundTransparency = 0.5
  223. UAREANIDIOT.Position = UDim2.new(0, 256, 0, 70)
  224. UAREANIDIOT.Size = UDim2.new(0, 200, 0, 50)
  225. UAREANIDIOT.Font = Enum.Font.SourceSans
  226. UAREANIDIOT.FontSize = Enum.FontSize.Size14
  227. UAREANIDIOT.Text = "Idiot gun"
  228. UAREANIDIOT.TextColor3 = Color3.new(0, 1, 0.933333)
  229. UAREANIDIOT.TextScaled = true
  230. UAREANIDIOT.TextSize = 14
  231. UAREANIDIOT.TextWrapped = true
  232.  
  233. UAREANIDIOT.MouseButton1Down:connect:(function()
  234. ----------------------------------------
  235. -- Originally made by Alfederate :D --
  236. ----------------------------------------
  237.  
  238. -- there's no time to explain! --
  239.  
  240. local new=Instance.new
  241. local rad=math.rad
  242. local cf=CFrame.new
  243. local v3=Vector3.new
  244. local ang=function(x,y,z)
  245. return CFrame.Angles(rad(x),rad(y),rad(z))
  246. end
  247. local player=game:service'Players'.LocalPlayer
  248. local char=player.Character
  249. local cam=workspace.Camera
  250. local mouse=player:GetMouse()
  251. local weld=function(a,b,c0,c1)
  252. m=Instance.new('Motor',a)
  253. m.Part0=a
  254. m.Part1=b
  255. m.C0=c0
  256. m.C1=c1
  257. return m
  258. end
  259.  
  260. snd='rbxassetid://283166091'
  261. beamm=Instance.new('Model',workspace)
  262. beamm.Name='beam'
  263.  
  264. laser=false
  265.  
  266. rs=Instance.new('Part',char)
  267. rs.Transparency=1
  268. rs.CanCollide=false
  269. rs.TopSurface,rs.BottomSurface=0,0
  270. rs.FormFactor=3
  271. rs.Size=Vector3.new(.5,.5,.5)
  272.  
  273. ls=rs:Clone()
  274. ls.Parent=char
  275.  
  276. rsw=weld(rs,char.Torso,cf(-1,-.5,0),cf())
  277. lsw=weld(ls,char.Torso,cf(1,-.5,0),cf())
  278. raw=weld(char['Right Arm'],rs,cf(-.5,.6,-.14),ang(90,0,-8))
  279. law=weld(char['Left Arm'],ls,cf(-.3,1.5,-.14),ang(90,0,43))
  280.  
  281. s1=Instance.new('Sound',char)
  282. s1.Volume=1
  283. s1.Pitch=1
  284. s1.Looped=true
  285. s1.SoundId=snd
  286.  
  287. particles={}
  288.  
  289. local wep=new('Part',char)
  290. wep.FormFactor=3
  291. wep.CanCollide=false
  292. wep.Size=v3(1,3,1)
  293. wep.TopSurface,wep.BottomSurface=0,0
  294. local wepw=weld(wep,char['Right Arm'],cf(.26,.4,.7),ang(0,0,8))
  295.  
  296. local beam=wep:Clone()
  297. beam:ClearAllChildren()
  298. beam.Material='Neon'
  299. beam.BrickColor=BrickColor.new('Toothpaste')
  300. beam.Size=Vector3.new(3,3,1)
  301. beam.Transparency=.5
  302. beam.Anchored=true
  303. local ms=Instance.new('BlockMesh',beam)
  304. local inner=beam:Clone()
  305. inner.Transparency=0
  306. inner.Material='SmoothPlastic'
  307. inner.BrickColor=BrickColor.new('Navy blue')
  308. local ms2=inner.Mesh
  309.  
  310. local expl=inner:Clone()
  311. expl.Mesh:Destroy()
  312. expl.Material='Neon'
  313. expl.BrickColor=BrickColor.new('Toothpaste')
  314. expl.Size=Vector3.new(11,11,11)
  315. expl.Transparency=.55
  316. pl=Instance.new('PointLight',expl)
  317. pl.Color=expl.BrickColor.Color
  318. pl.Range=pl.Range*2
  319. pl.Name='light'
  320. local br=pl.Range
  321.  
  322. local exa=expl:Clone()
  323. exa.Size=Vector3.new(4,4,4)
  324. pl2=exa.light
  325.  
  326. local part=exa:Clone()
  327. part.Size=Vector3.new(1.5,1.5,1.5)
  328. pl3=part.light
  329. pms=Instance.new('BlockMesh',part)
  330.  
  331. char.Humanoid.Died:connect(function()
  332. laser=false
  333. beam.Parent=nil
  334. inner.Parent=nil
  335. expl.Parent=nil
  336. exa.Parent=nil
  337. s1:stop()
  338. end)
  339.  
  340. mouse.Button1Down:connect(function() if char.Humanoid.Health~=0 then
  341. laser=true
  342. s1.Volume=1
  343. s1:play()
  344. end end)
  345. mouse.Button1Up:connect(function()
  346. laser=false
  347. beam.Parent=nil
  348. inner.Parent=nil
  349. expl.Parent=nil
  350. exa.Parent=nil
  351. s1:stop()
  352. end)
  353.  
  354. parti=0
  355. game:service'RunService'.Stepped:connect(function()
  356. parti=parti+1
  357. for i,v in pairs(particles) do
  358. v.CFrame=v.CFrame*CFrame.new(0,0,-.3)
  359. v.Transparency=v.Transparency+.08
  360. if v.Transparency >= 1 then
  361. v:Destroy()
  362. table.remove(particles,i)
  363. else
  364. v.Parent=beamm
  365. end
  366. end
  367. a=cam.CoordinateFrame.p
  368. b=mouse.Hit.p
  369. mhitr=Ray.new(a,(b-a).unit*999)
  370. mhit,ps=workspace:FindPartOnRayWithIgnoreList(mhitr,{char,beamm})
  371. raw.C1=ang(90+(mouse.Hit.lookVector.y*90),0,-8)
  372. law.C1=ang(90+(mouse.Hit.lookVector.y*90),0,43)
  373. if not char.Humanoid.Sit and not char.Humanoid.PlatformStand then
  374. char.Torso.CFrame=CFrame.new(char.Torso.CFrame.p,Vector3.new(ps.x,char.Torso.CFrame.p.y,ps.z))
  375. end
  376. if laser then
  377. beamm.Parent=workspace
  378. beam.Parent=beamm
  379. inner.Parent=beamm
  380. expl.Parent=beamm
  381. exa.Parent=beamm
  382. s1.Volume=s1.Volume-.002
  383.  
  384. ray=Ray.new((wep.CFrame*cf(0,-1.5,0)).p,((wep.CFrame*cf(0,-10,0)).p-(wep.CFrame*cf(0,-1.5,0)).p).unit*999)
  385. hit,pos=workspace:FindPartOnRayWithIgnoreList(ray,{char,beamm})
  386.  
  387. if hit and hit.Parent:findFirstChild('Humanoid') and s1.Volume > .3 and parti/8==math.floor(parti/8) then
  388. Instance.new('Explosion',workspace).Position=pos
  389. end
  390. if hit and hit.Parent==workspace.Terrain or hit==workspace.Terrain and parti/8==math.floor(parti/8) then
  391. e=Instance.new('Explosion',workspace)
  392. e.Position=pos
  393. e.BlastRadius=14
  394. e.BlastPressure=1e4
  395. end
  396. if hit and not hit.Anchored and not (hit:GetMass()>1e4) then
  397. hit.Velocity=hit.Velocity+beam.CFrame.lookVector*(1*s1.Volume*hit:GetMass())
  398. end
  399.  
  400. if parti==math.floor(parti) then
  401. par=part:Clone()
  402. table.insert(particles,par)
  403. par.Parent=beamm
  404. par.Transparency=1-s1.Volume
  405. par.light.Range=br*s1.Volume
  406. par.CFrame=cf(pos)*ang(math.random(-180,180),math.random(-180,180),math.random(-180,180))*cf(0,0,-10)
  407. end
  408.  
  409. mag=((wep.CFrame*cf(0,-1.5,0)).p-pos).magnitude
  410. ms.Scale=v3(s1.Volume,s1.Volume,mag)
  411. ms2.Scale=v3(ms.Scale.x/2,ms.Scale.y/2,mag-(.1/mag))
  412. beam.CFrame=cf((wep.CFrame*cf(0,-1.5,0)).p,pos)*cf(0,0,-mag/2)*ang(0,0,math.random(0,180))
  413. inner.CFrame=beam.CFrame
  414. pl.Range=br*s1.Volume
  415. pl2.Range=br*s1.Volume
  416. expl.Size=v3(math.random(9,13),math.random(9,13),math.random(9,13))*s1.Volume
  417. expl.Transparency=math.random(40,60)/100
  418. expl.CFrame=cf(pos)*ang(math.random(0,180),math.random(0,180),math.random(0,180))
  419. exa.Size=v3(4,4,4)*s1.Volume
  420. exa.CFrame=wep.CFrame*cf(0,-1.5,0)*ang(math.random(0,180),math.random(0,180),math.random(0,180))
  421. char.Torso.Velocity=char.Torso.Velocity-beam.CFrame.lookVector*(7*s1.Volume)
  422. end
  423. end)
  424. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement