Advertisement
DylanD2003

Untitled

Sep 24th, 2017
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.58 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.  
  23. --Outfit--
  24. New = function(Object, Parent, Name, Data)
  25. local Object = Instance.new(Object)
  26. for Index, Value in pairs(Data or {}) do
  27. Object[Index] = Value
  28. end
  29. Object.Parent = Parent
  30. Object.Name = Name
  31. return Object
  32. end
  33.  
  34.  
  35. 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,})
  36. 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),})
  37. 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),})
  38. 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,})
  39. SpinnerWeightOverlay = New("Decal",FIJJETSPINNUH,"SpinnerWeightOverlay",{Face = Enum.NormalId.Top,Texture = "rbxassetid://785492382",})
  40. FIJJETSPINNUHWELD = New("ManualWeld",FIJJETSPINNUH,"FIJJETSPINNUHWELD",{Part0 = FIJJETSPINNUH,Part1 = SpinnerWeldBlock,})
  41.  
  42. ScreenGui = New("ScreenGui",player.PlayerGui,"ScreenGui",{})
  43. Frame = New("Frame",ScreenGui,"Frame",{Size = UDim2.new(0, 150, 0, 200),Position = UDim2.new(1,0,.5,0),AnchorPoint = Vector2.new(1,0)})
  44. ColourLabel = New("TextLabel",Frame,"ColourLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Text = "Spinner BrickColor"})
  45. BrickColorBox = New("TextBox",Frame,"BrickColorBox",{Size = UDim2.new(0.8, 0, 0.1, 0),Position = UDim2.new(.1,0,.1,0),Text = "(BrickColor here)"})
  46. 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)"})
  47. 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"})
  48. 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"})
  49. ReflectBox = New("TextBox",Frame,"ReflectBox",{Size = UDim2.new(0.4, 0, 0.1, 0),Position = UDim2.new(.1,0,.5,0),Text = "0"})
  50. TransBox = New("TextBox",Frame,"TransBox",{Size = UDim2.new(0.4, 0, 0.1, 0),Position = UDim2.new(.5,0,.5,0),Text = "0"})
  51. 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"})
  52. SpeedBox = New("TextBox",Frame,"SpeedBox",{Size = UDim2.new(0.8, 0, 0.1, 0),Position = UDim2.new(.1,0,.7,0),Text = "20"})
  53. 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)"})
  54. 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"})
  55. 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"})
  56.  
  57. CloseButton.MouseButton1Click:connect(function()
  58. if Frame.Visible == true then
  59. Frame.Visible = false
  60. CloseButton.Text = "Open"
  61. elseif Frame.Visible == false then
  62. Frame.Visible = true
  63. CloseButton.Text = "Close"
  64. end
  65. end)
  66.  
  67. TextureBox.Changed:connect(function()
  68. FidgetSpinnerMesh.TextureId = TextureBox.Text
  69. end)
  70.  
  71. BrickColorBox.Changed:connect(function()
  72. FIJJETSPINNUH.BrickColor = BrickColor.new(BrickColorBox.Text)
  73. FidgetSpinnerMesh.TextureId = ""
  74. end)
  75.  
  76. ReflectBox.Changed:connect(function()
  77. FIJJETSPINNUH.Reflectance = ReflectBox.Text
  78. end)
  79.  
  80. TransBox.Changed:connect(function()
  81. FIJJETSPINNUH.Transparency = TransBox.Text
  82. end)
  83.  
  84. SpeedBox.Changed:connect(function()
  85. if SpeedBox.Text ~= "" then
  86. speedo = SpeedBox.Text
  87. end
  88. end)
  89.  
  90. function CreateTrailObj(parent,color1,color2,ofsx,ofsz)
  91. local Att1 = New("Attachment",parent,"Att1",{Position = Vector3.new(ofsx,parent.Size.Y/2,ofsz)})
  92. local Att2 = New("Attachment",parent,"Att2",{Position = Vector3.new(ofsx,-(parent.Size.Y/2),ofsz)})
  93. 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})
  94. return TEff
  95. end
  96.  
  97. --Clerp Animations--
  98. TC = chara.HumanoidRootPart.RootJoint
  99. HC = chara.Torso.Neck
  100. RAC = chara.Torso["Right Shoulder"]
  101. LAC = chara.Torso["Left Shoulder"]
  102. RLC = chara.Torso["Right Hip"]
  103. LLC = chara.Torso["Left Hip"]
  104. TCF = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  105. HCF = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  106. RACF = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  107. LACF = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  108. RLCF = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  109. LLCF = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  110. RWF = CFrame.new(-1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  111. LWF = CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  112. RLWF = CFrame.new(-.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  113. LLWF = CFrame.new(.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  114. RW = Instance.new("Weld",HC.Parent)
  115. RW.Part1 = HC.Parent
  116. RW.Part0 = chara["Right Arm"]
  117. RW.C0 = RWF
  118.  
  119. function clerp(a,b,c)
  120. return a:lerp(b,c)
  121. end
  122.  
  123. --TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
  124. --HC.C0 = HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-50))
  125. --RW.C0 = (RWF + Vector3.new(1,2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90))
  126. --LW.C0 = LWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(2))
  127.  
  128. RW.C0 = RWF
  129.  
  130. --Idle Clerp--
  131. IRWF = (RWF - Vector3.new(-.2,-.8,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-10),0)
  132.  
  133. function res()
  134. RW.C0 = IRWF
  135. end
  136. res()
  137.  
  138. --Mouse Functions--
  139. function onKeyDown(key)
  140. if key == "q" then
  141. mode = "Drop"
  142. CurrentModeLabel.Text = mode
  143. elseif key == "e" then
  144. mode = "Throw"
  145. CurrentModeLabel.Text = mode
  146. end
  147. end
  148. function onButton1Down()
  149. if mode == "Drop" then
  150. local spinnah = FIJJETSPINNUH:Clone()
  151. spinnah.Parent = workspace
  152. spinnah.Position = FIJJETSPINNUH.Position
  153. spinnah:BreakJoints()
  154. local spinf = Instance.new("BodyAngularVelocity",spinnah)
  155. spinf.AngularVelocity = Vector3.new(0,speedo,0)
  156. spinf.MaxTorque = Vector3.new(speedo,speedo,speedo)
  157. debby:AddItem(spinnah,60)
  158. elseif mode == "Throw" then
  159. local spinnah = FIJJETSPINNUH:Clone()
  160. spinnah.Parent = workspace
  161. spinnah.Position = FIJJETSPINNUH.Position + chara.HumanoidRootPart.CFrame.lookVector*5
  162. spinnah:BreakJoints()
  163. debby:AddItem(spinnah,60)
  164. local spinf = Instance.new("BodyAngularVelocity",spinnah)
  165. spinf.AngularVelocity = Vector3.new(0,speedo,0)
  166. spinf.MaxTorque = Vector3.new(speedo,speedo,speedo)
  167. local faws = Instance.new("BodyForce",spinnah)
  168. faws.Force = Vector3.new(0,spinnah:GetMass()*workspace.Gravity,0)
  169. spinnah.Velocity = chara.HumanoidRootPart.CFrame.lookVector*speedo
  170. spinnah.Touched:connect(function(hit)
  171. if hit.Parent ~= chara and hit.Parent:FindFirstChild("Humanoid") and faws ~= nil then
  172. faws:Destroy()
  173. faws = nil
  174. hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(10,20))
  175. spinf:Destroy()
  176. wait(5)
  177. for i = 0, 1, .1 do
  178. wait(.01)
  179. spinnah.Transparency = i
  180. end
  181. spinnah:Destroy()
  182. end
  183. end)
  184. end
  185. end
  186.  
  187. --Mouse Activation--
  188. if Mouse then
  189. Mouse.KeyDown:connect(onKeyDown)
  190. Mouse.Button1Down:connect(onButton1Down)
  191. end
  192.  
  193. --Loop--
  194. while true do
  195. rs:wait()
  196. FIJJETSPINNUHWELD.C0 = FIJJETSPINNUHWELD.C0 * CFrame.fromEulerAnglesXYZ(0,math.rad(speedo),0)
  197. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement