Advertisement
DarkScriptZEditors

UnoCards FE

Nov 21st, 2018
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.64 KB | None | 0 0
  1. --[[ Made by KillerDarkness0105/Codex#6685, Because uno is a good meme and you should all play it. ]]--
  2.  
  3. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  4. local Player,game,owner = owner,game
  5. local RealPlayer = Player
  6. do
  7. print("FE Compatibility code by Mokiros")
  8. local rp = RealPlayer
  9. script.Parent = rp.Character
  10.  
  11. --RemoteEvent for communicating
  12. local Event = Instance.new("RemoteEvent")
  13. Event.Name = "UserInput_Event"
  14.  
  15. --Fake event to make stuff like Mouse.KeyDown work
  16. local function fakeEvent()
  17. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  18. t.connect = t.Connect
  19. return t
  20. end
  21.  
  22. --Creating fake input objects with fake variables
  23. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  24. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  25. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  26. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  27. end}
  28. --Merged 2 functions into one by checking amount of arguments
  29. CAS.UnbindAction = CAS.BindAction
  30.  
  31. --This function will trigger the events that have been :Connect()'ed
  32. local function te(self,ev,...)
  33. local t = m[ev]
  34. if t and t._fakeEvent then
  35. for _,f in pairs(t.Functions) do
  36. f(...)
  37. end
  38. end
  39. end
  40. m.TrigEvent = te
  41. UIS.TrigEvent = te
  42.  
  43. Event.OnServerEvent:Connect(function(plr,io)
  44. if plr~=rp then return end
  45. m.Target = io.Target
  46. m.Hit = io.Hit
  47. if not io.isMouse then
  48. local b = io.UserInputState == Enum.UserInputState.Begin
  49. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  50. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  51. end
  52. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  53. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  54. end
  55. for _,t in pairs(CAS.Actions) do
  56. for _,k in pairs(t.Keys) do
  57. if k==io.KeyCode then
  58. t.Function(t.Name,io.UserInputState,io)
  59. end
  60. end
  61. end
  62. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  63. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  64. end
  65. end)
  66. Event.Parent = NLS([==[
  67. local Player = game:GetService("Players").LocalPlayer
  68. local Event = script:WaitForChild("UserInput_Event")
  69. local Mouse = Player:GetMouse()
  70. local UIS = game:GetService("UserInputService")
  71. local input = function(io,a)
  72. if a then return end
  73. --Since InputObject is a client-side instance, we create and pass table instead
  74. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  75. end
  76. UIS.InputBegan:Connect(input)
  77. UIS.InputEnded:Connect(input)
  78. local h,t
  79. --Give the server mouse data 30 times every second, but only if the values changed
  80. --If player is not moving their mouse, client won't fire events
  81. while wait(1/30) do
  82. if h~=Mouse.Hit or t~=Mouse.Target then
  83. h,t=Mouse.Hit,Mouse.Target
  84. Event:FireServer({isMouse=true,Target=t,Hit=h})
  85. end
  86. end]==],Player.Character)
  87.  
  88. ----Sandboxed game object that allows the usage of client-side methods and services
  89. --Real game object
  90. local _rg = game
  91.  
  92. --Metatable for fake service
  93. local fsmt = {
  94. __index = function(self,k)
  95. local s = rawget(self,"_RealService")
  96. if s then
  97. return typeof(s[k])=="function"
  98. and function(_,...)return s[k](s,...)end or s[k]
  99. end
  100. end,
  101. __newindex = function(self,k,v)
  102. local s = rawget(self,"_RealService")
  103. if s then s[k]=v end
  104. end
  105. }
  106. local function FakeService(t,RealService)
  107. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  108. return setmetatable(t,fsmt)
  109. end
  110.  
  111. --Fake game object
  112. local g = {
  113. GetService = function(self,s)
  114. return rawget(self,s) or _rg:GetService(s)
  115. end,
  116. Players = FakeService({
  117. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  118. },"Players"),
  119. UserInputService = FakeService(UIS,"UserInputService"),
  120. ContextActionService = FakeService(CAS,"ContextActionService"),
  121. RunService = FakeService({
  122. _btrs = {},
  123. RenderStepped = _rg:GetService("RunService").Heartbeat,
  124. BindToRenderStep = function(self,name,_,fun)
  125. self._btrs[name] = self.Heartbeat:Connect(fun)
  126. end,
  127. UnbindFromRenderStep = function(self,name)
  128. self._btrs[name]:Disconnect()
  129. end,
  130. },"RunService")
  131. }
  132. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  133. g.service = g.GetService
  134. FakeService(g,game)
  135. --Changing owner to fake player object to support owner:GetMouse()
  136. game,owner = g,g.Players.LocalPlayer
  137. end
  138.  
  139.  
  140.  
  141. Player=game:GetService("Players").LocalPlayer
  142. Character=Player.Character
  143. LeftArm=Character["Left Arm"]
  144. LeftLeg=Character["Left Leg"]
  145. RightArm=Character["Right Arm"]
  146. RightLeg=Character["Right Leg"]
  147. Torso=Character.Torso
  148. Head=Character.Head
  149. Humanoid=Character.Humanoid
  150. local mouse = Player:GetMouse()
  151. angles=CFrame.Angles
  152. it=Instance.new
  153. attacktype=1
  154. vt=Vector3.new
  155. cf=CFrame.new
  156. euler=CFrame.fromEulerAnglesXYZ
  157. angles=CFrame.Angles
  158. RootPart=Character.HumanoidRootPart
  159. RootJoint=RootPart.RootJoint
  160. local attack = false
  161. local Effects = {}
  162. m = game.Players.LocalPlayer
  163. char = m.Character
  164. local txt = Instance.new("BillboardGui", char)
  165. txt.Adornee = char .Head
  166. txt.Name = "_status"
  167. txt.Size = UDim2.new(2, 0, 1.2, 0)
  168. txt.StudsOffset = Vector3.new(-9, 8, 0)
  169. local text = Instance.new("TextLabel", txt)
  170. text.Size = UDim2.new(10, 0, 7, 0)
  171. text.FontSize = "Size24"
  172. text.TextScaled = true
  173. text.TextTransparency = 0
  174. text.BackgroundTransparency = 1
  175. text.TextTransparency = 0
  176. text.TextStrokeTransparency = 0
  177. text.Font = "Bodoni"
  178. text.TextStrokeColor3 = Color3.new(0,0,0)
  179.  
  180. v=Instance.new("Part")
  181. v.Name = "ColorBrick"
  182. v.Parent=m.Character
  183. v.FormFactor="Symmetric"
  184. v.Anchored=true
  185. v.CanCollide=false
  186. v.BottomSurface="Smooth"
  187. v.TopSurface="Smooth"
  188. v.Size=Vector3.new(10,5,3)
  189. v.Transparency=1
  190. v.CFrame=char.Torso.CFrame
  191. v.BrickColor=BrickColor.new("Really black")
  192. v.Transparency=1
  193. text.TextColor3 = Color3.new(0,255,255)
  194. v.Shape="Block"
  195. text.Text = ""
  196.  
  197. deb = game:GetService("Debris")
  198.  
  199. function clerp(a,b,t)
  200. local qa = {QuaternionFromCFrame(a)}
  201. local qb = {QuaternionFromCFrame(b)}
  202. local ax, ay, az = a.x, a.y, a.z
  203. local bx, by, bz = b.x, b.y, b.z
  204. local _t = 1-t
  205. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  206. end
  207.  
  208. function QuaternionFromCFrame(cf)
  209. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  210. local trace = m00 + m11 + m22
  211. if trace > 0 then
  212. local s = math.sqrt(1 + trace)
  213. local recip = 0.5/s
  214. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  215. else
  216. local i = 0
  217. if m11 > m00 then
  218. i = 1
  219. end
  220. if m22 > (i == 0 and m00 or m11) then
  221. i = 2
  222. end
  223. if i == 0 then
  224. local s = math.sqrt(m00-m11-m22+1)
  225. local recip = 0.5/s
  226. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  227. elseif i == 1 then
  228. local s = math.sqrt(m11-m22-m00+1)
  229. local recip = 0.5/s
  230. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  231. elseif i == 2 then
  232. local s = math.sqrt(m22-m00-m11+1)
  233. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  234. end
  235. end
  236. end
  237.  
  238. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  239. local xs, ys, zs = x + x, y + y, z + z
  240. local wx, wy, wz = w*xs, w*ys, w*zs
  241. local xx = x*xs
  242. local xy = x*ys
  243. local xz = x*zs
  244. local yy = y*ys
  245. local yz = y*zs
  246. local zz = z*zs
  247. 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))
  248. end
  249. function QuaternionSlerp(a, b, t)
  250. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  251. local startInterp, finishInterp;
  252. if cosTheta >= 0.0001 then
  253. if (1 - cosTheta) > 0.0001 then
  254. local theta = math.acos(cosTheta)
  255. local invSinTheta = 1/math.sin(theta)
  256. startInterp = math.sin((1-t)*theta)*invSinTheta
  257. finishInterp = math.sin(t*theta)*invSinTheta
  258. else
  259. startInterp = 1-t
  260. finishInterp = t
  261. end
  262. else
  263. if (1+cosTheta) > 0.0001 then
  264. local theta = math.acos(-cosTheta)
  265. local invSinTheta = 1/math.sin(theta)
  266. startInterp = math.sin((t-1)*theta)*invSinTheta
  267. finishInterp = math.sin(t*theta)*invSinTheta
  268. else
  269. startInterp = t-1
  270. finishInterp = t
  271. end
  272. end
  273. 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
  274. end
  275.  
  276. --Example: Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.4)
  277.  
  278. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  279. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  280. end
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287. --save shoulders
  288. RSH, LSH=nil, nil
  289. --welds
  290. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  291. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  292. LH=Torso["Left Hip"]
  293. RH=Torso["Right Hip"]
  294. TorsoColor=Torso.BrickColor
  295. function NoOutline(Part)
  296. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  297. end
  298. player=Player
  299. ch=Character
  300. RSH=ch.Torso["Right Shoulder"]
  301. LSH=ch.Torso["Left Shoulder"]
  302. --
  303. RSH.Parent=nil
  304. LSH.Parent=nil
  305. --
  306. RW.Name="Right Shoulder"
  307. RW.Part0=ch.Torso
  308. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  309. RW.C1=cf(0, 0.5, 0)
  310. RW.Part1=ch["Right Arm"]
  311. RW.Parent=ch.Torso
  312. --
  313. LW.Name="Left Shoulder"
  314. LW.Part0=ch.Torso
  315. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  316. LW.C1=cf(0, 0.5, 0)
  317. LW.Part1=ch["Left Arm"]
  318. LW.Parent=ch.Torso
  319.  
  320. Player=game:GetService('Players').LocalPlayer
  321. Character=Player.Character
  322. Mouse=Player:GetMouse()
  323. m=Instance.new('Model',Character)
  324.  
  325.  
  326. local function weldBetween(a, b)
  327. local weldd = Instance.new("ManualWeld")
  328. weldd.Part0 = a
  329. weldd.Part1 = b
  330. weldd.C0 = CFrame.new()
  331. weldd.C1 = b.CFrame:inverse() * a.CFrame
  332. weldd.Parent = a
  333. return weldd
  334. end
  335.  
  336.  
  337.  
  338. function RemoveOutlines(part)
  339. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  340. end
  341.  
  342.  
  343. part = function(formfactor, parent, reflectance, transparency, brickcolor, name, size)
  344. local fp = it("Part")
  345. fp.formFactor = formfactor
  346. fp.Parent = parent
  347. fp.Reflectance = reflectance
  348. fp.Transparency = transparency
  349. fp.CanCollide = false
  350. fp.Locked = true
  351. fp.BrickColor = brickcolor
  352. fp.Name = name
  353. fp.Size = size
  354. fp.Position = Torso.Position
  355. NoOutline(fp)
  356. if fp.BrickColor == BrickColor.new("Dark indigo") then
  357. fp.Material = "Neon"
  358. else
  359. if fp.BrickColor == BrickColor.new("Fossil") then
  360. fp.BrickColor = BrickColor.new("Dark indigo")
  361. fp.Material = "Neon"
  362. else
  363. fp.Material = "Neon"
  364. end
  365. end
  366. fp:BreakJoints()
  367. return fp
  368. end
  369.  
  370. mesh = function(Mesh, part, meshtype, meshid, offset, scale)
  371. local mesh = it(Mesh)
  372. mesh.Parent = part
  373. if Mesh == "SpecialMesh" then
  374. mesh.MeshType = meshtype
  375. mesh.MeshId = meshid
  376. end
  377. mesh.Offset = offset
  378. mesh.Scale = scale
  379. return mesh
  380. end
  381.  
  382. weld = function(parent, part0, part1, c0)
  383. local weld = it("Weld")
  384. weld.Parent = parent
  385. weld.Part0 = part0
  386. weld.Part1 = part1
  387. weld.C0 = c0
  388. return weld
  389. end
  390.  
  391. F1 = Instance.new("Folder", Character)
  392. F1.Name = "Effects Folder"
  393. F2 = Instance.new("Folder", F1)
  394. F2.Name = "Effects"
  395. Triangle = function(a, b, c)
  396. end
  397.  
  398. MagicBlock = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  399. local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
  400. prt.Anchored = true
  401. prt.CanCollide = false
  402. prt.CFrame = cframe
  403. prt.Name = "prt"
  404. msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  405. game:GetService("Debris"):AddItem(prt, 5)
  406. table.insert(Effects, {prt, "Block1", delay, x3, y3, z3})
  407. end
  408.  
  409.  
  410.  
  411. MagicCircle = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  412. local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
  413. prt.Anchored = true
  414. prt.CanCollide = false
  415. prt.CFrame = cframe
  416. prt.Name = "prt"
  417. local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
  418. game:GetService("Debris"):AddItem(prt, 5)
  419. table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3})
  420. end
  421.  
  422. MagicWave = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  423. local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
  424. prt.Anchored = true
  425. prt.CFrame = cframe
  426. local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", vt(0, 0, 0), vt(x1, y1, z1))
  427. game:GetService("Debris"):AddItem(prt, 5)
  428. table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3})
  429. end
  430.  
  431. MagicCylinder = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  432. local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt(0.2, 0.2, 0.2))
  433. prt.Anchored = true
  434. prt.CFrame = cframe
  435. msh = mesh("SpecialMesh", prt, "Head", "", vt(0, 0, 0), vt(x1, y1, z1))
  436. game:GetService("Debris"):AddItem(prt, 5)
  437. Effects[#Effects + 1] = {prt, "Cylinder", delay, x3, y3, z3}
  438. end
  439.  
  440. MagicCylinder2 = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  441. local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt(0.2, 0.2, 0.2))
  442. prt.Anchored = true
  443. prt.CFrame = cframe
  444. msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  445. game:GetService("Debris"):AddItem(prt, 5)
  446. Effects[#Effects + 1] = {prt, "Cylinder", delay, x3, y3, z3}
  447. end
  448.  
  449. MagicBlood = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  450. local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
  451. prt.Anchored = true
  452. prt.CFrame = cframe
  453. local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
  454. game:GetService("Debris"):AddItem(prt, 5)
  455. table.insert(Effects, {prt, "Blood", delay, x3, y3, z3})
  456. end
  457.  
  458. ElecEffect = function(cff, x, y, z)
  459. local prt = part(3, F2, 0, 0, BrickColor.new("Dark indigo"), "Part", vt(1, 1, 1))
  460. prt.Anchored = true
  461. prt.CFrame = cff * cf(math.random(-x, x), math.random(-y, y), math.random(-z, z))
  462. prt.CFrame = cf(prt.Position)
  463. game:GetService("Debris"):AddItem(prt, 2)
  464. xval = math.random() / 2
  465. yval = math.random() / 2
  466. zval = math.random() / 2
  467. msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(xval, yval, zval))
  468. Effects[#Effects + 1] = {prt, "Elec", 0.1, x, y, z, xval, yval, zval}
  469. end
  470.  
  471.  
  472.  
  473.  
  474. ArtificialHB = Instance.new("BindableEvent", script)
  475. ArtificialHB.Name = "Heartbeat"
  476.  
  477. script:WaitForChild("Heartbeat")
  478.  
  479. frame = 1 / 60
  480. tf = 0
  481. allowframeloss = false
  482. tossremainder = false
  483. lastframe = tick()
  484. script.Heartbeat:Fire()
  485.  
  486. game:GetService("RunService").Heartbeat:connect(function(s, p)
  487. tf = tf + s
  488. if tf >= frame then
  489. if allowframeloss then
  490. script.Heartbeat:Fire()
  491. lastframe = tick()
  492. else
  493. for i = 1, math.floor(tf / frame) do
  494. script.Heartbeat:Fire()
  495. end
  496. lastframe = tick()
  497. end
  498. if tossremainder then
  499. tf = 0
  500. else
  501. tf = tf - frame * math.floor(tf / frame)
  502. end
  503. end
  504. end)
  505.  
  506. function swait(num)
  507. if num == 0 or num == nil then
  508. ArtificialHB.Event:wait()
  509. else
  510. for i = 0, num do
  511. ArtificialHB.Event:wait()
  512. end
  513. end
  514. end
  515.  
  516.  
  517.  
  518. function Dmgfunc(player,mindamage,maxdamage,waait)
  519.  
  520. dodamage = coroutine.wrap(function()
  521.  
  522. if player ~= Character and player:FindFirstChild("IsHit") == nil then
  523.  
  524. Max = mindamage + math.random(-mindamage,maxdamage)
  525.  
  526. player.Humanoid.Health = player.Humanoid.Health - Max
  527.  
  528.  
  529. local thiing = Instance.new("ObjectValue",player)
  530. thiing.Name = "IsHit"
  531. deb:AddItem(thiing,waait)
  532.  
  533.  
  534. end
  535. end)
  536. dodamage(player,mindamage,maxdamage,waait)
  537. end
  538.  
  539.  
  540.  
  541. local handee = Instance.new("Part")
  542. handee.Parent = Character
  543. handee.Size = Vector3.new(1, 0.3, 1.4)
  544. handee.Archivable = true
  545. handee.Transparency = 0
  546. handee.CanCollide = false
  547. handee.BrickColor = BrickColor.new("Really black")
  548. handee.Material = "SmoothPlastic"
  549. local handeemesh = Instance.new("BlockMesh",handee)
  550. local handeedecal = Instance.new("Decal",handee)
  551. handeedecal.Texture = "rbxassetid://45214611"
  552. local handeedecal2 = Instance.new("Decal",handee)
  553. handeedecal2.Texture = "rbxassetid://45214611"
  554. handeedecal.Face = "Top"
  555. handeedecal2.Face = "Bottom"
  556. local handeeweld = Instance.new("Weld")
  557. handeeweld.Parent = handee
  558. handeeweld.Part0 = RightArm
  559. handeeweld.Part1 = handee
  560. handeeweld.C1 = CFrame.new(0, -0.64, 0.96)*CFrame.Angles(math.rad(90),math.rad(0),math.rad(0))
  561. handeeweld.Part0 = RightArm
  562.  
  563.  
  564.  
  565.  
  566. local music = Instance.new("Sound",Torso)
  567. music.Volume = 1.5
  568. music.PlaybackSpeed = 1
  569. music.Pitch = 1
  570. music.SoundId = "rbxassetid://143994596"--music
  571. music:Play()
  572. music.Name = "The Skid Rekter Music"
  573. music.Looped = true
  574.  
  575.  
  576.  
  577. local size = 0
  578. function card()
  579. local Card = Instance.new("Part",Workspace)
  580. Card.Name = "Shell"
  581. Card.Anchored = false
  582. Card.CanCollide = false
  583. Card.Transparency = 0
  584.  
  585. k = math.random(1,5)
  586. if k == 1 then
  587. Card.BrickColor = BrickColor.new("Toothpaste")
  588. text.Text = "DRAW 69!"
  589. elseif k == 2 then
  590. Card.BrickColor = BrickColor.new("Lime green")
  591. text.Text = "UNO TRAP CARD - HELLA GEY!"
  592. elseif k == 3 then
  593. Card.BrickColor = BrickColor.new("Bright red")
  594. text.Text = "UNO SKIP!"
  595. elseif k == 4 then
  596. Card.BrickColor = BrickColor.new("Really black")
  597. text.Text = "WILD!!!!!!"
  598. elseif k == 5 then
  599. Card.BrickColor = BrickColor.new("New Yeller")
  600. text.Text = "UNO REVERSE!!!"
  601. end
  602.  
  603.  
  604. Card.Size = Vector3.new(1.5,0.05,1)
  605. Card.Material = "SmoothPlastic"
  606. Card.CFrame = handee.CFrame*CFrame.new(0,0,0)
  607. Card.CFrame = CFrame.new(Card.Position,Torso.CFrame.p)
  608. local bv = Instance.new("BodyVelocity",Card)
  609. bv.maxForce = Vector3.new(99999,99999,99999)
  610. bv.velocity = Torso.CFrame.lookVector*120
  611. deb:AddItem(Card, 7)
  612.  
  613.  
  614. Card.Touched:connect(function(hit)
  615. if (hit.Parent.Parent ~= Character and hit.Parent ~= Character and hit.Name ~= "Card" and hit.Name ~= "prt" and Card.Anchored == false) then
  616. Card.Anchored = true
  617. Card.Transparency = 1
  618.  
  619.  
  620. local orbexplode = Instance.new("Sound", Card)
  621. orbexplode.Volume = 0.4
  622. orbexplode.PlayOnRemove = true
  623. orbexplode.SoundId = "http://roblox.com/asset/?id=929619479"
  624. orbexplode.Pitch = 1
  625. orbexplode:Destroy()
  626. deb:AddItem(orbexplode, 4)
  627.  
  628. local Explode = Instance.new("Explosion")
  629. Explode.Position = Card.Position
  630. Explode.Parent = Workspace
  631. Explode.BlastPressure = 0
  632. Explode.BlastRadius = Card.Size.X *1.6
  633. Explode.Visible = false
  634.  
  635. Card:Destroy()
  636. Explode.Hit:connect(function(hit)
  637. if hit.Parent:FindFirstChild("Humanoid")~=nil and hit.Parent:FindFirstChild("IsHit")==nil then
  638. Dmgfunc(hit.Parent,10,20,.01)
  639. end
  640. end)
  641. MagicCircle(BrickColor.new("White"), Card.CFrame * cf(0, 0, 0), 1, 1, 1, 4.2, 4.2, 4.2, 0.02)
  642. end
  643. end)
  644.  
  645. end
  646.  
  647.  
  648.  
  649. mouse.KeyDown:connect(function(key)
  650. if key == "e" and attack == false then
  651. attack = true
  652. card()
  653. for i = 0,0.3,0.1 do
  654. swait()
  655. LW.C0 = clerp(LW.C0, CFrame.new(-1.1, 0.65, -0.5) * angles(math.rad(90), math.rad(0), math.rad(0)), 0.8)
  656. end
  657. for i = 0,0.3,0.1 do
  658. swait()
  659. LW.C0 = clerp(LW.C0, CFrame.new(-1.1, 0.65, -0.5) * angles(math.rad(90), math.rad(0), math.rad(60)), 0.8)
  660. end
  661. attack = false
  662. end
  663. end)
  664.  
  665.  
  666.  
  667.  
  668. mouse.KeyDown:connect(function(key)
  669. if key == "f" and attack == false then
  670. if music.Volume == 1.5 then
  671. music.Volume = 0
  672. else
  673. music.Volume = 1.5
  674. end
  675. end
  676. end)
  677.  
  678. -----RUN BUTTON XDDDDDDDD
  679. mouse.KeyDown:connect(function(key)
  680. if string.byte(key) == 48 then
  681. Character.Humanoid.WalkSpeed = 25
  682. end
  683. end)
  684.  
  685. mouse.KeyUp:connect(function(key)
  686. if string.byte(key) == 48 then
  687. Character.Humanoid.WalkSpeed = 16
  688.  
  689. end
  690. end)
  691. -----XXDDDDDDDDXDDXXDXDXDXDXDDXDXD
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698. while true do
  699. swait()
  700. if attack == false then
  701. RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.34, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-40)), 0.1)
  702. LW.C0 = clerp(LW.C0, CFrame.new(-1.1, 0.65, -0.5) * angles(math.rad(90), math.rad(0), math.rad(60)), 0.1)
  703. end
  704. if 0 < #Effects then
  705. for e = 1, #Effects do
  706. if Effects[e] ~= nil then
  707. local Thing = Effects[e]
  708. if Thing ~= nil then
  709. local Part = Thing[1]
  710. local Mode = Thing[2]
  711. local Delay = Thing[3]
  712. local IncX = Thing[4]
  713. local IncY = Thing[5]
  714. local IncZ = Thing[6]
  715. if Thing[1].Transparency <= 1 then
  716. if Thing[2] == "Block1" then
  717. Thing[1].CFrame = Thing[1].CFrame * euler(math.random(-80, 80), math.random(-80, 80), math.random(-80, 80))
  718. Mesh = Thing[1]:FindFirstChild("Mesh")
  719. if not Mesh then
  720. Mesh = Instance.new("BlockMesh")
  721. end
  722. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  723. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  724. elseif Thing[2] == "Cylinder" then
  725. Mesh = Thing[1]:FindFirstChild("Mesh")
  726. if not Mesh then
  727. Mesh = Instance.new("BlockMesh")
  728. end
  729. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  730. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  731. elseif Thing[2] == "Blood" then
  732. Mesh = Thing[1]:FindFirstChild("Mesh")
  733. if not Mesh then
  734. Mesh = Instance.new("BlockMesh")
  735. end
  736. Thing[1].CFrame = Thing[1].CFrame * cf(0, 0.5, 0)
  737. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  738. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  739. elseif Thing[2] == "Elec" then
  740. Mesh = Thing[1]:FindFirstChild("Mesh")
  741. if not Mesh then
  742. Mesh = Instance.new("BlockMesh")
  743. end
  744. Mesh.Scale = Mesh.Scale + vt(Thing[7], Thing[8], Thing[9])
  745. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  746. elseif Thing[2] == "Disappear" then
  747. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  748. end
  749. else
  750. Part.Parent = nil
  751. Part:Destroy()
  752. --game:GetService("Debris"):AddItem(Part, 0)
  753. table.remove(Effects, e)
  754. end
  755. end
  756. end
  757. end
  758. end
  759. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement