Advertisement
DylanD2003

Untitled

Sep 24th, 2017
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.99 KB | None | 0 0
  1. ------------------
  2. --FIJJET SPINNUH--
  3. ------------------
  4. --By --
  5. --CKbackup-
  6. -----------
  7.  
  8. player = game.Players.LocalPlayer
  9. chara = player.Character
  10. debby = game.Debris
  11. Mouse = player:GetMouse()
  12. rs = game:GetService("RunService").RenderStepped
  13. speedo = 20
  14. mode = "Drop"
  15.  
  16. sound = Instance.new("Sound", Character)
  17. sound.SoundId = "rbxassetid://164854108"
  18. sound.Volume = 100000000
  19. sound.EmitterSize = 25
  20. sound:Play()
  21. sound.Looped = true
  22. Face = Head.face
  23. Neck = Torso.Neck
  24. it = Instance.new
  25. vt = Vector3.new
  26. cf = CFrame.new
  27. rad = math.rad
  28. euler = CFrame.fromEulerAnglesXYZ
  29. angles = CFrame.Angles
  30. Mouse = Player:GetMouse()
  31. coroutine.resume(coroutine.create(function()
  32. game.StarterGui:SetCore("ChatMakeSystemMessage", {
  33. Text = "Dance time. :3";
  34. Color = Color3.new(0, 1, 1);
  35. Font = Enum.Font.Code;
  36. FontSize = Enum.FontSize.Size24;
  37. })
  38. end))
  39.  
  40. --Outfit--
  41. New = function(Object, Parent, Name, Data)
  42. local Object = Instance.new(Object)
  43. for Index, Value in pairs(Data or {}) do
  44. Object[Index] = Value
  45. end
  46. Object.Parent = Parent
  47. Object.Name = Name
  48. return Object
  49. end
  50.  
  51.  
  52. SpinnerWeldBlock = New("Part",chara,"SpinnerWeldBlock",{Transparency = 1,Transparency = 1,Size = Vector3.new(0.600000024, 0.200000003, 0.599999964),CFrame = CFrame.new(-27.7000008, 2.10000014, 9.10000038, 1, 0, 0, 0, 1, 0, 0, 0, 1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
  53. Weld = New("ManualWeld",SpinnerWeldBlock,"Weld",{Part0 = SpinnerWeldBlock,Part1 = chara["Right Arm"],C1 = CFrame.new(-0.200000763, -0.899999619, -0.600000143, 1, 0, 0, 0, 0, 1, -0, -1, -0),})
  54. FIJJETSPINNUH = New("Part",chara,"FIJJETSPINNUH",{BrickColor = BrickColor.new("Bright red"),Size = Vector3.new(1.4000001, 0.200000003, 1.39999998),CFrame = CFrame.new(-27.7000008, 2.10000014, 9.10000038, 1, 0, 0, 0, 1, 0, 0, 0, 1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.768628, 0.156863, 0.109804),})
  55. FidgetSpinnerMesh = New("SpecialMesh",FIJJETSPINNUH,"FidgetSpinnerMesh",{Offset = Vector3.new(0, 0, -0.135000005),Scale = Vector3.new(3.5, 6, 3.5),MeshId = "rbxassetid://785024366",MeshType = Enum.MeshType.FileMesh,})
  56. SpinnerWeightOverlay = New("Decal",FIJJETSPINNUH,"SpinnerWeightOverlay",{Face = Enum.NormalId.Top,Texture = "rbxassetid://785492382",})
  57. FIJJETSPINNUHWELD = New("ManualWeld",FIJJETSPINNUH,"FIJJETSPINNUHWELD",{Part0 = FIJJETSPINNUH,Part1 = SpinnerWeldBlock,})
  58.  
  59. ScreenGui = New("ScreenGui",player.PlayerGui,"ScreenGui",{})
  60. Frame = New("Frame",ScreenGui,"Frame",{Size = UDim2.new(0, 150, 0, 200),Position = UDim2.new(1,0,.5,0),AnchorPoint = Vector2.new(1,0)})
  61. ColourLabel = New("TextLabel",Frame,"ColourLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Text = "Spinner BrickColor"})
  62. BrickColorBox = New("TextBox",Frame,"BrickColorBox",{Size = UDim2.new(0.8, 0, 0.1, 0),Position = UDim2.new(.1,0,.1,0),Text = "(BrickColor here)"})
  63. TextureBox = New("TextBox",Frame,"TextureBox",{Size = UDim2.new(0.8, 0, 0.1, 0),Position = UDim2.new(.1,0,.3,0),Text = "(Decal ID here)"})
  64. TextureLabel = New("TextLabel",Frame,"TextureLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.2,0),Text = "Spinner Texture"})
  65. RefTraLabel = New("TextLabel",Frame,"RefTraLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.4,0),Text = "Reflect/Transparent"})
  66. ReflectBox = New("TextBox",Frame,"ReflectBox",{Size = UDim2.new(0.4, 0, 0.1, 0),Position = UDim2.new(.1,0,.5,0),Text = "0"})
  67. TransBox = New("TextBox",Frame,"TransBox",{Size = UDim2.new(0.4, 0, 0.1, 0),Position = UDim2.new(.5,0,.5,0),Text = "0"})
  68. SpeedLabel = New("TextLabel",Frame,"SpeedLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.6,0),Text = "Spin Speed"})
  69. SpeedBox = New("TextBox",Frame,"SpeedBox",{Size = UDim2.new(0.8, 0, 0.1, 0),Position = UDim2.new(.1,0,.7,0),Text = "20"})
  70. ModeLabel = New("TextLabel",Frame,"ModeLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.8,0),Text = "Mode (Switch with Q or E)"})
  71. CurrentModeLabel = New("TextLabel",Frame,"CurrentModeLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.9,0),Text = "Drop"})
  72. CloseButton = New("TextButton",ScreenGui,"CloseButton",{Size = UDim2.new(0, 50, 0, 25),Position = UDim2.new(),AnchorPoint = Vector2.new(1,1),Position = UDim2.new(1,0,.5,0),Text = "Close"})
  73.  
  74. CloseButton.MouseButton1Click:connect(function()
  75. if Frame.Visible == true then
  76. Frame.Visible = false
  77. CloseButton.Text = "Open"
  78. elseif Frame.Visible == false then
  79. Frame.Visible = true
  80. CloseButton.Text = "Close"
  81. end
  82. end)
  83.  
  84. TextureBox.Changed:connect(function()
  85. FidgetSpinnerMesh.TextureId = TextureBox.Text
  86. end)
  87.  
  88. BrickColorBox.Changed:connect(function()
  89. FIJJETSPINNUH.BrickColor = BrickColor.new(BrickColorBox.Text)
  90. FidgetSpinnerMesh.TextureId = ""
  91. end)
  92.  
  93. ReflectBox.Changed:connect(function()
  94. FIJJETSPINNUH.Reflectance = ReflectBox.Text
  95. end)
  96.  
  97. TransBox.Changed:connect(function()
  98. FIJJETSPINNUH.Transparency = TransBox.Text
  99. end)
  100.  
  101. SpeedBox.Changed:connect(function()
  102. if SpeedBox.Text ~= "" then
  103. speedo = SpeedBox.Text
  104. end
  105. end)
  106.  
  107. function CreateTrailObj(parent,color1,color2,ofsx,ofsz)
  108. local Att1 = New("Attachment",parent,"Att1",{Position = Vector3.new(ofsx,parent.Size.Y/2,ofsz)})
  109. local Att2 = New("Attachment",parent,"Att2",{Position = Vector3.new(ofsx,-(parent.Size.Y/2),ofsz)})
  110. local TEff = New("Trail",parent,"TrailEff",{Color = ColorSequence.new({ColorSequenceKeypoint.new(0,BrickColor.new(color1).Color),ColorSequenceKeypoint.new(1,BrickColor.new(color2).Color)}),Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,.5),NumberSequenceKeypoint.new(1,1)}),Attachment0 = Att1,Attachment1 = Att2,Enabled = false,Lifetime = .5,MinLength = .001})
  111. return TEff
  112. end
  113.  
  114. --Clerp Animations--
  115. TC = chara.HumanoidRootPart.RootJoint
  116. HC = chara.Torso.Neck
  117. RAC = chara.Torso["Right Shoulder"]
  118. LAC = chara.Torso["Left Shoulder"]
  119. RLC = chara.Torso["Right Hip"]
  120. LLC = chara.Torso["Left Hip"]
  121. TCF = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  122. HCF = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  123. RACF = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  124. LACF = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  125. RLCF = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  126. LLCF = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  127. RWF = CFrame.new(-1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  128. LWF = CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  129. RLWF = CFrame.new(-.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  130. LLWF = CFrame.new(.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  131. RW = Instance.new("Weld",HC.Parent)
  132. RW.Part1 = HC.Parent
  133. RW.Part0 = chara["Right Arm"]
  134. RW.C0 = RWF
  135.  
  136. function clerp(a,b,c)
  137. return a:lerp(b,c)
  138. end
  139.  
  140. --TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
  141. --HC.C0 = HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-50))
  142. --RW.C0 = (RWF + Vector3.new(1,2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90))
  143. --LW.C0 = LWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(2))
  144.  
  145. RW.C0 = RWF
  146.  
  147. --Idle Clerp--
  148. IRWF = (RWF - Vector3.new(-.2,-.8,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-10),0)
  149.  
  150. function res()
  151. RW.C0 = IRWF
  152. end
  153. res()
  154.  
  155. --Mouse Functions--
  156. function onKeyDown(key)
  157. if key == "q" then
  158. mode = "Drop"
  159. CurrentModeLabel.Text = mode
  160. elseif key == "e" then
  161. mode = "Throw"
  162. CurrentModeLabel.Text = mode
  163. end
  164. end
  165. function onButton1Down()
  166. if mode == "Drop" then
  167. local spinnah = FIJJETSPINNUH:Clone()
  168. spinnah.Parent = workspace
  169. spinnah.Position = FIJJETSPINNUH.Position
  170. spinnah:BreakJoints()
  171. local spinf = Instance.new("BodyAngularVelocity",spinnah)
  172. spinf.AngularVelocity = Vector3.new(0,speedo,0)
  173. spinf.MaxTorque = Vector3.new(speedo,speedo,speedo)
  174. debby:AddItem(spinnah,60)
  175. elseif mode == "Throw" then
  176. local spinnah = FIJJETSPINNUH:Clone()
  177. spinnah.Parent = workspace
  178. spinnah.Position = FIJJETSPINNUH.Position + chara.HumanoidRootPart.CFrame.lookVector*5
  179. spinnah:BreakJoints()
  180. debby:AddItem(spinnah,60)
  181. local spinf = Instance.new("BodyAngularVelocity",spinnah)
  182. spinf.AngularVelocity = Vector3.new(0,speedo,0)
  183. spinf.MaxTorque = Vector3.new(speedo,speedo,speedo)
  184. local faws = Instance.new("BodyForce",spinnah)
  185. faws.Force = Vector3.new(0,spinnah:GetMass()*workspace.Gravity,0)
  186. spinnah.Velocity = chara.HumanoidRootPart.CFrame.lookVector*speedo
  187. spinnah.Touched:connect(function(hit)
  188. if hit.Parent ~= chara and hit.Parent:FindFirstChild("Humanoid") and faws ~= nil then
  189. faws:Destroy()
  190. faws = nil
  191. hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(10,20))
  192. spinf:Destroy()
  193. wait(5)
  194. for i = 0, 1, .1 do
  195. wait(.01)
  196. spinnah.Transparency = i
  197. end
  198. spinnah:Destroy()
  199. end
  200. end)
  201. end
  202. end
  203.  
  204. --Mouse Activation--
  205. if Mouse then
  206. Mouse.KeyDown:connect(onKeyDown)
  207. Mouse.Button1Down:connect(onButton1Down)
  208. end
  209.  
  210. --Loop--
  211. while true do
  212. rs:wait()
  213. FIJJETSPINNUHWELD.C0 = FIJJETSPINNUHWELD.C0 * CFrame.fromEulerAnglesXYZ(0,math.rad(speedo),0)
  214. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement