Advertisement
MewGod

Untitled

Apr 5th, 2016
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.33 KB | None | 0 0
  1. function fancypad()
  2.  
  3. local p=game:service'Players'.LocalPlayer
  4. local c=p.Character
  5. local y=-4.6
  6. local hidden=false
  7. local Parts={}
  8. p:GetMouse().KeyDown:connect(function(k)
  9. k=k:lower()
  10. if k == 'x' then
  11. hidden=not hidden
  12. end
  13. end)
  14.  
  15. function Rainbow(i)
  16. local section = i % 1 * 3
  17. local secondary = 0.5 * math.pi * (section % 1)
  18. if section < 1 then
  19. return 1, 1 - math.cos(secondary), 1 - math.sin(secondary)
  20. elseif section < 2 then
  21. return 1 - math.sin(secondary), 1, 1 - math.cos(secondary)
  22. else
  23. return 1 - math.cos(secondary), 1 - math.sin(secondary), 1
  24. end
  25. end
  26.  
  27. createPart=function()
  28. local prt=Instance.new"Part"
  29. prt.Parent=c
  30. prt.BrickColor=BrickColor.new"White"
  31. prt.Locked=true
  32. prt.Anchored=true
  33. prt.CanCollide = false
  34. prt.Material="Neon"
  35. if hidden then
  36. prt.CanCollide=false
  37. prt.Transparency=1
  38. end
  39. prt.FormFactor='Custom'
  40. prt.Size=Vector3.new(2.5,.2,2.5)
  41. prt.CFrame=c.Head.CFrame*CFrame.new(0, y, 0)
  42. table.insert(Parts, prt)
  43. local bmesh=Instance.new"CylinderMesh"
  44. bmesh.Parent=prt
  45. bmesh.Scale = Vector3.new(1.5,1.5,1.5)
  46. bmesh.Name="BlockMesh"
  47. end
  48.  
  49.  
  50.  
  51. game:GetService"RunService".RenderStepped:connect(function()
  52. createPart()
  53. for i = 1, #Parts do
  54. if Parts[i] and Parts[i].Parent then
  55. local Part1 = Parts[i]
  56. local bmesh=Part1:findFirstChild'BlockMesh'
  57. bmesh.Scale=bmesh.Scale-Vector3.new(.025, 0.001, .015)
  58. Part1.Transparency=Part1.Transparency+.015
  59. if bmesh.Scale.x <= 1.37 then
  60. local r,g,b = Rainbow(tick())
  61. Part1.Color=Color3.new(r,g,b)
  62. end
  63. if bmesh.Scale.x <= .5 then table.remove(Parts, i) Part1:destroy() end
  64. else
  65. table.remove(Parts,i)
  66. end
  67. end
  68. end)
  69.  
  70.  
  71.  
  72.  
  73. hover = true
  74. up = false
  75. down = false
  76.  
  77.  
  78. local pad = Instance.new("Part",game.Players.LocalPlayer.Character)
  79. pad.Size = Vector3.new(1.5, 0.1, 1.5)
  80. pad.Anchored = true
  81. pad.Name = "FancyPad"
  82. pad.Material = "Neon"
  83. pad.Transparency = 1
  84.  
  85. padon = true
  86.  
  87. mouse=game.Players.LocalPlayer:GetMouse()
  88. mouse.KeyDown:connect(function(key)
  89. if key:lower()=="e" then
  90. up = true
  91. hover = false
  92. down = false
  93. end
  94. if key:lower()=="q" then
  95. up = false
  96. hover = false
  97. down = true
  98. end
  99.  
  100. if key:lower()=="x" then
  101. if padon == true then
  102. padon = false
  103. pad.CanCollide = false
  104. else if padon == false then
  105. padon = true
  106. pad.CanCollide = true
  107. end
  108. end
  109. end
  110.  
  111.  
  112. mouse.KeyUp:connect(function(key)
  113. up = false
  114. hover = true
  115. down = false
  116. end)
  117. end)
  118.  
  119.  
  120.  
  121.  
  122. while wait() do
  123. if hover == true then
  124. pad.CFrame = CFrame.new(game.Players.LocalPlayer.Character.Torso.CFrame.x, game.Players.LocalPlayer.Character.Torso.CFrame.y - 3.585, game.Players.LocalPlayer.Character.Torso.CFrame.z)
  125. end
  126.  
  127. if up == true then
  128. pad.CFrame = CFrame.new(game.Players.LocalPlayer.Character.Torso.CFrame.x, game.Players.LocalPlayer.Character.Torso.CFrame.y - 2, game.Players.LocalPlayer.Character.Torso.CFrame.z)
  129. end
  130.  
  131. if down == true then
  132. pad.CFrame = CFrame.new(game.Players.LocalPlayer.Character.Torso.CFrame.x, game.Players.LocalPlayer.Character.Torso.CFrame.y - 5, game.Players.LocalPlayer.Character.Torso.CFrame.z)
  133. end
  134. end
  135. end --Fancy end
  136. fancypad()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement