Advertisement
Infintyboy

Phoenix Wright Roblox Script

Aug 16th, 2018
2,322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 27.44 KB | None | 0 0
  1. local equipped = false
  2. local idle = 0
  3. local change = 1
  4. local val = 0
  5. local toim = 0
  6. local idleanim = 0.4
  7. local sine = 0
  8. local Sit = 1
  9. --TODO: add comments or something idk
  10. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  11. local Player = owner
  12. local Mouse,mouse,UserInputService,ContextActionService
  13. do
  14.     script.Parent = Player.Character
  15.     local CAS = {Actions={}}
  16.     local Event = Instance.new("RemoteEvent")
  17.     Event.Name = "UserInput_Event"
  18.     Event.Parent = Player.Character
  19.     local fakeEvent = function()
  20.         local t = {_fakeEvent=true}
  21.         t.Connect = function(self,f)self.Function=f end
  22.         t.connect = t.Connect
  23.         return t
  24.     end
  25.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  26.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  27.     function CAS:BindAction(name,fun,touch,...)
  28.         CAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
  29.     end
  30.     function CAS:UnbindAction(name)
  31.         CAS.Actions[name] = nil
  32.     end
  33.     local function te(self,ev,...)
  34.         local t = m[ev]
  35.         if t and t._fakeEvent and t.Function then
  36.             t.Function(...)
  37.         end
  38.     end
  39.     m.TrigEvent = te
  40.     UIS.TrigEvent = te
  41.     Event.OnServerEvent:Connect(function(plr,io)
  42.         if plr~=Player then return end
  43.         if io.isMouse then
  44.             m.Target = io.Target
  45.             m.Hit = io.Hit
  46.         elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
  47.             if io.UserInputState == Enum.UserInputState.Begin then
  48.                 m:TrigEvent("Button1Down")
  49.             else
  50.                 m:TrigEvent("Button1Up")
  51.             end
  52.         else
  53.             for n,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.             if io.UserInputState == Enum.UserInputState.Begin then
  61.                 m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
  62.                 UIS:TrigEvent("InputBegan",io,false)
  63.             else
  64.                 m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
  65.                 UIS:TrigEvent("InputEnded",io,false)
  66.             end
  67.         end
  68.     end)
  69.     NLS([==[
  70.     local Player = game:GetService("Players").LocalPlayer
  71.    
  72.     local Char = Player.Character
  73.     local Event = Char:WaitForChild("UserInput_Event")
  74.    
  75.     local UIS = game:GetService("UserInputService")
  76.    
  77.     local input = function(io,a)
  78.         if a then return end
  79.         local io = {KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}
  80.         Event:FireServer(io)
  81.     end
  82.     UIS.InputBegan:Connect(input)
  83.     UIS.InputEnded:Connect(input)
  84.     local Changed = false
  85.     local Mouse = Player:GetMouse()
  86.     local mouse = Player:GetMouse()
  87.     local h,t = Mouse.Hit,Mouse.Target
  88.     while wait(1/30) do
  89.         if h~=Mouse.Hit or t~=Mouse.Target then
  90.             Event:FireServer({isMouse=true,Target=Mouse.Target,Hit=Mouse.Hit})
  91.             h,t=Mouse.Hit,Mouse.Target
  92.         end
  93.     end
  94.     ]==],Player.Character)
  95.     Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  96. end
  97.  
  98. wait(0.2)
  99.  
  100. Player = owner
  101. local char = Player.Character
  102. local hum = char.Humanoid
  103. local hed = char.Head
  104. local root = char.HumanoidRootPart
  105. local rootj = root.RootJoint
  106. local tors = char.Torso
  107. local ra = char["Right Arm"]
  108. local la = char["Left Arm"]
  109. local rl = char["Right Leg"]
  110. local ll = char["Left Leg"]
  111. local neck = tors["Neck"]
  112. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  113. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  114. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  115. local maincolor = BrickColor.new("Institutional white")
  116. PlayerGui = Player.PlayerGui
  117. Cam = workspace.CurrentCamera
  118. Backpack = Player.Backpack
  119. Character = Player.Character
  120. Humanoid = Character.Humanoid
  121. RootPart = Character["HumanoidRootPart"]
  122. Torso = Character["Torso"]
  123. Head = Character["Head"]
  124. RightArm = Character["Right Arm"]
  125. LeftArm = Character["Left Arm"]
  126. RightLeg = Character["Right Leg"]
  127. LeftLeg = Character["Left Leg"]
  128. RootJoint = RootPart["RootJoint"]
  129. Neck = Torso["Neck"]
  130. RightShoulder = Torso["Right Shoulder"]
  131. LeftShoulder = Torso["Left Shoulder"]
  132. RightHip = Torso["Right Hip"]
  133. LeftHip = Torso["Left Hip"]
  134. Character.Archivable = true
  135.  
  136. IT = Instance.new
  137.  
  138. local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
  139. local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
  140. local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
  141. local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
  142. local M = {C=math.cos,R=math.rad,S=math.sin,P=math.pi,RNG=math.random,MRS=math.randomseed,H=math.huge,RRNG = function(min,max,div) return math.rad(math.random(min,max)/(div or 1)) end}
  143. local R3 = {N=Region3.new}
  144. local De = S.Debris
  145. local WS = workspace
  146. local Lght = S.Lighting
  147. local RepS = S.ReplicatedStorage
  148. local IN = Instance.new
  149. CF = CFrame.new
  150. VT = Vector3.new
  151. RAD = math.rad
  152. C3 = Color3.new
  153. UD2 = UDim2.new
  154. BRICKC = BrickColor.new
  155. ANGLES = CFrame.Angles
  156. EULER = CFrame.fromEulerAnglesXYZ
  157. COS = math.cos
  158. ACOS = math.acos
  159. SIN = math.sin
  160. ASIN = math.asin
  161. ABS = math.abs
  162. MRANDOM = math.random
  163. FLOOR = math.floor
  164.  
  165. --//=================================\\
  166. --||          USEFUL VALUES
  167. --\\=================================//
  168.  
  169. Animation_Speed = 1
  170. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  171. local Speed = 20
  172. local SIZE = 1
  173. local Player_Size = 1
  174. Player_Size = 1
  175. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  176. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  177. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  178. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  179. local DAMAGEMULTIPLIER = 1
  180. local ANIM = "Idle"
  181. local ATTACK = false
  182. local EQUIPPED = false
  183. local HOLD = false
  184. local COMBO = 1
  185. local Rooted = false
  186. local SINE = 0
  187. local KEYHOLD = false
  188. local CHANGE = 2 / Animation_Speed
  189. local WALKINGANIM = false
  190. local VALUE1 = false
  191. local VALUE2 = false
  192. local ROBLOXIDLEANIMATION = IT("Animation")
  193. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  194. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  195. local ATANIM = IT("Animation")
  196. ATANIM.Name = "Attack Animation"
  197. ATANIM.AnimationId = "http://www.roblox.com/asset/?id=74894663"
  198. --ROBLOXIDLEANIMATION.Parent = Humanoid
  199. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  200. WEAPONGUI.Name = "Weapon GUI"
  201. local Weapon = IT("Model")
  202. Weapon.Name = "Adds"
  203. local Effects = IT("Folder", Weapon)
  204. Effects.Name = "Effects"
  205. local ANIMATOR = Humanoid.Animator
  206. local ANIMATE = Character.Animate
  207. local UNANCHOR = true
  208. local CLOCKLOOP = 0
  209. local SONG = 151363261
  210. local CLOCKTARGET = nil
  211. local CLOCKSPEED = 1
  212. script.Parent = WEAPONGUI
  213. local CLONE = Character:Clone()
  214. CLONE.Parent = nil
  215. Character.Archivable = false
  216. local MusicID = 151363261
  217. local Music = Instance.new("Sound",Torso)
  218.     Music.SoundId = "rbxassetid://"..MusicID
  219.     Music.Looped = true
  220.     Music.Pitch = 1
  221.     Music.Volume = 5
  222.     Music.Parent = Torso
  223.     Music:Resume()
  224.     --Music.Playing = false
  225. local phoenix = {sounds = {'665529621','135166344', '135165859'},slam = '131218412',  scale = {Vector3.new(1,1,1),Vector3.new(1,1,1),Vector3.new(Player_Size/150,Player_Size/150,Player_Size/150)},images = {'129044092','129044561', '53141804'}, meshes = {'0','0','434570496'}}
  226.  
  227. --//=================================\\
  228. --\\=================================//
  229.  
  230.  
  231. --//=================================\\
  232. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  233. --\\=================================//
  234.  
  235. ArtificialHB = Instance.new("BindableEvent", script)
  236. ArtificialHB.Name = "ArtificialHB"
  237.  
  238. script:WaitForChild("ArtificialHB")
  239.  
  240. frame = Frame_Speed
  241. tf = 0
  242. allowframeloss = false
  243. tossremainder = false
  244. lastframe = tick()
  245. script.ArtificialHB:Fire()
  246.  
  247. game:GetService("RunService").Heartbeat:connect(function(s, p)
  248.     tf = tf + s
  249.     if tf >= frame then
  250.         if allowframeloss then
  251.             script.ArtificialHB:Fire()
  252.             lastframe = tick()
  253.         else
  254.             for i = 1, math.floor(tf / frame) do
  255.                 script.ArtificialHB:Fire()
  256.             end
  257.         lastframe = tick()
  258.         end
  259.         if tossremainder then
  260.             tf = 0
  261.         else
  262.             tf = tf - frame * math.floor(tf / frame)
  263.         end
  264.     end
  265. end)
  266.  
  267. --//=================================\\
  268. --\\=================================//
  269.  
  270. --//=================================\\
  271. --||          SOME FUNCTIONS
  272. --\\=================================//
  273.  
  274. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  275.     return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  276. end
  277.  
  278.  
  279. function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
  280.     local Sound = IN("Sound")
  281.     Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  282.     Sound.Pitch = pitch or 1
  283.     Sound.Volume = volume or 1
  284.     Sound.Looped = looped or false
  285.     if(autoPlay)then
  286.         coroutine.wrap(function()
  287.             repeat wait() until Sound.IsLoaded
  288.             Sound.Playing = autoPlay or false
  289.         end)()
  290.     end
  291.     if(not looped and effect)then
  292.         Sound.Stopped:connect(function()
  293.             Sound.Volume = 0
  294.             Sound:destroy()
  295.         end)
  296.     elseif(effect)then
  297.         warn("Sound can't be looped and a sound effect!")
  298.     end
  299.     Sound.Parent =parent or Torso
  300.     return Sound
  301. end
  302.  
  303. function PositiveAngle(NUMBER)
  304.     if NUMBER >= 0 then
  305.         NUMBER = 0
  306.     end
  307.     return NUMBER
  308. end
  309.  
  310. function NegativeAngle(NUMBER)
  311.     if NUMBER <= 0 then
  312.         NUMBER = 0
  313.     end
  314.     return NUMBER
  315. end
  316.  
  317. function Swait(NUMBER)
  318.     if NUMBER == 0 or NUMBER == nil then
  319.         ArtificialHB.Event:wait()
  320.     else
  321.         for i = 1, NUMBER do
  322.             ArtificialHB.Event:wait()
  323.         end
  324.     end
  325. end
  326.  
  327. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  328.     local NEWMESH = IT(MESH)
  329.     if MESH == "SpecialMesh" then
  330.         NEWMESH.MeshType = MESHTYPE
  331.         if MESHID ~= "nil" and MESHID ~= "" then
  332.             NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  333.         end
  334.         if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  335.             NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  336.         end
  337.     end
  338.     NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  339.     NEWMESH.Scale = SCALE
  340.     NEWMESH.Parent = PARENT
  341.     return NEWMESH
  342. end
  343.  
  344. function thread(f)
  345.     coroutine.resume(coroutine.create(f))
  346. end
  347. function clerp(a, b, t)
  348.     local qa = {
  349.         QuaternionFromCFrame(a)
  350.     }
  351.     local qb = {
  352.         QuaternionFromCFrame(b)
  353.     }
  354.     local ax, ay, az = a.x, a.y, a.z
  355.     local bx, by, bz = b.x, b.y, b.z
  356.     local _t = 1 - t
  357.     return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  358. end
  359. function QuaternionFromCFrame(cf)
  360.     local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  361.     local trace = m00 + m11 + m22
  362.     if trace > 0 then
  363.         local s = math.sqrt(1 + trace)
  364.         local recip = 0.5 / s
  365.         return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  366.     else
  367.         local i = 0
  368.         if m00 < m11 then
  369.             i = 1
  370.         end
  371.         if m22 > (i == 0 and m00 or m11) then
  372.             i = 2
  373.         end
  374.         if i == 0 then
  375.             local s = math.sqrt(m00 - m11 - m22 + 1)
  376.             local recip = 0.5 / s
  377.             return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  378.         elseif i == 1 then
  379.             local s = math.sqrt(m11 - m22 - m00 + 1)
  380.             local recip = 0.5 / s
  381.             return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  382.         elseif i == 2 then
  383.             local s = math.sqrt(m22 - m00 - m11 + 1)
  384.             local recip = 0.5 / s
  385.             return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  386.         end
  387.     end
  388. end
  389. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  390.     local xs, ys, zs = x + x, y + y, z + z
  391.     local wx, wy, wz = w * xs, w * ys, w * zs
  392.     local xx = x * xs
  393.     local xy = x * ys
  394.     local xz = x * zs
  395.     local yy = y * ys
  396.     local yz = y * zs
  397.     local zz = z * zs
  398.     return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  399. end
  400. function QuaternionSlerp(a, b, t)
  401.     local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  402.     local startInterp, finishInterp
  403.     if cosTheta >= 1.0E-4 then
  404.         if 1 - cosTheta > 1.0E-4 then
  405.             local theta = math.acos(cosTheta)
  406.             local invSinTheta = 1 / Sin(theta)
  407.             startInterp = Sin((1 - t) * theta) * invSinTheta
  408.             finishInterp = Sin(t * theta) * invSinTheta
  409.         else
  410.             startInterp = 1 - t
  411.             finishInterp = t
  412.         end
  413.     elseif 1 + cosTheta > 1.0E-4 then
  414.         local theta = math.acos(-cosTheta)
  415.         local invSinTheta = 1 / Sin(theta)
  416.         startInterp = Sin((t - 1) * theta) * invSinTheta
  417.         finishInterp = Sin(t * theta) * invSinTheta
  418.     else
  419.         startInterp = t - 1
  420.         finishInterp = t
  421.     end
  422.     return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  423. end
  424. function rayCast(Position, Direction, Range, Ignore)
  425.     return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  426. end
  427. local RbxUtility = LoadLibrary("RbxUtility")
  428. local Create = RbxUtility.Create
  429.  
  430. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  431.     local NEWPART = IT("Part")
  432.     NEWPART.formFactor = FORMFACTOR
  433.     NEWPART.Reflectance = REFLECTANCE
  434.     NEWPART.Transparency = TRANSPARENCY
  435.     NEWPART.CanCollide = false
  436.     NEWPART.Locked = true
  437.     NEWPART.Anchored = true
  438.     if ANCHOR == false then
  439.         NEWPART.Anchored = false
  440.     end
  441.     NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  442.     NEWPART.Name = NAME
  443.     NEWPART.Size = SIZE
  444.     NEWPART.Position = Torso.Position
  445.     NEWPART.Material = MATERIAL
  446.     NEWPART:BreakJoints()
  447.     NEWPART.Parent = PARENT
  448.     return NEWPART
  449. end
  450.  
  451.     local function weldBetween(a, b)
  452.         local weldd = Instance.new("ManualWeld")
  453.         weldd.Part0 = a
  454.         weldd.Part1 = b
  455.         weldd.C0 = CFrame.new()
  456.         weldd.C1 = b.CFrame:inverse() * a.CFrame
  457.         weldd.Parent = a
  458.         return weldd
  459.     end
  460.  
  461.  
  462. function QuaternionFromCFrame(cf)
  463.     local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  464.     local trace = m00 + m11 + m22
  465.     if trace > 0 then
  466.         local s = math.sqrt(1 + trace)
  467.         local recip = 0.5 / s
  468.         return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  469.     else
  470.         local i = 0
  471.         if m11 > m00 then
  472.             i = 1
  473.         end
  474.         if m22 > (i == 0 and m00 or m11) then
  475.             i = 2
  476.         end
  477.         if i == 0 then
  478.             local s = math.sqrt(m00 - m11 - m22 + 1)
  479.             local recip = 0.5 / s
  480.             return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  481.         elseif i == 1 then
  482.             local s = math.sqrt(m11 - m22 - m00 + 1)
  483.             local recip = 0.5 / s
  484.             return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  485.         elseif i == 2 then
  486.             local s = math.sqrt(m22 - m00 - m11 + 1)
  487.             local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  488.         end
  489.     end
  490. end
  491.  
  492. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  493.     local xs, ys, zs = x + x, y + y, z + z
  494.     local wx, wy, wz = w * xs, w * ys, w * zs
  495.     local xx = x * xs
  496.     local xy = x * ys
  497.     local xz = x * zs
  498.     local yy = y * ys
  499.     local yz = y * zs
  500.     local zz = z * zs
  501.     return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  502. end
  503.  
  504. function QuaternionSlerp(a, b, t)
  505.     local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  506.     local startInterp, finishInterp;
  507.     if cosTheta >= 0.0001 then
  508.         if (1 - cosTheta) > 0.0001 then
  509.             local theta = ACOS(cosTheta)
  510.             local invSinTheta = 1 / SIN(theta)
  511.             startInterp = SIN((1 - t) * theta) * invSinTheta
  512.             finishInterp = SIN(t * theta) * invSinTheta
  513.         else
  514.             startInterp = 1 - t
  515.             finishInterp = t
  516.         end
  517.     else
  518.         if (1 + cosTheta) > 0.0001 then
  519.             local theta = ACOS(-cosTheta)
  520.             local invSinTheta = 1 / SIN(theta)
  521.             startInterp = SIN((t - 1) * theta) * invSinTheta
  522.             finishInterp = SIN(t * theta) * invSinTheta
  523.         else
  524.             startInterp = t - 1
  525.             finishInterp = t
  526.         end
  527.     end
  528.     return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  529. end
  530.  
  531. function Clerp(a, b, t)
  532.     local qa = {QuaternionFromCFrame(a)}
  533.     local qb = {QuaternionFromCFrame(b)}
  534.     local ax, ay, az = a.x, a.y, a.z
  535.     local bx, by, bz = b.x, b.y, b.z
  536.     local _t = 1 - t
  537.     return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  538. end
  539.  
  540. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  541.     local frame = IT("Frame")
  542.     frame.BackgroundTransparency = TRANSPARENCY
  543.     frame.BorderSizePixel = BORDERSIZEPIXEL
  544.     frame.Position = POSITION
  545.     frame.Size = SIZE
  546.     frame.BackgroundColor3 = COLOR
  547.     frame.BorderColor3 = BORDERCOLOR
  548.     frame.Name = NAME
  549.     frame.Parent = PARENT
  550.     return frame
  551. end
  552.  
  553. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  554.     local label = IT("TextLabel")
  555.     label.BackgroundTransparency = 1
  556.     label.Size = UD2(1, 0, 1, 0)
  557.     label.Position = UD2(0, 0, 0, 0)
  558.     label.TextColor3 = TEXTCOLOR
  559.     label.TextStrokeTransparency = STROKETRANSPARENCY
  560.     label.TextTransparency = TRANSPARENCY
  561.     label.FontSize = TEXTFONTSIZE
  562.     label.Font = TEXTFONT
  563.     label.BorderSizePixel = BORDERSIZEPIXEL
  564.     label.TextStrokeColor3 = C3(1,1,1)
  565.     label.TextScaled = false
  566.     label.Text = TEXT
  567.     label.Name = NAME
  568.     label.Parent = PARENT
  569.     return label
  570. end
  571.  
  572. function NoOutlines(PART)
  573.     PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  574. end
  575.  
  576. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  577.     local NEWWELD = IT(TYPE)
  578.     NEWWELD.Part0 = PART0
  579.     NEWWELD.Part1 = PART1
  580.     NEWWELD.C0 = C0
  581.     NEWWELD.C1 = C1
  582.     NEWWELD.Parent = PARENT
  583.     return NEWWELD
  584. end
  585.  
  586. local S = IT("Sound")
  587. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  588.     local NEWSOUND = nil
  589.     coroutine.resume(coroutine.create(function()
  590.         NEWSOUND = S:Clone()
  591.         NEWSOUND.Parent = PARENT
  592.         NEWSOUND.Volume = VOLUME
  593.         NEWSOUND.Pitch = PITCH
  594.         NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  595.         NEWSOUND:play()
  596.         if DOESLOOP == true then
  597.             NEWSOUND.Looped = true
  598.         else
  599.             repeat wait(1) until NEWSOUND.Playing == false
  600.             NEWSOUND:remove()
  601.         end
  602.     end))
  603.     return NEWSOUND
  604. end
  605.  
  606. function CFrameFromTopBack(at, top, back)
  607.     local right = top:Cross(back)
  608.     return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  609. end
  610.  
  611. --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  612. function WACKYEFFECT(Table)
  613.     local TYPE = (Table.EffectType or "Sphere")
  614.     local SIZE = (Table.Size or VT(1,1,1))
  615.     local ENDSIZE = (Table.Size2 or VT(0,0,0))
  616.     local TRANSPARENCY = (Table.Transparency or 0)
  617.     local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  618.     local CFRAME = (Table.CFrame or Torso.CFrame)
  619.     local MOVEDIRECTION = (Table.MoveToPos or nil)
  620.     local ROTATION1 = (Table.RotationX or 0)
  621.     local ROTATION2 = (Table.RotationY or 0)
  622.     local ROTATION3 = (Table.RotationZ or 0)
  623.     local MATERIAL = (Table.Material or "Neon")
  624.     local COLOR = (Table.Color or C3(1,1,1))
  625.     local TIME = (Table.Time or 45)
  626.     local SOUNDID = (Table.SoundID or nil)
  627.     local SOUNDPITCH = (Table.SoundPitch or nil)
  628.     local SOUNDVOLUME = (Table.SoundVolume or nil)
  629.     coroutine.resume(coroutine.create(function()
  630.         local PLAYSSOUND = false
  631.         local SOUND = nil
  632.         local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  633.         if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  634.             PLAYSSOUND = true
  635.             SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  636.         end
  637.         EFFECT.Color = COLOR
  638.         local MSH = nil
  639.         if TYPE == "Sphere" then
  640.             MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  641.         elseif TYPE == "Block" then
  642.             MSH = IT("BlockMesh",EFFECT)
  643.             MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  644.         elseif TYPE == "Wave" then
  645.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  646.         elseif TYPE == "Ring" then
  647.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  648.         elseif TYPE == "Slash" then
  649.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  650.         elseif TYPE == "Round Slash" then
  651.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  652.         elseif TYPE == "Swirl" then
  653.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  654.         elseif TYPE == "Skull" then
  655.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  656.         elseif TYPE == "Crystal" then
  657.             MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  658.         end
  659.         if MSH ~= nil then
  660.             local MOVESPEED = nil
  661.             if MOVEDIRECTION ~= nil then
  662.                 MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  663.             end
  664.             local GROWTH = SIZE - ENDSIZE
  665.             local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  666.             if TYPE == "Block" then
  667.                 EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  668.             else
  669.                 EFFECT.CFrame = CFRAME
  670.             end
  671.             for LOOP = 1, TIME+1 do
  672.                 Swait()
  673.                 MSH.Scale = MSH.Scale - GROWTH/TIME
  674.                 if TYPE == "Wave" then
  675.                     MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  676.                 end
  677.                 EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  678.                 if TYPE == "Block" then
  679.                     EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  680.                 else
  681.                     EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  682.                 end
  683.                 if MOVEDIRECTION ~= nil then
  684.                     local ORI = EFFECT.Orientation
  685.                     EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  686.                     EFFECT.Orientation = ORI
  687.                 end
  688.             end
  689.             if PLAYSSOUND == false then
  690.                 EFFECT:remove()
  691.             else
  692.                 repeat Swait() until SOUND.Playing == false
  693.                 EFFECT:remove()
  694.             end
  695.         else
  696.             if PLAYSSOUND == false then
  697.                 EFFECT:remove()
  698.             else
  699.                 repeat Swait() until SOUND.Playing == false
  700.                 EFFECT:remove()
  701.             end
  702.         end
  703.     end))
  704. end
  705.  
  706. function MakeForm(PART,TYPE)
  707.     if TYPE == "Cyl" then
  708.         local MSH = IT("CylinderMesh",PART)
  709.     elseif TYPE == "Ball" then
  710.         local MSH = IT("SpecialMesh",PART)
  711.         MSH.MeshType = "Sphere"
  712.     elseif TYPE == "Wedge" then
  713.         local MSH = IT("SpecialMesh",PART)
  714.         MSH.MeshType = "Wedge"
  715.     end
  716. end
  717.  
  718. Debris = game:GetService("Debris")
  719.  
  720. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  721.     local DIRECTION = CF(StartPos,EndPos).lookVector
  722.     return Raycast(StartPos, DIRECTION, Distance, Ignore)
  723. end
  724.  
  725. function turnto(position)
  726.     RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  727. end
  728. ---
  729. function OBJECTION()
  730.     Humanoid.WalkSpeed = 0
  731.     ATTACK = true
  732.     Humanoid.JumpPower = 0
  733.     Humanoid.WalkSpeed = 0
  734.     local table = Instance.new('Part', Character)
  735.     table.Size = Vector3.new(Player_Size*4,Player_Size*4,Player_Size*3)
  736.     table.Anchored = true
  737.     table.Material = 'Wood'
  738.     table.BrickColor = BrickColor.new('Brown')
  739.     table.CFrame = RootPart.CFrame * CFrame.new(0,-Player_Size*2,-Player_Size*3)
  740.     table.Parent = game.workspace
  741. local sick = Instance.new("Sound",Torso)
  742. sick.SoundId = "rbxassetid://148144056"
  743.     sick.Looped = false
  744.     sick.Pitch = 1
  745.     sick.Volume = 10
  746.     sick.Parent = Torso
  747.     sick:Resume()
  748.     local hit = table.Touched:connect(function(hit)
  749.           hit:BreakJoints()
  750.             end)
  751.  
  752.         wait(0.1)
  753.         local sl = Instance.new('Sound', Head)
  754.         sl.SoundId = 'rbxassetid://' ..phoenix.slam
  755.         sl.Volume = 10
  756.         sl:Play()
  757.  
  758.         wait(0.6)
  759.         Humanoid.JumpPower = 50
  760.         Humanoid.WalkSpeed = 16
  761.         table:Destroy()
  762. wait(4)
  763.     ATTACK = false
  764. end
  765. function takedat()
  766. ATTACK = true
  767. local sick = Instance.new("Sound",Torso)
  768. sick.SoundId = "rbxassetid://135165859"
  769.     sick.Looped = false
  770.     sick.Pitch = 1
  771.     sick.Volume = 10
  772.     sick.Parent = Torso
  773.     sick:Resume()
  774. wait(2)
  775. ATTACK = false
  776. end
  777. function HOLDIT2()
  778.     if Mouse.Target ~= nil then
  779.         if Mouse.Target.Parent ~= Character and Mouse.Target.Parent.Parent ~= Character and Mouse.Target.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
  780. local HUM = Mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
  781. local TORSO = HUM.Parent:FindFirstChild("Torso") or HUM.Parent:FindFirstChild("UpperTorso")
  782. warn'Hit'
  783. HUM.WalkSpeed = 0
  784. HUM.JumpPower = 0
  785.         end
  786.     end
  787. end
  788. function HOLDIT()
  789. ATTACK = true
  790. local sick = Instance.new("Sound",Torso)
  791. sick.SoundId = "rbxassetid://135166344"
  792.     sick.Looped = false
  793.     sick.Pitch = 1
  794.     sick.Volume = 10
  795.     sick.Parent = Torso
  796.     sick:Resume()
  797. HOLDIT2()
  798. wait(3)
  799. ATTACK = false
  800. end
  801. ---
  802. function MouseDown(Mouse)
  803.     HOLD = true
  804.     if ATTACK == false then
  805.     end
  806. end
  807.  
  808. function MouseUp(Mouse)
  809. HOLD = false
  810. end
  811.  
  812. function KeyDown(Key)
  813.     KEYHOLD = true
  814.  
  815.     if Key == "z" and ATTACK == false then
  816.           OBJECTION()
  817.     end
  818.  
  819.     if Key == "x" and ATTACK == false then
  820.            takedat()
  821.     end
  822.  
  823.     if Key == "c" and ATTACK == false then
  824.             HOLDIT()
  825.     end
  826.  
  827.     if Key == "v" and ATTACK == false then
  828.  
  829.     end
  830. end
  831.  
  832. function KeyUp(Key)
  833.     KEYHOLD = false
  834. end
  835.  
  836.     Mouse.Button1Down:connect(function(NEWKEY)
  837.         MouseDown(NEWKEY)
  838.     end)
  839.     Mouse.Button1Up:connect(function(NEWKEY)
  840.         MouseUp(NEWKEY)
  841.     end)
  842.     Mouse.KeyDown:connect(function(NEWKEY)
  843.         KeyDown(NEWKEY)
  844.     end)
  845.     Mouse.KeyUp:connect(function(NEWKEY)
  846.         KeyUp(NEWKEY)
  847.     end)
  848. ----
  849. local SKILLTEXTCOLOR = BRICKC"Blue".Color
  850. local SKILLFONT = "Code"
  851. local SKILLTEXTSIZE = 8
  852.  
  853. local SKILL1FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.23, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
  854. local SKILL2FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.50, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
  855. local SKILL3FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.23, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
  856. local SKILL4FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.50, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
  857.  
  858. local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] OBJECTION!", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 1")
  859. local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[X] Take That!", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 2")
  860. local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Hold It!", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 3")
  861. local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Beta", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 4")
  862. ----
  863. Humanoid.DisplayDistanceType = "None"
  864. local naeeym2 = IT("BillboardGui",Character)
  865. naeeym2.AlwaysOnTop = true
  866. naeeym2.Size = UDim2.new(5,35,2,15)
  867. naeeym2.StudsOffset = Vector3.new(0,2,0)
  868. naeeym2.MaxDistance = 75
  869. naeeym2.Adornee = Character.Head
  870. naeeym2.Name = "Name"
  871. local tecks2 = IT("TextLabel",naeeym2)
  872. tecks2.BackgroundTransparency = 1
  873. tecks2.TextScaled = true
  874. tecks2.BorderSizePixel = 0
  875. tecks2.Text = ""
  876. tecks2.Font = "Code"
  877. tecks2.TextSize = 30
  878. tecks2.TextStrokeTransparency = 0
  879. tecks2.TextColor3 = C3(1,1,1)
  880. tecks2.TextStrokeColor3 = C3(0/0, 111/0, 0/0)
  881. tecks2.Size = UDim2.new(1,0,0.5,0)
  882. tecks2.Parent = naeeym2
  883. ----
  884. Muted = false
  885. while true do
  886. wait(0.2)
  887.    if(not Music or not Music.Parent)then
  888.         local tPos = 0
  889.         pcall(function()tPos = Music.TimePosition; Music:destroy() end)
  890.         Music = Sound(Character,MusicID,1,10,true,false,true)
  891.         Music.Name = 'Music'
  892.         Music.TimePosition = tPos
  893.     end
  894.     Music.SoundId = "rbxassetid://"..MusicID
  895.     Music.Pitch = 1
  896.     Music.Volume = 10
  897.     if(not Muted)then
  898.         Music:Resume()
  899.     else
  900.         Music:Pause()
  901.     end
  902. wait(0.2)
  903. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement