Advertisement
refrop

ui

Feb 17th, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.93 KB | None | 0 0
  1. p = game.Players.LocalPlayer
  2. char = p.Character
  3. des = false
  4. fling = true
  5. dot = false
  6. falling = false
  7. jump = true
  8. --char.Shirt:Remove()
  9. --for i,v in pairs(char:GetChildren()) do if v:IsA("Pants") then v:Remove() end end
  10. for i,v in pairs(char:GetChildren()) do if v:IsA("Hat") then v.Handle:Remove() end end
  11. wait()--shirt = Instance.new("Shirt", char)
  12. --shirt.Name = "Shirt"
  13. --pants = Instance.new("Pants", char)
  14. --pants.Name = "Pants"
  15.  
  16. --char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=22287244"
  17. --char.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=22287352"
  18. tp = true
  19. shoot = true
  20. hum = char.Humanoid
  21. punch = true
  22. neckp = char.Torso.Neck.C0
  23. neck = char.Torso.Neck
  24. hum.MaxHealth = 6000
  25. wait()
  26. hum.Health =hum.MaxHealth
  27. des = false
  28. root=char.HumanoidRootPart
  29. torso = char.Torso
  30. char.Head.face.Texture = "rbxassetid://986775808"
  31. local ChatService = game:GetService("Chat")
  32. local player = game.Players.LocalPlayer
  33. lig = Instance.new("PointLight",player.Character.Torso)
  34. lig.Color=Color3.new(255,0,0)
  35. m=player:GetMouse()
  36. bb = Instance.new("BillboardGui",player.Character.Head)
  37. bb.Enabled = true
  38. function newRay(start,face,range,wat)
  39. local rey=Ray.new(start.p,(face.p-start.p).Unit*range)
  40. hit,pos=Workspace:FindPartOnRayWithIgnoreList(rey,wat)
  41. return rey,hit,pos
  42. end
  43.  
  44. local part = game.Players.LocalPlayer.Character
  45. local basetemplate = "http://www.roblox.com/asset/?id="
  46. local shirt = 1162887253
  47. local pants = 1162887782
  48. local h = part:findFirstChild("Shirt")
  49. if h ~= nil then
  50. h.ShirtTemplate = basetemplate..shirt
  51. else
  52. local i = Instance.new("Shirt")
  53. i.Name = "Shirt"
  54. i.ShirtTemplate = basetemplate..shirt
  55. i.Parent = part
  56. end
  57. local p = part:findFirstChild("Pants")
  58. if p ~= nil then
  59. p.PantsTemplate = basetemplate..pants
  60. else
  61. local np = Instance.new("Pants")
  62. np.PantsTemplate = basetemplate..pants
  63. np.Name = "Pants"
  64. np.Parent = part
  65. end
  66. ------------------------
  67.  
  68. jun = game.Players.LocalPlayer
  69. Stuff = false
  70.  
  71. function Chat(msg)
  72. game:service("Chat"):Chat(jun.Character.Head,msg,Enum.ChatColor.Red)
  73. end
  74.  
  75. function ssj()
  76. if Stuff == false then
  77. Stuff = true
  78.  
  79.  
  80. jun.Character.Humanoid.WalkSpeed = 10
  81. Effect1 = Instance.new("Part",jun.Character)
  82. Effect1.Anchored = true
  83. Effect1.CanCollide = false
  84. Effect1.Shape = "Ball"
  85. Effect1.CFrame = jun.Character.Torso.CFrame
  86. Effect1.BrickColor = BrickColor.new("Toothpaste")
  87. Effect1.Size = Vector3.new(20,18,18)
  88. Effect1.TopSurface = "Smooth"
  89. Effect1.BottomSurface = "Smooth"
  90. Effect1.Material = "Neon"
  91.  
  92.  
  93. for i = 1, 5 do
  94. wait(.5)
  95. Effect1.Transparency = Effect1.Transparency + .2
  96. end
  97. Effect1:Destroy()
  98.  
  99. jun.Character.Humanoid.WalkSpeed = 200
  100.  
  101.  
  102. p = Instance.new("Part")
  103. p.Parent = jun.Character
  104. p.Anchored = true
  105. p.CanCollide = false
  106. p.Transparency = 0.15
  107. p.formFactor = "Symmetric"
  108. p.Size = Vector3.new(0, 0, 0)
  109. p.TopSurface = "Smooth"
  110. p.BottomSurface = "Smooth"
  111. p.Name = "Sharingan"
  112. p.Shape = "Ball"
  113. p.CFrame = jun.Character.Torso.CFrame
  114. p.BrickColor = BrickColor.new("Institutional white")
  115. for i = 1 , 10 do
  116. wait(0.07)
  117. p.Size = p.Size + Vector3.new(4, 4, 4)
  118. p.Transparency = p.Transparency + 0.1
  119. p.CFrame = jun.Character.Torso.CFrame
  120. end
  121. p:Destroy()
  122.  
  123.  
  124. Effect = Instance.new("Part")
  125. Effect.Parent = jun.Character
  126. Effect.Anchored = true
  127. Effect.CanCollide = false
  128. Effect.Size = Vector3.new(1, 1, 1)
  129. Effect.formFactor = "Symmetric"
  130. Effect.Transparency = 0.5
  131. Effect.BrickColor = BrickColor.new("Toothpaste")
  132. Effect.TopSurface = "Smooth"
  133. Effect.BottomSurface = "Smooth"
  134. EffectMesh = Instance.new("SpecialMesh")
  135. EffectMesh.MeshId = "rbxassetid://51684149"
  136. EffectMesh.TextureId = "http://www.roblox.com/asset/?id=157005821"
  137. EffectMesh.Parent = Effect
  138. EffectMesh.Scale = Vector3.new(20, 20, 20)
  139.  
  140. for _,c in pairs (jun.Character:GetChildren()) do
  141. if c.className == "Hat" then
  142. c.Handle.Transparency = 1
  143. end
  144. end
  145.  
  146. Hair22 = Instance.new("Part")
  147.  
  148. Hair22.Parent = jun.Character
  149. Hair22.Name = "Hair"
  150. Hair22.formFactor = "Symmetric"
  151. Hair22.Size = Vector3.new(1, 1, 1)
  152. Hair22.CFrame = jun.Character.Head.CFrame
  153. Hair22:BreakJoints()
  154. Hair22.CanCollide = false
  155. Hair22.TopSurface = "Smooth"
  156. Hair22.BottomSurface = "Smooth"
  157. Hair22.BrickColor = BrickColor.new("Really black")
  158. Hair22.Transparency = 1
  159.  
  160. Weld = Instance.new("Weld")
  161. Weld.Part0 = jun.Character.Head
  162. Weld.Part1 = Hair22
  163. Weld.Parent = jun.Character.Head
  164. Weld.C0 = CFrame.new(0, 0.26, 0.06)*CFrame.fromEulerAnglesXYZ(0, 0, 0)
  165.  
  166. Mesh = Instance.new("SpecialMesh")
  167. Mesh.Parent = Hair22
  168. Mesh.MeshType = "Sphere"
  169. Mesh.Scale = Vector3.new(1.3, 1.3, 1.3)
  170.  
  171. Hair4 = Instance.new("Part")
  172. Hair4.Parent = jun.Character
  173. Hair4.Name = "Hair"
  174. Hair4.CanCollide = false
  175. Hair4.Locked = true
  176. Hair4.TopSurface = "Smooth"
  177. Hair4.BottomSurface = "Smooth"
  178. Hair4.formFactor = "Symmetric"
  179. Hair4.BrickColor = BrickColor.new("Really black")
  180. Hair4.CFrame = jun.Character.Torso.CFrame
  181. Hair4.Size = Vector3.new(1, 1, 1)
  182. Hair4.Transparency = 1
  183.  
  184. Weld = Instance.new("Weld")
  185. Weld.Parent = jun.Character.Head
  186. Weld.Part0 = jun.Character.Head
  187. Weld.Part1 = Hair4
  188. Weld.C0 = CFrame.new(0, 1, 0)
  189.  
  190. Mesh = Instance.new("SpecialMesh")
  191. Mesh.Parent = Hair4
  192. Mesh.Scale = Vector3.new(1.15, 1.8, 1.26)
  193. Mesh.MeshType = "FileMesh"
  194. Mesh.MeshId = "http://www.roblox.com/asset/?id=12212520"
  195. Mesh.TextureId = "http://www.roblox.com/asset/?id=4547557"
  196.  
  197. jun.Character.Torso.CFrame = jun.Character.Torso.CFrame * CFrame.new(0, 0.1, 0)
  198.  
  199. for i = 1 , 20 do
  200. Effect.CFrame = CFrame.new(jun.Character.Torso.Position)
  201. EffectMesh.Scale = EffectMesh.Scale + Vector3.new(2, 0, 2)
  202. Effect.Transparency = Effect.Transparency + 0.025
  203. wait(0.06)
  204. end
  205. Effect:Remove()
  206.  
  207. for i = 1, 6 do
  208. Hair22.Transparency = Hair22.Transparency - .2
  209. Hair4.Transparency = Hair4.Transparency - .2
  210. wait(.5)
  211. end
  212. if jun.Character.Torso:findFirstChild("PwnParticleEmitter") == nil then
  213. pie = Instance.new("ParticleEmitter")
  214. pie.Name = "PwnParticleEmitter"
  215. pie.Parent = jun.Character.Torso
  216. pie.Texture = "rbxassetid://833874434"
  217. pie.Color = 0,170,255
  218. pie.Rate = 50
  219. pie.Speed = 0.5
  220. pie.Lifetime = 1
  221. pie.Size = 1
  222. pie.LightInfluence = 1
  223. pie.LightEmission = 0.3
  224. end
  225.  
  226. jun.Character.Humanoid.MaxHealth = jun.Character.Humanoid.MaxHealth*6000.150
  227. wait()
  228. jun.Character.Humanoid.Health = jun.Character.Humanoid.MaxHealth
  229. end
  230. end
  231.  
  232. function nossj()
  233. if Stuff == true then
  234. Stuff = false
  235. if jun.Character.Torso:findFirstChild("PwnParticleEmitter") ~= nil then
  236. jun.Character.Torso:findFirstChild("PwnParticleEmitter"):Remove()
  237. end
  238. p = Instance.new("Part")
  239. p.Parent = jun.Character
  240. p.Anchored = true
  241. p.CanCollide = false
  242. p.Transparency = 0.1
  243. p.formFactor = "Symmetric"
  244. p.Size = Vector3.new(22, 22, 22)
  245. p.TopSurface = "Smooth"
  246. p.BottomSurface = "Smooth"
  247. p.Name = "Sharingan"
  248. p.Shape = "Ball"
  249. p.CFrame = jun.Character.Torso.CFrame
  250. p.BrickColor = BrickColor.new("White")
  251. for i = 1 , 10 do
  252. wait(0.05)
  253. p.Size = p.Size + Vector3.new(-4, -4, -4)
  254. p.Transparency = p.Transparency + 0.1
  255. p.CFrame = jun.Character.Torso.CFrame
  256. end
  257. p:Remove()
  258.  
  259. for u, c in pairs (jun.Character:GetChildren()) do
  260. if c.className == "Hat" then
  261. c.Handle.Transparency = 0
  262. end
  263. if c.Name == "Hair" then
  264. c:Remove()
  265. end
  266. end
  267. jun.Character.Humanoid.Health = jun.Character.Humanoid.Health/1.15
  268. wait(.3)
  269. jun.Character.Humanoid.MaxHealth = jun.Character.Humanoid.MaxHealth/1.15
  270. end
  271. end
  272. jun.Chatted:connect(function(Msg)
  273. msg = Msg:lower()
  274. if string.sub(msg, 1, 13) == "ui" then
  275. wait(0.1)
  276. ssj()
  277. end
  278. if string.sub(msg, 1, 3) == "off" then
  279. wait(0.1)
  280. nossj()
  281. end
  282. end)
  283. function waitForChild(parent, childName)
  284. while true do
  285. local child = parent:findFirstChild(childName)
  286. if child then
  287. return child
  288. end
  289. parent.ChildAdded:wait()
  290. end
  291. end
  292.  
  293. -- declarations
  294.  
  295. local Figure = script.Parent
  296. local Head = waitForChild(Figure, "Head")
  297. local Humanoid = waitForChild(Figure, "Humanoid")
  298. -- regeneration
  299.  
  300. while true do
  301. local s = wait(4)
  302. local health = Humanoid.Health
  303. if health > 0 and health < Humanoid.MaxHealth then
  304. health = health + 0.08 * s * Humanoid.MaxHealth
  305. if health * .95 < Humanoid.MaxHealth then
  306. Humanoid.Health = health
  307. else
  308. Humanoid.Health = Humanoid.MaxHealth
  309. end
  310. end
  311. end
  312. local HealthGUI_prototype = script:FindFirstChild("HealthGUI")
  313. local lastHealth = 100
  314. local lastHealth2 = 100
  315. local maxWidth = 0.96
  316.  
  317. local humanoid = script.Parent.Humanoid
  318.  
  319. if (humanoid == nil) then
  320. print("ERROR: no humanoid found in 'HealthScript v3.1'")
  321. end
  322.  
  323.  
  324. function CreateGUI()
  325. local p = game.Players:GetPlayerFromCharacter(humanoid.Parent)
  326. HealthGUI_prototype.Parent = p.PlayerGui
  327. end
  328.  
  329. function UpdateGUI(health)
  330. tray = HealthGUI_prototype.tray
  331. local width = (health / humanoid.MaxHealth) * maxWidth
  332. local height = 0.83
  333. local lastX = tray.bar.Position.X.Scale
  334. local x = 0.019 + (maxWidth - width)
  335. local y = 0.1
  336.  
  337. tray.bar.Position = UDim2.new(x,0,y, 0)
  338. tray.bar.Size = UDim2.new(width, 0, height, 0)
  339. -- If more than 1/4 health, bar = green. Else, bar = red.
  340. if( (health / humanoid.MaxHealth) > 0.25 ) then
  341. tray.barRed.Size = UDim2.new(0, 0, 0, 0)
  342. else
  343. tray.barRed.Position = tray.bar.Position
  344. tray.barRed.Size = tray.bar.Size
  345. tray.bar.Size = UDim2.new(0, 0, 0, 0)
  346. end
  347.  
  348. if ( (lastHealth - health) > (humanoid.MaxHealth / 10) ) then
  349. lastHealth = health
  350.  
  351. if humanoid.Health ~= humanoid.MaxHealth then
  352. delay(0,function()
  353. AnimateHurtOverlay()
  354. end)
  355. delay(0,function()
  356. AnimateBars(x, y, lastX, height)
  357. end)
  358. end
  359. else
  360. lastHealth = health
  361. end
  362. end
  363.  
  364.  
  365. function HealthChanged(health)
  366. UpdateGUI(health)
  367. if ( (lastHealth2 - health) > (humanoid.MaxHealth / 10) ) then
  368. lastHealth2 = health
  369. else
  370. lastHealth2 = health
  371. end
  372. end
  373.  
  374. function AnimateBars(x, y, lastX, height)
  375. tray = HealthGUI_prototype.tray
  376. local width = math.abs(x - lastX)
  377. if( x > lastX ) then
  378. x = lastX
  379. end
  380. tray.bar2.Position = UDim2.new(x,0, y, 0)
  381. tray.bar2.Size = UDim2.new(width, 0, height, 0)
  382. tray.bar2.BackgroundTransparency = 0
  383. local GBchannels = 1
  384. local j = 0.2
  385.  
  386. local i_total = 30
  387. for i=1,i_total do
  388. -- Increment Values
  389. if (GBchannels < 0.2) then
  390. j = -j
  391. end
  392. GBchannels = GBchannels + j
  393. if (i > (i_total - 10)) then
  394. tray.bar2.BackgroundTransparency = tray.bar2.BackgroundTransparency + 0.1
  395. end
  396. tray.bar2.BackgroundColor3 = Color3.new(1, GBchannels, GBchannels)
  397.  
  398. wait(0.02)
  399. end
  400. end
  401.  
  402. function AnimateHurtOverlay()
  403. -- Start:
  404. -- overlay.Position = UDim2.new(0, 0, 0, -22)
  405. -- overlay.Size = UDim2.new(1, 0, 1.15, 30)
  406.  
  407. -- Finish:
  408. -- overlay.Position = UDim2.new(-2, 0, -2, -22)
  409. -- overlay.Size = UDim2.new(4.5, 0, 4.65, 30)
  410.  
  411. overlay = HealthGUI_prototype.hurtOverlay
  412. overlay.Position = UDim2.new(-2, 0, -2, -22)
  413. overlay.Size = UDim2.new(4.5, 0, 4.65, 30)
  414. -- Animate In, fast
  415. local i_total = 2
  416. local wiggle_total = 0
  417. local wiggle_i = 0.02
  418. for i=1,i_total do
  419. overlay.Position = UDim2.new( (-2 + (2 * (i/i_total)) + wiggle_total/2), 0, (-2 + (2 * (i/i_total)) + wiggle_total/2), -22 )
  420. overlay.Size = UDim2.new( (4.5 - (3.5 * (i/i_total)) + wiggle_total), 0, (4.65 - (3.5 * (i/i_total)) + wiggle_total), 30 )
  421. wait(0.01)
  422. end
  423.  
  424. i_total = 30
  425.  
  426. wait(0.03)
  427.  
  428. -- Animate Out, slow
  429. for i=1,i_total do
  430. if( math.abs(wiggle_total) > (wiggle_i * 3) ) then
  431. wiggle_i = -wiggle_i
  432. end
  433. wiggle_total = wiggle_total + wiggle_i
  434. overlay.Position = UDim2.new( (0 - (2 * (i/i_total)) + wiggle_total/2), 0, (0 - (2 * (i/i_total)) + wiggle_total/2), -22 )
  435. overlay.Size = UDim2.new( (1 + (3.5 * (i/i_total)) + wiggle_total), 0, (1.15 + (3.5 * (i/i_total)) + wiggle_total), 30 )
  436. wait(0.01)
  437. end
  438.  
  439. -- Hide after we're done
  440. overlay.Position = UDim2.new(10, 0, 0, 0)
  441. end
  442.  
  443. CreateGUI()
  444. humanoid.HealthChanged:connect(HealthChanged)
  445. humanoid.Died:connect(function() HealthChanged(0) end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement